Просмотр исходного кода

Improve WebPushEnabled conditional display

nimbleghost 2 лет назад
Родитель
Сommit
e2120bc66d
1 измененных файлов с 1 добавлено и 5 удалено
  1. 1 5
      web/src/components/Preferences.jsx

+ 1 - 5
web/src/components/Preferences.jsx

@@ -86,7 +86,7 @@ const Notifications = () => {
         <Sound />
         <MinPriority />
         <DeleteAfter />
-        {config.enable_web_push && <WebPushEnabled />}
+        {notifier.pushPossible() && <WebPushEnabled />}
       </PrefGroup>
     </Card>
   );
@@ -242,10 +242,6 @@ const WebPushEnabled = () => {
     await prefs.setWebPushEnabled(ev.target.value);
   };
 
-  if (!notifier.pushPossible()) {
-    return null;
-  }
-
   return (
     <Pref
       labelId={labelId}