From 42095d9d610f24dbe9418115e2cc4e444d9d0864 Mon Sep 17 00:00:00 2001 From: optrader Date: Tue, 18 Nov 2025 04:17:51 +0900 Subject: [PATCH] =?UTF-8?q?[251118]=20feat:=20HomePanel=20Detailpanel?= =?UTF-8?q?=EC=97=90=EC=84=9C=20=EB=B3=B5=EA=B7=80=20=EA=B0=90=EC=A7=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ๐Ÿ• ์ปค๋ฐ‹ ์‹œ๊ฐ„: 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 ๐Ÿ”ง ์ฃผ์š” ๋ณ€๊ฒฝ ๋‚ด์šฉ: โ€ข ์†Œ๊ทœ๋ชจ ๊ธฐ๋Šฅ ๊ฐœ์„  --- .../src/views/DetailPanel/DetailPanel.jsx | 19 ++++++++++++++++++- .../src/views/HomePanel/HomePanel.jsx | 15 +++++++++++++++ 2 files changed, 33 insertions(+), 1 deletion(-) diff --git a/com.twin.app.shoptime/src/views/DetailPanel/DetailPanel.jsx b/com.twin.app.shoptime/src/views/DetailPanel/DetailPanel.jsx index f78501fb..bea6cd05 100644 --- a/com.twin.app.shoptime/src/views/DetailPanel/DetailPanel.jsx +++ b/com.twin.app.shoptime/src/views/DetailPanel/DetailPanel.jsx @@ -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( diff --git a/com.twin.app.shoptime/src/views/HomePanel/HomePanel.jsx b/com.twin.app.shoptime/src/views/HomePanel/HomePanel.jsx index f76d2401..be432816 100644 --- a/com.twin.app.shoptime/src/views/HomePanel/HomePanel.jsx +++ b/com.twin.app.shoptime/src/views/HomePanel/HomePanel.jsx @@ -758,6 +758,21 @@ const HomePanel = ({ isOnTop }) => { console.log('[HomeActive] ์žฌ์ƒ ๊ธฐ๋ก ์—…๋ฐ์ดํŠธ:', bannerId); }, [isOnTop, dispatch]); + // โœ… [251118] DetailPanel ๋‹ซํž˜ ๊ฐ์ง€ useEffect + const detailPanelClosedTime = useSelector( + (state) => state.home.homeInfo?.panelInfo?.lastDetailPanelClosed + ); + + useEffect(() => { + if (detailPanelClosedTime && isOnTop) { + console.log('[HomePanel] โœ… DetailPanel ๋‹ซํž˜ ๊ฐ์ง€๋จ!'); + console.log('[HomePanel] lastDetailPanelClosed:', detailPanelClosedTime); + console.log('[HomePanel] isOnTop:', isOnTop); + console.log('[HomePanel] videoPlayIntentRef.current:', videoPlayIntentRef.current); + console.log('[HomePanel] lastPlayedBannerIdRef.current:', lastPlayedBannerIdRef.current); + } + }, [detailPanelClosedTime, isOnTop]); + useEffect(() => { return () => { const c = Spotlight.getCurrent();