Loading app/core/src/main/java/com/fsck/k9/notification/NotificationChannelUtils.kt +8 −5 Original line number Diff line number Diff line Loading @@ -9,6 +9,7 @@ import android.os.Build import android.support.annotation.RequiresApi import com.fsck.k9.Account import com.fsck.k9.Preferences import java.util.concurrent.Executors class NotificationChannelUtils(private val context: Context, private val preferences: Preferences) { Loading @@ -21,12 +22,14 @@ class NotificationChannelUtils(private val context: Context, private val prefere return } Executors.newSingleThreadExecutor().execute { val notificationManager = context.getSystemService(Context.NOTIFICATION_SERVICE) as NotificationManager val accounts = preferences.accounts removeChannelsForNonExistingOrChangedAccounts(notificationManager, accounts) addChannelsForAccounts(notificationManager, accounts) } } Loading Loading
app/core/src/main/java/com/fsck/k9/notification/NotificationChannelUtils.kt +8 −5 Original line number Diff line number Diff line Loading @@ -9,6 +9,7 @@ import android.os.Build import android.support.annotation.RequiresApi import com.fsck.k9.Account import com.fsck.k9.Preferences import java.util.concurrent.Executors class NotificationChannelUtils(private val context: Context, private val preferences: Preferences) { Loading @@ -21,12 +22,14 @@ class NotificationChannelUtils(private val context: Context, private val prefere return } Executors.newSingleThreadExecutor().execute { val notificationManager = context.getSystemService(Context.NOTIFICATION_SERVICE) as NotificationManager val accounts = preferences.accounts removeChannelsForNonExistingOrChangedAccounts(notificationManager, accounts) addChannelsForAccounts(notificationManager, accounts) } } Loading