[251118] fix: HomePanel focus resotoration remove
🕐 커밋 시간: 2025. 11. 18. 10:14:26 📊 변경 통계: • 총 파일: 3개 • 추가: +68줄 • 삭제: -23줄 📝 수정된 파일: ~ com.twin.app.shoptime/src/actions/playActions.js ~ com.twin.app.shoptime/src/views/HomePanel/HomePanel.jsx ~ com.twin.app.shoptime/src/views/PlayerPanel/PlayerPanel.module.less 🔧 주요 변경 내용: • 핵심 비즈니스 로직 개선 • 소규모 기능 개선
This commit is contained in:
@@ -68,11 +68,16 @@ export const startVideoPlayer =
|
||||
...rest
|
||||
}) =>
|
||||
(dispatch, getState) => {
|
||||
console.log('[startVideoPlayer] ✅ START - videoId:', videoId, ', showUrl:', showUrl, ', modal:', modal);
|
||||
|
||||
// 🔽 [251116] 즉시 로딩 상태 설정
|
||||
const videoIdentifier = videoId || showUrl;
|
||||
if (videoIdentifier) {
|
||||
const displayMode = modal ? DISPLAY_STATUS.VISIBLE : DISPLAY_STATUS.FULLSCREEN;
|
||||
console.log('[startVideoPlayer] 📌 Setting playback loading - identifier:', videoIdentifier, ', displayMode:', displayMode);
|
||||
dispatch(setPlaybackLoading(videoIdentifier, displayMode));
|
||||
} else {
|
||||
console.log('[startVideoPlayer] ⚠️ No videoIdentifier provided (videoId and showUrl are both missing)');
|
||||
}
|
||||
|
||||
const panels = getState().panels.panels;
|
||||
@@ -80,10 +85,15 @@ export const startVideoPlayer =
|
||||
let panelWorkingAction = pushPanel;
|
||||
|
||||
const panelName = panel_names.PLAYER_PANEL;
|
||||
console.log('[startVideoPlayer] 📊 Panel state - panelsCount:', panels.length, ', topPanelName:', topPanel?.name);
|
||||
|
||||
if (topPanel && topPanel.name === panelName) {
|
||||
panelWorkingAction = updatePanel;
|
||||
console.log('[startVideoPlayer] 🔄 UPDATING existing PLAYER_PANEL');
|
||||
} else {
|
||||
console.log('[startVideoPlayer] ➕ PUSHING new PLAYER_PANEL');
|
||||
}
|
||||
|
||||
dispatch(
|
||||
panelWorkingAction(
|
||||
{
|
||||
@@ -100,12 +110,20 @@ export const startVideoPlayer =
|
||||
true
|
||||
)
|
||||
);
|
||||
console.log('[startVideoPlayer] ✨ Panel action dispatched');
|
||||
|
||||
if (modal && modalContainerId && !spotlightDisable) {
|
||||
console.log('[startVideoPlayer] 🎯 Setting Spotlight focus - containerId:', modalContainerId);
|
||||
Spotlight.setPointerMode(false);
|
||||
startVideoFocusTimer = setTimeout(() => {
|
||||
console.log('[startVideoPlayer] 🔍 Spotlight.focus called');
|
||||
Spotlight.focus(modalContainerId);
|
||||
}, 0);
|
||||
} else {
|
||||
console.log('[startVideoPlayer] ⏭️ Spotlight focus skipped - modal:', modal, ', modalContainerId:', !!modalContainerId, ', spotlightDisable:', spotlightDisable);
|
||||
}
|
||||
|
||||
console.log('[startVideoPlayer] ✅ END');
|
||||
};
|
||||
|
||||
// 중복 재생 방지: 정말 동일한 요청인지 확인
|
||||
@@ -142,11 +160,16 @@ export const startVideoPlayerNew =
|
||||
...rest
|
||||
}) =>
|
||||
(dispatch, getState) => {
|
||||
console.log('[startVideoPlayerNew] ✅ START - bannerId:', bannerId, ', videoId:', videoId, ', showUrl:', showUrl, ', modal:', modal);
|
||||
|
||||
// 🔽 [251116] 즉시 로딩 상태 설정
|
||||
const videoIdentifier = videoId || showUrl || bannerId;
|
||||
if (videoIdentifier) {
|
||||
const displayMode = modal ? DISPLAY_STATUS.VISIBLE : DISPLAY_STATUS.FULLSCREEN;
|
||||
console.log('[startVideoPlayerNew] 📌 Setting playback loading - identifier:', videoIdentifier, ', displayMode:', displayMode);
|
||||
dispatch(setPlaybackLoading(videoIdentifier, displayMode));
|
||||
} else {
|
||||
console.log('[startVideoPlayerNew] ⚠️ No videoIdentifier provided');
|
||||
}
|
||||
|
||||
const panels = getState().panels.panels;
|
||||
@@ -155,6 +178,7 @@ export const startVideoPlayerNew =
|
||||
|
||||
// const panelName = useNewPlayer ? panel_names.PLAYER_PANEL_NEW : panel_names.PLAYER_PANEL;
|
||||
const panelName = panel_names.PLAYER_PANEL;
|
||||
console.log('[startVideoPlayerNew] 📊 Panel state - panelsCount:', panels.length, ', topPanelName:', topPanel?.name);
|
||||
|
||||
if (topPanel && topPanel.name === panelName) {
|
||||
panelWorkingAction = updatePanel;
|
||||
@@ -167,8 +191,10 @@ export const startVideoPlayerNew =
|
||||
const isSameModalType = currentPanelInfo.modal === modal;
|
||||
const isSameContainer = currentPanelInfo.modalContainerId === modalContainerId;
|
||||
|
||||
console.log('[startVideoPlayerNew] 🔍 Duplicate check - isSameBanner:', isSameBanner, ', isSameModalType:', isSameModalType, ', isSameContainer:', isSameContainer);
|
||||
|
||||
if (isSameBanner && isSameModalType && isSameContainer) {
|
||||
console.log('[playActions] startVideoPlayerNew: 동일한 요청이므로 스킵', {
|
||||
console.log('[startVideoPlayerNew] ⏭️ SKIPPED - 동일한 요청', {
|
||||
bannerId,
|
||||
modal,
|
||||
modalContainerId,
|
||||
@@ -180,6 +206,7 @@ export const startVideoPlayerNew =
|
||||
...currentPlayerState,
|
||||
currentBannerId: bannerId,
|
||||
};
|
||||
console.log('[startVideoPlayerNew] 🔄 Player state updated - currentBannerId:', bannerId);
|
||||
|
||||
dispatch(
|
||||
panelWorkingAction(
|
||||
@@ -199,12 +226,20 @@ export const startVideoPlayerNew =
|
||||
true
|
||||
)
|
||||
);
|
||||
console.log('[startVideoPlayerNew] ✨ Panel action dispatched - action:', panelWorkingAction === updatePanel ? 'updatePanel' : 'pushPanel');
|
||||
|
||||
if (modal && modalContainerId && !spotlightDisable) {
|
||||
console.log('[startVideoPlayerNew] 🎯 Setting Spotlight focus - containerId:', modalContainerId);
|
||||
Spotlight.setPointerMode(false);
|
||||
startVideoFocusTimer = setTimeout(() => {
|
||||
console.log('[startVideoPlayerNew] 🔍 Spotlight.focus called');
|
||||
Spotlight.focus(modalContainerId);
|
||||
}, 0);
|
||||
} else {
|
||||
console.log('[startVideoPlayerNew] ⏭️ Spotlight focus skipped - modal:', modal, ', modalContainerId:', !!modalContainerId, ', spotlightDisable:', spotlightDisable);
|
||||
}
|
||||
|
||||
console.log('[startVideoPlayerNew] ✅ END');
|
||||
};
|
||||
|
||||
export const finishVideoPreview = () => (dispatch, getState) => {
|
||||
|
||||
Reference in New Issue
Block a user