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);