Skip to content

Commit

Permalink
Merge pull request #6840 from thundernest/increase_notification_limit
Browse files Browse the repository at this point in the history
Increase number of active notifications to 9
  • Loading branch information
cketti authored Apr 24, 2023
2 parents 9f9062e + 63ba1f6 commit ae2e34a
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down Expand Up @@ -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) }
Expand Down Expand Up @@ -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")

Expand Down

0 comments on commit ae2e34a

Please sign in to comment.