[251124] fix: PlayerPanel videoState updated
🕐 커밋 시간: 2025. 11. 24. 10:45:28 📊 변경 통계: • 총 파일: 9개 • 추가: +509줄 • 삭제: -66줄 📝 수정된 파일: ~ com.twin.app.shoptime/src/actions/mainActions.js ~ com.twin.app.shoptime/src/actions/playActions.js ~ com.twin.app.shoptime/src/api/TAxios.js ~ com.twin.app.shoptime/src/components/VideoPlayer/VideoPlayer.js ~ com.twin.app.shoptime/src/reducers/playReducer.js ~ com.twin.app.shoptime/src/views/HomePanel/HomeBanner/RandomUnit.jsx ~ com.twin.app.shoptime/src/views/HomePanel/HomeBanner/RollingUnit.jsx ~ com.twin.app.shoptime/src/views/HomePanel/HomePanel.jsx ~ com.twin.app.shoptime/src/views/PlayerPanel/PlayerPanel.jsx 🔧 함수 변경 내용: 📄 com.twin.app.shoptime/src/actions/mainActions.js (javascript): ❌ Deleted: onSuccess(), onFail() 📄 com.twin.app.shoptime/src/actions/playActions.js (javascript): 🔄 Modified: clearAllVideoTimers(), pauseModalVideo(), hideModalVideo() ❌ Deleted: CLEAR_PLAYER_INFO() 📄 com.twin.app.shoptime/src/api/TAxios.js (javascript): 🔄 Modified: setTokenRefreshing(), createSafeApiThunk() 📄 com.twin.app.shoptime/src/views/HomePanel/HomeBanner/RandomUnit.jsx (javascript): 🔄 Modified: SpotlightContainerDecorator() 📄 com.twin.app.shoptime/src/views/HomePanel/HomeBanner/RollingUnit.jsx (javascript): 🔄 Modified: createPanelInfo() 🔧 주요 변경 내용: • 핵심 비즈니스 로직 개선 • API 서비스 레이어 개선 • UI 컴포넌트 아키텍처 개선
This commit is contained in:
@@ -244,6 +244,31 @@ const HomePanel = ({ isOnTop, showGradientBackground = false }) => {
|
||||
const focusedContainerIdRef = useRef(null);
|
||||
const prevIsOnTopRef = useRef(isOnTop);
|
||||
|
||||
// ✅ [251124] HomePanel을 벗어날 때(isOnTop: true -> false) 현재 포커스 저장
|
||||
useEffect(() => {
|
||||
if (prevIsOnTopRef.current && !isOnTop) {
|
||||
const current = Spotlight.getCurrent();
|
||||
const tBody = document.querySelector(`[data-spotlight-id="${SpotlightIds.HOME_TBODY}"]`);
|
||||
|
||||
if (current && tBody && tBody.contains(current)) {
|
||||
const targetId = current.getAttribute('data-spotlight-id');
|
||||
if (targetId) {
|
||||
dlog('[HomePanel] Saving focus before leaving:', targetId);
|
||||
lastFocusedTargetRef.current = targetId;
|
||||
dispatch(
|
||||
updateHomeInfo({
|
||||
name: panel_names.HOME_PANEL,
|
||||
panelInfo: {
|
||||
lastFocusedTargetId: targetId,
|
||||
},
|
||||
})
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
prevIsOnTopRef.current = isOnTop;
|
||||
}, [isOnTop, dispatch]);
|
||||
|
||||
// ✅ [251119] DetailPanelBackground 이미지 프리로딩
|
||||
// HomePanel 마운트 시 백그라운드로 모든 파트너사 배경 이미지를 미리 로드하여
|
||||
// DetailPanel 진입 시 로딩 지연을 방지함
|
||||
|
||||
Reference in New Issue
Block a user