앱 실행직후 라이브 방송 클릭시 새로고침 현상 수정

This commit is contained in:
opacity@t-win.kr
2025-06-26 10:05:48 +09:00
parent c1804860e6
commit 4fcb0729af
2 changed files with 24 additions and 20 deletions

View File

@@ -104,7 +104,7 @@ Spotlight.focus = function (elem, containerOption) {
if (!floatLayerNode.contains(current)) { if (!floatLayerNode.contains(current)) {
if (floatLayerNode.lastElementChild) { if (floatLayerNode.lastElementChild) {
const spottableNode = floatLayerNode.lastElementChild.querySelector( const spottableNode = floatLayerNode.lastElementChild.querySelector(
'[data-spotlight-container="true"]', '[data-spotlight-container="true"]'
); );
if (spottableNode) { if (spottableNode) {
originFocus.apply(this, [spottableNode]); // this 바인딩을 유지하여 originFocus 호출 originFocus.apply(this, [spottableNode]); // this 바인딩을 유지하여 originFocus 호출
@@ -122,7 +122,7 @@ Spotlight.focus = function (elem, containerOption) {
sendBroadCast({ sendBroadCast({
type: "deActivateTab", type: "deActivateTab",
moreInfo: { reason: "focus" }, moreInfo: { reason: "focus" },
}), })
); );
} }
} }
@@ -135,15 +135,15 @@ function AppBase(props) {
const httpHeader = useSelector((state) => state.common.httpHeader); const httpHeader = useSelector((state) => state.common.httpHeader);
const httpHeaderRef = useRef(httpHeader); const httpHeaderRef = useRef(httpHeader);
const webOSVersion = useSelector( const webOSVersion = useSelector(
(state) => state.common.appStatus.webOSVersion, (state) => state.common.appStatus.webOSVersion
); );
const deviceId = useSelector((state) => state.common.appStatus.deviceId); const deviceId = useSelector((state) => state.common.appStatus.deviceId);
const loginUserData = useSelector( const loginUserData = useSelector(
(state) => state.common.appStatus.loginUserData, (state) => state.common.appStatus.loginUserData
); );
const loginUserDataRef = useRef(loginUserData); const loginUserDataRef = useRef(loginUserData);
const cursorVisible = useSelector( const cursorVisible = useSelector(
(state) => state.common.appStatus.cursorVisible, (state) => state.common.appStatus.cursorVisible
); );
const introTermsAgree = useSelector((state) => state.common.introTermsAgree); const introTermsAgree = useSelector((state) => state.common.introTermsAgree);
// const optionalTermsAgree = useSelector((state) => state.common.optionalTermsAgree); // const optionalTermsAgree = useSelector((state) => state.common.optionalTermsAgree);
@@ -161,7 +161,7 @@ function AppBase(props) {
const introTermsAgreeRef = usePrevious(introTermsAgree); const introTermsAgreeRef = usePrevious(introTermsAgree);
const logEnable = useSelector((state) => state.localSettings.logEnable); const logEnable = useSelector((state) => state.localSettings.logEnable);
const oldDb8Deleted = useSelector( const oldDb8Deleted = useSelector(
(state) => state.localSettings.oldDb8Deleted, (state) => state.localSettings.oldDb8Deleted
); );
// const macAddress = useSelector((state) => state.common.macAddress); // const macAddress = useSelector((state) => state.common.macAddress);
@@ -191,7 +191,7 @@ function AppBase(props) {
new Job((func) => { new Job((func) => {
func(); func();
console.log("hide cursor"); console.log("hide cursor");
}, 5000), }, 5000)
); );
// 컴포넌트에서 모니터링 시작 - 한시적 모니터링 // 컴포넌트에서 모니터링 시작 - 한시적 모니터링
@@ -228,7 +228,7 @@ function AppBase(props) {
dispatch( dispatch(
changeAppStatus({ changeAppStatus({
cursorVisible: window.PalmSystem?.cursor?.visibility, cursorVisible: window.PalmSystem?.cursor?.visibility,
}), })
); );
} }
dispatch(getHomeMenu()); dispatch(getHomeMenu());
@@ -241,7 +241,7 @@ function AppBase(props) {
console.log( console.log(
"initService...{haveyInit, launchParams}", "initService...{haveyInit, launchParams}",
haveyInit, haveyInit,
JSON.stringify(launchParams), JSON.stringify(launchParams)
); );
// pyh TODO: edit or delete later (line 196 ~ 198) // pyh TODO: edit or delete later (line 196 ~ 198)
@@ -256,7 +256,7 @@ function AppBase(props) {
contextName: Config.LOG_CONTEXT_NAME.ENTRY, contextName: Config.LOG_CONTEXT_NAME.ENTRY,
messageId: Config.LOG_MESSAGE_ID.ENTRY_INFO, messageId: Config.LOG_MESSAGE_ID.ENTRY_INFO,
entry_menu: "App", entry_menu: "App",
}), })
); );
} }
@@ -266,12 +266,12 @@ function AppBase(props) {
contextName: Config.LOG_CONTEXT_NAME.SHOPTIME, contextName: Config.LOG_CONTEXT_NAME.SHOPTIME,
messageId: Config.LOG_MESSAGE_ID.VIEW_CHANGE, messageId: Config.LOG_MESSAGE_ID.VIEW_CHANGE,
visible: true, visible: true,
}), })
); );
clearLaunchParams(); clearLaunchParams();
} }
}, },
[dispatch], [dispatch]
); );
const handleRelaunchEvent = useCallback(() => { const handleRelaunchEvent = useCallback(() => {
@@ -296,7 +296,7 @@ function AppBase(props) {
foreGroundChangeTimer = setTimeout(() => { foreGroundChangeTimer = setTimeout(() => {
console.log( console.log(
"visibility changed !!! ==> set to foreground cursorVisible", "visibility changed !!! ==> set to foreground cursorVisible",
JSON.stringify(window.PalmSystem?.cursor?.visibility), JSON.stringify(window.PalmSystem?.cursor?.visibility)
); // eslint-disable-line no-console ); // eslint-disable-line no-console
if (platform.platformName !== "webos") { if (platform.platformName !== "webos") {
//for debug //for debug
@@ -304,14 +304,14 @@ function AppBase(props) {
changeAppStatus({ changeAppStatus({
isAppForeground: true, isAppForeground: true,
cursorVisible: !platform.touchscreen, cursorVisible: !platform.touchscreen,
}), })
); );
} else if (typeof window === "object") { } else if (typeof window === "object") {
dispatch( dispatch(
changeAppStatus({ changeAppStatus({
isAppForeground: true, isAppForeground: true,
cursorVisible: window.PalmSystem?.cursor?.visibility, cursorVisible: window.PalmSystem?.cursor?.visibility,
}), })
); );
} }
}, 1000); }, 1000);
@@ -375,7 +375,7 @@ function AppBase(props) {
dispatch( dispatch(
changeAppStatus({ changeAppStatus({
showLoadingPanel: { show: true, type: "launching" }, showLoadingPanel: { show: true, type: "launching" },
}), })
); );
} }
dispatch(checkFirstLaunch()); dispatch(checkFirstLaunch());
@@ -384,7 +384,7 @@ function AppBase(props) {
getHomeTerms({ getHomeTerms({
mbrNo: loginUserData.userNumber, mbrNo: loginUserData.userNumber,
trmsTpCdList: "MST00401, MST00402, MST00405", // 선택약관 추가 25.06 trmsTpCdList: "MST00401, MST00402, MST00405", // 선택약관 추가 25.06
}), })
); );
httpHeaderRef.current = httpHeader; httpHeaderRef.current = httpHeader;
@@ -424,7 +424,7 @@ function AppBase(props) {
} else { } else {
// 필수 약관에 동의하지 않은 경우 // 필수 약관에 동의하지 않은 경우
dispatch( dispatch(
pushPanel({ name: Config.panel_names.INTRO_PANEL, panelInfo: {} }), pushPanel({ name: Config.panel_names.INTRO_PANEL, panelInfo: {} })
); );
dispatch(changeAppStatus({ showLoadingPanel: { show: false } })); dispatch(changeAppStatus({ showLoadingPanel: { show: false } }));
} }
@@ -444,7 +444,7 @@ function AppBase(props) {
setDeepLink({ setDeepLink({
contentTarget: launchParmas.contentTarget, contentTarget: launchParmas.contentTarget,
isDeepLink: true, isDeepLink: true,
}), })
); );
} }
@@ -454,7 +454,7 @@ function AppBase(props) {
deeplinkId: launchParmas.contentTarget ?? "", deeplinkId: launchParmas.contentTarget ?? "",
linkTpCd, linkTpCd,
logTpNo: Config.LOG_TP_NO.SECOND_LAYER, logTpNo: Config.LOG_TP_NO.SECOND_LAYER,
}), })
); );
}, [dispatch, initService]); }, [dispatch, initService]);

View File

@@ -132,6 +132,10 @@ export default function PlayerOverlayContents({
}, [panelInfo, sideContentsVisible]); }, [panelInfo, sideContentsVisible]);
const noLiveContentsVisible = useMemo(() => { const noLiveContentsVisible = useMemo(() => {
if (!Array.isArray(playListInfo) || playListInfo.length === 0) {
return false;
}
const noShowIdCount = playListInfo.filter((item) => !item.showId).length; const noShowIdCount = playListInfo.filter((item) => !item.showId).length;
if (playListInfo.length - 1 === noShowIdCount) { if (playListInfo.length - 1 === noShowIdCount) {
return false; return false;