- 안드로이드,IOS 구별 삭제 일괄 메서드로 수정
This commit is contained in:
@@ -253,20 +253,16 @@ export const SettingPage = () => {
|
|||||||
callAppAlarmFind();
|
callAppAlarmFind();
|
||||||
checkPushNotificationStatus();
|
checkPushNotificationStatus();
|
||||||
loadLoginType();
|
loadLoginType();
|
||||||
loadNotificationSetting();
|
|
||||||
loadLanguage();
|
|
||||||
|
|
||||||
// 앱이 포어그라운드로 돌아올 때 푸시 알림 권한 상태 재확인
|
// 앱이 포어그라운드로 돌아올 때 푸시 알림 권한 상태 재확인
|
||||||
const handleVisibilityChange = () => {
|
const handleVisibilityChange = () => {
|
||||||
if (document.visibilityState === 'visible') {
|
if (document.visibilityState === 'visible') {
|
||||||
checkPushNotificationStatus();
|
checkPushNotificationStatus();
|
||||||
loadNotificationSetting();
|
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
const handleFocus = () => {
|
const handleFocus = () => {
|
||||||
checkPushNotificationStatus();
|
checkPushNotificationStatus();
|
||||||
loadNotificationSetting();
|
|
||||||
};
|
};
|
||||||
|
|
||||||
document.addEventListener('visibilitychange', handleVisibilityChange);
|
document.addEventListener('visibilitychange', handleVisibilityChange);
|
||||||
@@ -276,7 +272,7 @@ export const SettingPage = () => {
|
|||||||
document.removeEventListener('visibilitychange', handleVisibilityChange);
|
document.removeEventListener('visibilitychange', handleVisibilityChange);
|
||||||
window.removeEventListener('focus', handleFocus);
|
window.removeEventListener('focus', handleFocus);
|
||||||
};
|
};
|
||||||
}, [callAppAlarmFind, checkPushNotificationStatus, loadLoginType, loadNotificationSetting, loadLanguage]);
|
}, [callAppAlarmFind, checkPushNotificationStatus, loadLoginType]);
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
@@ -288,7 +284,7 @@ export const SettingPage = () => {
|
|||||||
<label className="settings-switch" >
|
<label className="settings-switch" >
|
||||||
<input
|
<input
|
||||||
type="checkbox"
|
type="checkbox"
|
||||||
checked={isAndroid ? notificationSetting : pushNotificationEnabled}
|
checked={pushNotificationEnabled}
|
||||||
readOnly
|
readOnly
|
||||||
onClick={(e) => {
|
onClick={(e) => {
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
|
|||||||
Reference in New Issue
Block a user