Remove webPushDefaultEnabled

This commit is contained in:
nimbleghost 2023-06-07 20:36:20 +02:00
parent 46f34ca1e3
commit 03aa67ed68
6 changed files with 8 additions and 80 deletions

View file

@ -169,7 +169,7 @@ export const SubscriptionPopup = (props) => {
return (
<>
<PopupMenu horizontal={placement} anchorEl={props.anchor} open={!!props.anchor} onClose={props.onClose}>
<NotificationToggle subscription={subscription} />
{notifier.pushPossible() && <NotificationToggle subscription={subscription} />}
<Divider />
<MenuItem onClick={handleChangeDisplayName}>
<ListItemIcon>
@ -367,18 +367,12 @@ const NotificationToggle = ({ subscription }) => {
}
return (
<>
{notifier.pushPossible() && (
<>
<MenuItem>
{subscription.webPushEnabled === 1 && checkedItem}
<ListItemText inset={subscription.webPushEnabled !== 1} onClick={handleToggleBackground}>
{t("notification_toggle_background")}
</ListItemText>
</MenuItem>
</>
)}
</>
<MenuItem>
{subscription.webPushEnabled === 1 && checkedItem}
<ListItemText inset={subscription.webPushEnabled !== 1} onClick={handleToggleBackground}>
{t("notification_toggle_background")}
</ListItemText>
</MenuItem>
);
};