[251119] fix: PlayerPanel - 2

🕐 커밋 시간: 2025. 11. 19. 10:26:09

📊 변경 통계:
  • 총 파일: 2개
  • 추가: +13줄
  • 삭제: -5줄

📝 수정된 파일:
  ~ com.twin.app.shoptime/src/views/PlayerPanel/PlayerPanel.jsx
  ~ com.twin.app.shoptime/src/views/PlayerPanel/PlayerTabContents/v2/TabContainer.v2.jsx
This commit is contained in:
2025-11-19 10:26:09 +09:00
parent cb0764b3ac
commit d8030aba11
2 changed files with 13 additions and 5 deletions

View File

@@ -1965,6 +1965,12 @@ const PlayerPanel = ({ isTabActivated, panelInfo, isOnTop, spotlightId, ...props
);
const clearTimerV2 = useCallback(() => {
if (timerIdV2.current) {
console.log('[clearTimerV2] 타이머 클리어됨');
const stack = new Error().stack;
const lines = stack.split('\n').slice(1, 4).join(' → ');
console.log('[clearTimerV2] 호출 스택:', lines);
}
clearTimeout(timerIdV2.current);
timerIdV2.current = null;
}, []);
@@ -2153,8 +2159,12 @@ const PlayerPanel = ({ isTabActivated, panelInfo, isOnTop, spotlightId, ...props
resetTimerV2(REGULAR_TIMEOUT);
return () => {
if (timerIdV2.current) {
clearTimerV2();
// cleanup: tabIndex가 2가 아니거나 오버레이가 사라질 때만 타이머 클리어
if (!belowContentsVisible || videoVerticalVisible || tabIndexV2 !== 2) {
if (timerIdV2.current) {
console.log('[TabContainerV2] cleanup - 타이머 클리어');
clearTimerV2();
}
}
};
}, [
@@ -2162,8 +2172,6 @@ const PlayerPanel = ({ isTabActivated, panelInfo, isOnTop, spotlightId, ...props
tabIndexV2,
belowContentsVisible,
videoVerticalVisible,
resetTimerV2,
clearTimerV2,
]);
// TabIndex 1 자동 다음 단계로 이동