Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 63ba1f69 authored by cketti's avatar cketti
Browse files

Increase number of active notification to 9

This way users can know that when the number 9 is displayed in the group summary, there's more notifications than the 8 they can currently see.
parent 0d24dcd2
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -3,7 +3,7 @@ package com.fsck.k9.notification
import com.fsck.k9.Account
import com.fsck.k9.controller.MessageReference

internal const val MAX_NUMBER_OF_NEW_MESSAGE_NOTIFICATIONS = 8
internal const val MAX_NUMBER_OF_NEW_MESSAGE_NOTIFICATIONS = 9

/**
 * Stores information about new message notifications for all accounts.
+6 −3
Original line number Diff line number Diff line
@@ -52,8 +52,9 @@ class NotificationDataStoreTest : RobolectricTest() {
        notificationDataStore.addNotification(account, createNotificationContent("6"), TIMESTAMP)
        notificationDataStore.addNotification(account, createNotificationContent("7"), TIMESTAMP)
        notificationDataStore.addNotification(account, createNotificationContent("8"), TIMESTAMP)
        notificationDataStore.addNotification(account, createNotificationContent("9"), TIMESTAMP)

        val result = notificationDataStore.addNotification(account, createNotificationContent("9"), TIMESTAMP)
        val result = notificationDataStore.addNotification(account, createNotificationContent("10"), TIMESTAMP)

        assertNotNull(result)
        assertThat(result.shouldCancelNotification).isTrue()
@@ -86,7 +87,8 @@ class NotificationDataStoreTest : RobolectricTest() {
        notificationDataStore.addNotification(account, createNotificationContent("7"), TIMESTAMP)
        notificationDataStore.addNotification(account, createNotificationContent("8"), TIMESTAMP)
        notificationDataStore.addNotification(account, createNotificationContent("9"), TIMESTAMP)
        val latestContent = createNotificationContent("10")
        notificationDataStore.addNotification(account, createNotificationContent("10"), TIMESTAMP)
        val latestContent = createNotificationContent("11")
        notificationDataStore.addNotification(account, latestContent, TIMESTAMP)

        val result = notificationDataStore.removeNotifications(account) { listOf(latestContent.messageReference) }
@@ -207,7 +209,8 @@ class NotificationDataStoreTest : RobolectricTest() {
        notificationDataStore.addNotification(account, createNotificationContent("6"), TIMESTAMP)
        notificationDataStore.addNotification(account, createNotificationContent("7"), TIMESTAMP)
        notificationDataStore.addNotification(account, createNotificationContent("8"), TIMESTAMP)
        val latestNotificationContent = createNotificationContent("9")
        notificationDataStore.addNotification(account, createNotificationContent("9"), TIMESTAMP)
        val latestNotificationContent = createNotificationContent("10")
        notificationDataStore.addNotification(account, latestNotificationContent, TIMESTAMP)
        val content = createNotificationContent("1")