From a6eee926411f71f37a86a5747476037ca6fd52e9 Mon Sep 17 00:00:00 2001 From: optrader Date: Wed, 10 Dec 2025 10:01:38 +0900 Subject: [PATCH] =?UTF-8?q?[251210]=20fix:=20=EB=B0=B1=ED=99=94=ED=98=84?= =?UTF-8?q?=EC=83=81=EB=94=94=EB=B2=84=EA=B9=85-App.js=20commonActions.js?= =?UTF-8?q?=20=EC=9B=90=EB=B3=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit πŸ• 컀밋 μ‹œκ°„: 2025. 12. 10. 10:01:38 πŸ“Š λ³€κ²½ 톡계: β€’ 총 파일: 2개 β€’ μΆ”κ°€: +16쀄 β€’ μ‚­μ œ: -14쀄 πŸ“ μˆ˜μ •λœ 파일: ~ com.twin.app.shoptime/src/App/App.js ~ com.twin.app.shoptime/src/actions/commonActions.js πŸ”§ ν•¨μˆ˜ λ³€κ²½ λ‚΄μš©: πŸ“„ com.twin.app.shoptime/src/App/App.js (javascript): βœ… Added: AppBase(), keyDownEvent(), mouseMoveEvent() πŸ”„ Modified: function() πŸ“„ com.twin.app.shoptime/src/actions/commonActions.js (javascript): πŸ”„ Modified: alertToast(), setFocus(), cancelFocusElement(), addReservation(), Job() πŸ”§ μ£Όμš” λ³€κ²½ λ‚΄μš©: β€’ 핡심 λΉ„μ¦ˆλ‹ˆμŠ€ 둜직 κ°œμ„  --- com.twin.app.shoptime/src/App/App.js | 16 +++++++-------- .../src/actions/commonActions.js | 20 +++++++++---------- 2 files changed, 18 insertions(+), 18 deletions(-) diff --git a/com.twin.app.shoptime/src/App/App.js b/com.twin.app.shoptime/src/App/App.js index 058f0c60..a55966e7 100644 --- a/com.twin.app.shoptime/src/App/App.js +++ b/com.twin.app.shoptime/src/App/App.js @@ -407,8 +407,6 @@ Spotlight.silentlyFocus = function (...args) { return ret; }; - - // Spotlight Focus 좔적 둜그 [251115] // DOM 이벀트 λ¦¬μŠ€λ„ˆλ‘œ λŒ€μ²΄ @@ -427,7 +425,7 @@ Spotlight.silentlyFocus = function (...args) { // }); // } -function AppBase(_props /* eslint-disable-line no-unused-vars */) { +function AppBase(props) { const dispatch = useDispatch(); const httpHeader = useSelector((state) => state.common.httpHeader); const httpHeaderRef = useRef(httpHeader); @@ -629,7 +627,7 @@ function AppBase(_props /* eslint-disable-line no-unused-vars */) { clearLaunchParams(); } }, - [dispatch], + [dispatch] ); const handleRelaunchEvent = useCallback(() => { @@ -683,7 +681,7 @@ function AppBase(_props /* eslint-disable-line no-unused-vars */) { if (typeof window === 'object' && window.PalmSystem) { window.PalmSystem.activate(); } - }, [initService, introTermsAgreeRef,dispatch]); + }, [initService, introTermsAgreeRef, dispatch]); const visibilityChanged = useCallback(() => { // console.log('document is hidden', document.hidden); @@ -727,7 +725,7 @@ function AppBase(_props /* eslint-disable-line no-unused-vars */) { }, [dispatch]); useEffect(() => { - const keyDownEvent = (_event /* eslint-disable-line no-unused-vars */) => { + const keyDownEvent = (event) => { dispatch(changeAppStatus({ cursorVisible: false })); Spotlight.setPointerMode(false); }; @@ -736,7 +734,7 @@ function AppBase(_props /* eslint-disable-line no-unused-vars */) { let lastMoveTime = 0; const THROTTLE_MS = 100; - const mouseMoveEvent = (_event /* eslint-disable-line no-unused-vars */) => { + const mouseMoveEvent = (event) => { const now = Date.now(); if (now - lastMoveTime < THROTTLE_MS) { // throttle κΈ°κ°„ λ‚΄μ—λŠ” hideCursor만 μž¬μ‹œμž‘ @@ -789,7 +787,9 @@ function AppBase(_props /* eslint-disable-line no-unused-vars */) { let userDataChanged = false; if (JSON.stringify(loginUserDataRef.current) !== JSON.stringify(loginUserData)) { userDataChanged = true; -} else if (userDataChanged || httpHeaderRef.current === null) { + } + if (!httpHeader || !deviceId) { + } else if (userDataChanged || httpHeaderRef.current === null) { //계정정보 λ³€κ²½μ‹œ λ˜λŠ” 초기 λ‘œλ”©μ‹œ if (!httpHeader) { dispatch( diff --git a/com.twin.app.shoptime/src/actions/commonActions.js b/com.twin.app.shoptime/src/actions/commonActions.js index 3f614cf6..64132cf1 100644 --- a/com.twin.app.shoptime/src/actions/commonActions.js +++ b/com.twin.app.shoptime/src/actions/commonActions.js @@ -122,7 +122,7 @@ export const alertToast = (payload) => (dispatch) => { } }; -export const getSystemSettings = () => (dispatch) => { +export const getSystemSettings = () => (dispatch, getState) => { dlog('getSystemSettings '); lunaSend.getSystemSettings( { category: 'caption', keys: ['captionEnable'] }, @@ -146,7 +146,7 @@ export const getSystemSettings = () => (dispatch) => { ); }; -export const getHttpHeaderForServiceRequest = () => (dispatch, getState) => { +export const getHttpHeaderForServiceRequest = (onComplete) => (dispatch, getState) => { dlog('getHttpHeaderForServiceRequest '); const { serverType, ricCodeSetting, languageSetting } = getState().localSettings; lunaSend.getHttpHeaderForServiceRequest({ @@ -285,7 +285,7 @@ export const getHttpHeaderForServiceRequest = () => (dispatch, getState) => { }); }; -export const getDeviceId = (onComplete) => (dispatch) => { +export const getDeviceId = (onComplete) => (dispatch, getState) => { lunaSend.getDeviceId( { idType: ['LGUDID'] }, { @@ -463,7 +463,7 @@ export const setFocus = (spotlightId) => ({ payload: spotlightId, }); -export const focusElement = (spotlightId) => (dispatch) => { +export const focusElement = (spotlightId) => (dispatch, getState) => { dispatch(setFocus(spotlightId)); if (typeof window === 'object') { @@ -485,7 +485,7 @@ export const cancelFocusElement = () => () => { let broadcastTimer = null; export const sendBroadCast = ({ type, moreInfo }) => - (dispatch) => { + (dispatch, getState) => { clearTimeout(broadcastTimer); dispatch(changeBroadcastEvent({ type, moreInfo })); broadcastTimer = setTimeout(() => { @@ -542,7 +542,7 @@ export const addReservation = (data) => (dispatch) => { }); }; -export const deleteReservationCallback = (scheduleIdList) => () => { +export const deleteReservationCallback = (scheduleIdList) => (dispatch) => { lunaSend.deleteReservationCallback(scheduleIdList, { onSuccess: (res) => { // dispatch(alertToast("success" + JSON.stringify(res))); @@ -680,7 +680,7 @@ let updateNetworkStateJob = new Job((dispatch, connected) => { dispatch(changeAppStatus({ isInternetConnected: connected })); }); -export const getConnectionStatus = () => (dispatch) => { +export const getConnectionStatus = () => (dispatch, getState) => { lunaSend.getConnectionStatus({ onSuccess: (res) => { dlog('lunasend getConnectionStatus', res); @@ -709,7 +709,7 @@ export const getConnectionStatus = () => (dispatch) => { }; // macAddress -export const getConnectionInfo = () => (dispatch) => { +export const getConnectionInfo = () => (dispatch, getState) => { lunaSend.getConnectionInfo({ onSuccess: (res) => { dlog('lunasend getConnectionStatus', res); @@ -731,7 +731,7 @@ export const getConnectionInfo = () => (dispatch) => { }); }; -export const disableNotification = () => { +export const disableNotification = () => (dispatch, getState) => { lunaSend.disableNotification({ onSuccess: (res) => { dlog('lunasend disable notification success', res); @@ -745,7 +745,7 @@ export const disableNotification = () => { }); }; -export const enableNotification = () => { +export const enableNotification = () => (dispatch, getState) => { lunaSend.enableNotification({ onSuccess: (res) => { dlog('lunasend enable notification success', res);