From dba79789a870cf4006423824a2faeb856c676b40 Mon Sep 17 00:00:00 2001 From: optrader Date: Tue, 16 Dec 2025 17:00:52 +0900 Subject: [PATCH] =?UTF-8?q?[251216]=20fix:=20DeepLink=20=EC=B2=98=EB=A6=AC?= =?UTF-8?q?=20isDeepLinkEntry?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ๐Ÿ• ์ปค๋ฐ‹ ์‹œ๊ฐ„: 2025. 12. 16. 17:00:52 ๐Ÿ“Š ๋ณ€๊ฒฝ ํ†ต๊ณ„: โ€ข ์ด ํŒŒ์ผ: 4๊ฐœ โ€ข ์ถ”๊ฐ€: +46์ค„ โ€ข ์‚ญ์ œ: -5์ค„ ๐Ÿ“ ์ˆ˜์ •๋œ ํŒŒ์ผ: ~ com.twin.app.shoptime/src/App/deepLinkHandler.js ~ com.twin.app.shoptime/src/views/HomePanel/HomeBanner/HomeBanner.jsx ~ com.twin.app.shoptime/src/views/HomePanel/HomePanel.jsx ~ com.twin.app.shoptime/src/views/PlayerPanel/PlayerPanel.jsx ๐Ÿ”ง ์ฃผ์š” ๋ณ€๊ฒฝ ๋‚ด์šฉ: โ€ข ํ•ต์‹ฌ ๋น„์ฆˆ๋‹ˆ์Šค ๋กœ์ง ๊ฐœ์„  โ€ข ์†Œ๊ทœ๋ชจ ๊ธฐ๋Šฅ ๊ฐœ์„  --- com.twin.app.shoptime/src/App/deepLinkHandler.js | 14 ++++++++++++++ .../src/views/HomePanel/HomeBanner/HomeBanner.jsx | 10 +++++++--- .../src/views/HomePanel/HomePanel.jsx | 12 +++++++++++- .../src/views/PlayerPanel/PlayerPanel.jsx | 15 ++++++++++++++- 4 files changed, 46 insertions(+), 5 deletions(-) diff --git a/com.twin.app.shoptime/src/App/deepLinkHandler.js b/com.twin.app.shoptime/src/App/deepLinkHandler.js index 40c822d3..2c29c925 100644 --- a/com.twin.app.shoptime/src/App/deepLinkHandler.js +++ b/com.twin.app.shoptime/src/App/deepLinkHandler.js @@ -85,6 +85,7 @@ export const handleDeepLink = (contentTarget) => (dispatch, _getState) => { patnrId: patnrId, chanId: chanId, shptmBanrTpNm: "LIVE", + modal: false, // DeepLink ์ง„์ž… ์‹œ fullscreen์œผ๋กœ ์žฌ์ƒ // expsOrd: expsOrd, }; break; @@ -101,6 +102,7 @@ export const handleDeepLink = (contentTarget) => (dispatch, _getState) => { patnrId: patnrId, showId: showId, shptmBanrTpNm: "VOD", + modal: false, // DeepLink ์ง„์ž… ์‹œ fullscreen์œผ๋กœ ์žฌ์ƒ // expsOrd: expsOrd, }; break; @@ -274,6 +276,18 @@ export const handleDeepLink = (contentTarget) => (dispatch, _getState) => { const action = panelName === panel_names.HOME_PANEL ? updateHomeInfo : pushPanel; + // ๐Ÿ”ฝ LS(Live Show) ๋˜๋Š” VS(VOD Show)์ธ ๊ฒฝ์šฐ DeepLink ์ง„์ž… ํ”Œ๋ž˜๊ทธ ์„ค์ • + if ((type === 'LS' || type === 'VS') && action === pushPanel) { + dispatch( + updateHomeInfo({ + name: panel_names.HOME_PANEL, + panelInfo: { + isDeepLinkEntry: true, // DeepLink PlayerPanel ์ง„์ž… ํ”Œ๋ž˜๊ทธ + }, + }) + ); + } + dispatch( action({ name: panelName, diff --git a/com.twin.app.shoptime/src/views/HomePanel/HomeBanner/HomeBanner.jsx b/com.twin.app.shoptime/src/views/HomePanel/HomeBanner/HomeBanner.jsx index 40141919..b5be5288 100644 --- a/com.twin.app.shoptime/src/views/HomePanel/HomeBanner/HomeBanner.jsx +++ b/com.twin.app.shoptime/src/views/HomePanel/HomeBanner/HomeBanner.jsx @@ -54,6 +54,9 @@ export default function HomeBanner({ const popupVisible = useSelector((state) => state.common.popup.popupVisible); const panels = useSelector((state) => state.panels.panels); + const isDeepLinkEntry = useSelector( + (state) => state.home.homeInfo?.panelInfo?.isDeepLinkEntry + ); // ๐Ÿ”ฝ useFocusHistory - ๊ฒฝ๋Ÿ‰ํ™”๋œ ๋ฒ”์šฉ ํฌ์ปค์Šค ํžˆ์Šคํ† ๋ฆฌ const focusHistory = useFocusHistory({ enableLogging: true, @@ -164,10 +167,11 @@ export default function HomeBanner({ videoData = targetBannerData.bannerDetailInfos?.[0]; } - // DetailPanel์ด ๋–  ์žˆ๋Š” ๋™์•ˆ์—๋Š” ๋ฐฐ๋„ˆ ์ž๋™ ์žฌ์ƒ์„ ์Šคํ‚ต (PlayerPanel ๋ชจ๋‹ฌ ์žฌ์„ค์ • ๋ฐฉ์ง€) + // ๐Ÿ”ฝ [251221] DetailPanel์ด๋‚˜ DeepLink PlayerPanel์ด ๋–  ์žˆ์œผ๋ฉด ๋ฐฐ๋„ˆ ์ž๋™ ์žฌ์ƒ ์Šคํ‚ต const hasDetailPanel = panels.some((p) => p.name === panel_names.DETAIL_PANEL); + const hasPlayerPanel = panels.some((p) => p.name === panel_names.PLAYER_PANEL); - if (!hasDetailPanel && videoData && (videoData.shptmBanrTpNm === 'LIVE' || videoData.shptmBanrTpNm === 'VOD')) { + if (!hasDetailPanel && !hasPlayerPanel && !isDeepLinkEntry && videoData && (videoData.shptmBanrTpNm === 'LIVE' || videoData.shptmBanrTpNm === 'VOD')) { console.log('[HomeBanner] ์ดˆ๊ธฐ ๋น„๋””์˜ค ์ž๋™ ์žฌ์ƒ:', defaultFocus); dispatch( @@ -185,7 +189,7 @@ export default function HomeBanner({ }) ); } - }, [bannerDataList, defaultFocus, dispatch, panels]); + }, [bannerDataList, defaultFocus, dispatch, panels, isDeepLinkEntry]); const renderItem = useCallback( (index, isHorizontal) => { diff --git a/com.twin.app.shoptime/src/views/HomePanel/HomePanel.jsx b/com.twin.app.shoptime/src/views/HomePanel/HomePanel.jsx index 37af3f0c..9310985c 100644 --- a/com.twin.app.shoptime/src/views/HomePanel/HomePanel.jsx +++ b/com.twin.app.shoptime/src/views/HomePanel/HomePanel.jsx @@ -1126,6 +1126,9 @@ const HomePanel = ({ isOnTop, showGradientBackground = false }) => { const detailPanelClosedTime = useSelector( (state) => state.home.homeInfo?.panelInfo?.detailPanelClosedAt ); + const isDeepLinkEntry = useSelector( + (state) => state.home.homeInfo?.panelInfo?.isDeepLinkEntry + ); useEffect(() => { if (detailPanelClosed && isOnTop) { @@ -1137,6 +1140,13 @@ const HomePanel = ({ isOnTop, showGradientBackground = false }) => { // console.log('[HomePanel] *** videoPlayIntentRef.current:', videoPlayIntentRef.current); // console.log('[HomePanel] *** lastPlayedBannerIdRef.current:', lastPlayedBannerIdRef.current); + // ๐Ÿ”ฝ [251221] DeepLink๋กœ PlayerPanel์ด ์ง„์ž…ํ•œ ๊ฒฝ์šฐ ์ž๋™ ์žฌ์ƒ ์Šคํ‚ต + // (ํ”Œ๋ž˜๊ทธ ๋ฆฌ์…‹์€ PlayerPanel cleanup์—์„œ ์ฒ˜๋ฆฌํ•˜๋ฏ€๋กœ ์—ฌ๊ธฐ์„œ๋Š” ์Šคํ‚ต๋งŒ) + if (isDeepLinkEntry) { + dlog('[HomePanel] *** [DeepLink] isDeepLinkEntry=true ๊ฐ์ง€ - ์ž๋™ ์žฌ์ƒ ์Šคํ‚ต'); + return; + } + // ๐Ÿ”ฝ videoPlayIntentRef๊ฐ€ null์ธ ๊ฒฝ์šฐ: ๋น„๋””์˜ค ์žฌ์ƒ ๊ฐ€๋Šฅํ•œ ์ฒซ ๋ฒˆ์งธ ๋ฐฐ๋„ˆ ์ฐพ๊ธฐ if (!videoPlayIntentRef.current && bannerDataList) { dlog( @@ -1280,7 +1290,7 @@ const HomePanel = ({ isOnTop, showGradientBackground = false }) => { ); } } - }, [detailPanelClosed, isOnTop, bannerDataList, dispatch]); + }, [detailPanelClosed, isOnTop, bannerDataList, isDeepLinkEntry, dispatch]); // ======= // const justCameBack = !prevIsOnTopRef.current && isOnTop; diff --git a/com.twin.app.shoptime/src/views/PlayerPanel/PlayerPanel.jsx b/com.twin.app.shoptime/src/views/PlayerPanel/PlayerPanel.jsx index 8577c61e..c2ec759d 100644 --- a/com.twin.app.shoptime/src/views/PlayerPanel/PlayerPanel.jsx +++ b/com.twin.app.shoptime/src/views/PlayerPanel/PlayerPanel.jsx @@ -30,6 +30,7 @@ import { getMainLiveShow, getMainLiveShowNowProduct, } from '../../actions/mainActions'; +import { updateHomeInfo } from '../../actions/homeActions'; import * as PanelActions from '../../actions/panelActions'; import { updatePanel } from '../../actions/panelActions'; import { @@ -1170,6 +1171,7 @@ const PlayerPanel = ({ isTabActivated, panelInfo, isOnTop, spotlightId, ...props if (!panelInfo.modal) { console.log('[PlayerPanel] popPanel - closeButtonHandler'); dispatch(PanelActions.popPanel()); + // ๐Ÿ”ฝ [251221] cleanup useEffect์—์„œ isDeepLinkEntry ๋ฆฌ์…‹ ์ฒ˜๋ฆฌ dispatch(changeAppStatus({ cursorVisible: false })); //๋”ฎ๋งํฌ๋กœ ํ”Œ๋ ˆ์ด์–ด ์ง„์ž… ํ›„ ์ด์ „๋ฒ„ํŠผ ํด๋ฆญ์‹œ @@ -1206,6 +1208,17 @@ const PlayerPanel = ({ isTabActivated, panelInfo, isOnTop, spotlightId, ...props topPanel: panels[panels.length - 1]?.name, stack: panels.map((p) => p.name), }); + + // ๐Ÿ”ฝ [251221] PlayerPanel unmount ์‹œ DeepLink ํ”Œ๋ž˜๊ทธ ๋ฆฌ์…‹ + dispatch( + updateHomeInfo({ + name: panel_names.HOME_PANEL, + panelInfo: { + isDeepLinkEntry: false, + }, + }) + ); + const topPanelName = panels[panels.length - 1]?.name; if ( panelInfo.modal && @@ -1219,7 +1232,7 @@ const PlayerPanel = ({ isTabActivated, panelInfo, isOnTop, spotlightId, ...props Spotlight.focus('tbody'); } }; - }, [panelInfo?.modal, isOnTop, panels]); + }, [panelInfo?.modal, isOnTop, panels, dispatch]); useEffect(() => { if (showNowInfos && panelInfo.shptmBanrTpNm === 'LIVE') {