Make sure PushController only deals with Push accounts
We could end up with a non-Push-capable account that has `folderPushMode` set to something other than `NONE` due to missing checks in the settings import code. See issue
@@ -174,9 +174,10 @@ class PushController internal constructor(
}
private fun getPushAccounts(): List<Account> {
- return preferences.accounts.filter { it.folderPushMode != FolderMode.NONE }
+ return preferences.accounts.filter { account ->
+ account.folderPushMode != FolderMode.NONE && backendManager.getBackend(account).isPushCapable
+ }
}
-
private fun setPushNotificationState(notificationState: PushNotificationState) {
pushNotificationManager.notificationState = notificationState
}
