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