From 4f7cdcce5568dc8973a42d837e49d9b1d966f2b0 Mon Sep 17 00:00:00 2001 From: Tobi Date: Fri, 15 Oct 2021 20:22:12 +0200 Subject: [PATCH] Update app/src/main/java/org/schabi/newpipe/fragments/list/channel/ChannelFragment.java Co-authored-by: litetex <40789489+litetex@users.noreply.github.com> --- .../newpipe/fragments/list/channel/ChannelFragment.java | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/app/src/main/java/org/schabi/newpipe/fragments/list/channel/ChannelFragment.java b/app/src/main/java/org/schabi/newpipe/fragments/list/channel/ChannelFragment.java index 8ed6b5149..752b05d5a 100644 --- a/app/src/main/java/org/schabi/newpipe/fragments/list/channel/ChannelFragment.java +++ b/app/src/main/java/org/schabi/newpipe/fragments/list/channel/ChannelFragment.java @@ -400,17 +400,16 @@ public class ChannelFragment extends BaseListInfoFragment if (menuNotifyButton == null) { return; } - if (subscription == null) { - menuNotifyButton.setVisible(false); - } else { + if (subscription != null) { menuNotifyButton.setEnabled( NotificationHelper.isNewStreamsNotificationsEnabled(requireContext()) ); menuNotifyButton.setChecked( - subscription.getNotificationMode() != NotificationMode.DISABLED + subscription.getNotificationMode() == NotificationMode.ENABLED ); - menuNotifyButton.setVisible(true); } + + menuNotifyButton.setVisible(subscription != null); } private void setNotify(final boolean isEnabled) {