Revert "deeplink debug 코드 추가"

This reverts commit 9bc8d6f68f.
This commit is contained in:
opacity@t-win.kr
2025-08-22 11:07:52 +09:00
parent 9bc8d6f68f
commit 0303e9d2ae
8 changed files with 164 additions and 633 deletions

View File

@@ -71,6 +71,8 @@ import { sendLogTotalRecommend } from "../actions/logActions";
// } from "../utils/focus-monitor";
// import { PanelHoc } from "../components/TPanel/TPanel";
let foreGroundChangeTimer = null;
// 기존 콘솔 메서드를 백업
@@ -147,15 +149,15 @@ function AppBase(props) {
(state) => state.common.appStatus.cursorVisible
);
const introTermsAgree = useSelector((state) => state.common.introTermsAgree);
const deviceRegistered = useSelector(
(state) => state.common.deviceRegistered
);
const deviceRegistered = useSelector((state) => state.common.deviceRegistered);
// const optionalTermsAgree = useSelector((state) => state.common.optionalTermsAgree);
const termsLoading = useSelector((state) => state.common.termsLoading);
// termsFlag 전체 상태 확인
// const termsFlag = useSelector((state) => state.common.termsFlag);
const termsData = useSelector((state) => state.home.termsData);
useEffect(() => {
// Chromium68 호환성을 위해 Optional Chaining 제거
if (termsData && termsData.data && termsData.data.terms) {
@@ -171,8 +173,7 @@ function AppBase(props) {
// const macAddress = useSelector((state) => state.common.macAddress);
// Chromium68 호환성을 위해 Optional Chaining 제거
const deviceCountryCode =
(httpHeader && httpHeader["X-Device-Country"]) || "";
const deviceCountryCode = httpHeader && httpHeader["X-Device-Country"] || "";
useEffect(() => {
if (!cursorVisible && !Spotlight.getCurrent()) {
@@ -219,67 +220,32 @@ function AppBase(props) {
// }, [dispatch]);
// called by [receive httpHeader, launch, relaunch]
const initService = useCallback(
(haveyInit = true) => {
// console.log(
// "<<<<<<<<<<<<< appinfo >>>>>>>>>>>>{heavyInit, appinfo} ",
// haveyInit,
// appinfo
// );
console.log("[DEBUG] httpHeaderRef.current:", httpHeaderRef.current);
console.log("[DEBUG] httpHeader state:", httpHeader);
console.log(
"[App.js] initService,httpHeaderRef.current",
httpHeaderRef.current
);
console.log("[App.js] haveyInit", haveyInit);
// 🔍 DEEPLINK DEBUG: HTTP Header 상태 상세 확인
console.log("🔍 [DEEPLINK DEBUG] ===== HTTP Header 상태 =====");
console.log(
"🔍 [DEEPLINK DEBUG] httpHeaderRef.current:",
httpHeaderRef.current
);
console.log("🔍 [DEEPLINK DEBUG] httpHeader state:", httpHeader);
console.log("🔍 [DEEPLINK DEBUG] deviceCountryCode:", deviceCountryCode);
console.log(
"🔍 [DEEPLINK DEBUG] httpHeader null 여부:",
httpHeaderRef.current === null
);
if (httpHeaderRef.current) {
console.log(
"🔍 [DEEPLINK DEBUG] ✅ httpHeaderRef.current 존재 - 딥링크 실행 가능"
);
console.log(
"🔍 [DEEPLINK DEBUG] Country Code:",
httpHeaderRef.current["X-Device-Country"]
);
console.log(
"🔍 [DEEPLINK DEBUG] Language Code:",
httpHeaderRef.current["X-Device-Language"]
);
} else {
console.log(
"🔍 [DEEPLINK DEBUG] ❌ httpHeaderRef.current가 null - 딥링크 실행 불가"
);
}
if (httpHeaderRef.current) {
if (haveyInit) {
dispatch(changeAppStatus({ connectionFailed: false }));
if (typeof window === "object" && window.PalmSystem) {
dispatch(
changeAppStatus({
// Chromium68 호환성을 위해 Optional Chaining 제거
cursorVisible:
window.PalmSystem &&
window.PalmSystem.cursor &&
window.PalmSystem.cursor.visibility,
})
);
dispatch(
changeAppStatus({
// Chromium68 호환성을 위해 Optional Chaining 제거
cursorVisible: window.PalmSystem && window.PalmSystem.cursor && window.PalmSystem.cursor.visibility,
})
);
}
dispatch(getHomeMenu());
dispatch(getMyRecommandedKeyword());
@@ -294,38 +260,14 @@ function AppBase(props) {
JSON.stringify(launchParams)
);
// 🔍 DEEPLINK DEBUG: Launch Parameters 상세 확인
console.log("🔍 [DEEPLINK DEBUG] ===== Launch Parameters 상태 =====");
console.log("🔍 [DEEPLINK DEBUG] launchParams:", launchParams);
console.log(
"🔍 [DEEPLINK DEBUG] contentTarget:",
launchParams?.contentTarget
);
console.log("🔍 [DEEPLINK DEBUG] bypass:", launchParams?.bypass);
console.log(
"🔍 [DEEPLINK DEBUG] contentTarget 존재 여부:",
!!launchParams?.contentTarget
);
// pyh TODO: edit or delete later (line 196 ~ 198)
// Chromium68 호환성을 위해 Optional Chaining 제거
if (launchParams && launchParams.bypass) {
console.log(
"🔍 [DEEPLINK DEBUG] ✅ Bypass 링크 실행:",
launchParams.bypass
);
dispatch(handleBypassLink(launchParams.bypass));
}
if (launchParams && launchParams.contentTarget) {
console.log(
"🔍 [DEEPLINK DEBUG] ✅ 딥링크 실행:",
launchParams.contentTarget
);
dispatch(handleDeepLink(launchParams.contentTarget));
} else {
console.log(
"🔍 [DEEPLINK DEBUG] ❌ contentTarget 없음 - 딥링크 실행하지 않음"
);
dispatch(
sendLogTotalRecommend({
contextName: Config.LOG_CONTEXT_NAME.ENTRY,
@@ -369,15 +311,11 @@ function AppBase(props) {
// set foreground flag using delay time.
clearTimeout(foreGroundChangeTimer);
foreGroundChangeTimer = setTimeout(() => {
console.log(
"visibility changed !!! ==> set to foreground cursorVisible",
// Chromium68 호환성을 위해 Optional Chaining 제거
JSON.stringify(
window.PalmSystem &&
window.PalmSystem.cursor &&
window.PalmSystem.cursor.visibility
)
); // eslint-disable-line no-console
console.log(
"visibility changed !!! ==> set to foreground cursorVisible",
// Chromium68 호환성을 위해 Optional Chaining 제거
JSON.stringify(window.PalmSystem && window.PalmSystem.cursor && window.PalmSystem.cursor.visibility)
); // eslint-disable-line no-console
if (platform.platformName !== "webos") {
//for debug
dispatch(
@@ -391,10 +329,7 @@ function AppBase(props) {
changeAppStatus({
isAppForeground: true,
// Chromium68 호환성을 위해 Optional Chaining 제거
cursorVisible:
window.PalmSystem &&
window.PalmSystem.cursor &&
window.PalmSystem.cursor.visibility,
cursorVisible: window.PalmSystem && window.PalmSystem.cursor && window.PalmSystem.cursor.visibility,
})
);
}
@@ -523,7 +458,6 @@ function AppBase(props) {
? launchParmas.contentTarget.split("_")[1] || ""
: "1000";
console.log("###launchParmas.contentTarget", launchParmas.contentTarget);
if (launchParmas.contentTarget) {
dispatch(
setDeepLink({