Fix feeds permissions switch state bug

This commit is contained in:
Shinokuni 2020-07-25 15:28:51 +02:00
parent dee7f6e9ad
commit 9aab727e1d
1 changed files with 2 additions and 1 deletions

View File

@ -115,7 +115,8 @@ class NotificationPermissionActivity : AppCompatActivity() {
* do not execute the request as it would be pointless * do not execute the request as it would be pointless
*/ */
private fun canUpdateAllFeedsPermissions(isChecked: Boolean): Boolean { 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() { private fun displayAutoSynchroPopup() {