From dccd09debfe39272d6e42a0b4f5a1f639c3c0bcc Mon Sep 17 00:00:00 2001 From: KMY Date: Sun, 27 Aug 2023 14:13:08 +0900 Subject: [PATCH] Fix push-subscription settings when using pc and phone --- .../features/notifications/components/column_settings.jsx | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/app/javascript/mastodon/features/notifications/components/column_settings.jsx b/app/javascript/mastodon/features/notifications/components/column_settings.jsx index 3a8bd6943f..f9c734c18f 100644 --- a/app/javascript/mastodon/features/notifications/components/column_settings.jsx +++ b/app/javascript/mastodon/features/notifications/components/column_settings.jsx @@ -29,7 +29,12 @@ export default class ColumnSettings extends PureComponent { }; onPushChange = (path, checked) => { - this.props.onChange(['push', ...path], checked); + const { pushSettings } = this.props; + const showPushSettings = pushSettings.get('browserSupport') && pushSettings.get('isSubscribed'); + + if (showPushSettings) { + this.props.onChange(['push', ...path], checked); + } }; render () {