[251118] feat: HomePanel Detailpanel에서 복귀 감지

🕐 커밋 시간: 2025. 11. 18. 04:17:51

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

📝 수정된 파일:
  ~ com.twin.app.shoptime/src/views/DetailPanel/DetailPanel.jsx
  ~ com.twin.app.shoptime/src/views/HomePanel/HomePanel.jsx

🔧 주요 변경 내용:
  • 소규모 기능 개선
This commit is contained in:
2025-11-18 04:17:51 +09:00
parent b9fb388d9b
commit 42095d9d61
2 changed files with 33 additions and 1 deletions

View File

@@ -17,7 +17,7 @@ import Spotlight from '@enact/spotlight';
import { setContainerLastFocusedElement } from '@enact/spotlight/src/container';
import { getDeviceAdditionInfo } from '../../actions/deviceActions';
import { getThemeCurationDetailInfo } from '../../actions/homeActions';
import { getThemeCurationDetailInfo, updateHomeInfo } from '../../actions/homeActions';
import {
getMainCategoryDetail,
getMainYouMayLike,
@@ -148,6 +148,23 @@ export default function DetailPanel({ panelInfo, isOnTop, spotlightId }) {
};
}, [dispatch]);
// ✅ [251118] DetailPanel이 사라질 때 HomePanel의 비디오 재생 활성화
useEffect(() => {
return () => {
// DetailPanel이 unmount되는 시점
console.log('[DetailPanel] unmount - HomePanel 활성화 신호 전송');
// HomePanel에서 비디오 재생을 다시 시작하도록 신호 보내기
dispatch(updateHomeInfo({
name: panel_names.HOME_PANEL,
panelInfo: {
shouldResumeVideo: true, // ✅ 신호
lastDetailPanelClosed: Date.now(), // ✅ 시점 기록
}
}));
};
}, [dispatch]);
const onBackClick = useCallback(
(isCancelClick) => (ev) => {
fp.pipe(