[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:
@@ -1965,6 +1965,12 @@ const PlayerPanel = ({ isTabActivated, panelInfo, isOnTop, spotlightId, ...props
|
|||||||
);
|
);
|
||||||
|
|
||||||
const clearTimerV2 = useCallback(() => {
|
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);
|
clearTimeout(timerIdV2.current);
|
||||||
timerIdV2.current = null;
|
timerIdV2.current = null;
|
||||||
}, []);
|
}, []);
|
||||||
@@ -2153,8 +2159,12 @@ const PlayerPanel = ({ isTabActivated, panelInfo, isOnTop, spotlightId, ...props
|
|||||||
resetTimerV2(REGULAR_TIMEOUT);
|
resetTimerV2(REGULAR_TIMEOUT);
|
||||||
|
|
||||||
return () => {
|
return () => {
|
||||||
if (timerIdV2.current) {
|
// cleanup: tabIndex가 2가 아니거나 오버레이가 사라질 때만 타이머 클리어
|
||||||
clearTimerV2();
|
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,
|
tabIndexV2,
|
||||||
belowContentsVisible,
|
belowContentsVisible,
|
||||||
videoVerticalVisible,
|
videoVerticalVisible,
|
||||||
resetTimerV2,
|
|
||||||
clearTimerV2,
|
|
||||||
]);
|
]);
|
||||||
|
|
||||||
// TabIndex 1 자동 다음 단계로 이동
|
// TabIndex 1 자동 다음 단계로 이동
|
||||||
|
|||||||
@@ -130,7 +130,7 @@ export default function TabContainerV2({
|
|||||||
e.stopPropagation();
|
e.stopPropagation();
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
if (onTabClose) {
|
if (onTabClose) {
|
||||||
onTabClose(1); // tabIndex를 1로 설정
|
onTabClose(2); // tabIndex를 2로 설정
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
[onTabClose]
|
[onTabClose]
|
||||||
|
|||||||
Reference in New Issue
Block a user