From 9aab727e1dc90600e3573000e766054b8155f726 Mon Sep 17 00:00:00 2001 From: Shinokuni Date: Sat, 25 Jul 2020 15:28:51 +0200 Subject: [PATCH] Fix feeds permissions switch state bug --- .../readrops/app/activities/NotificationPermissionActivity.kt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/src/main/java/com/readrops/app/activities/NotificationPermissionActivity.kt b/app/src/main/java/com/readrops/app/activities/NotificationPermissionActivity.kt index eedd6171..511de722 100644 --- a/app/src/main/java/com/readrops/app/activities/NotificationPermissionActivity.kt +++ b/app/src/main/java/com/readrops/app/activities/NotificationPermissionActivity.kt @@ -115,7 +115,8 @@ class NotificationPermissionActivity : AppCompatActivity() { * do not execute the request as it would be pointless */ private fun canUpdateAllFeedsPermissions(isChecked: Boolean): Boolean { - return !isFirstCheck && (!feedStateChanged || (isChecked && !feeds.all { it.isNotificationEnabled })) + return (!isFirstCheck || !feeds.all { it.isNotificationEnabled }) && + (!feedStateChanged || (isChecked && !feeds.all { it.isNotificationEnabled })) } private fun displayAutoSynchroPopup() {