Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -233,9 +233,9 @@ internal class NotificationGenerationProcessor(
// Notification channel disable or not displayed
// save notification as dismissed to avoid user re-enabling channel and notification being displayed due to restore
markNotificationAsDismissed(notificationJob)
return
}

// Always call notificationReceived, regardless of wasDisplayed
_lifecycleService.notificationReceived(notificationJob)
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -168,6 +168,10 @@ class NotificationGenerationProcessorTests : FunSpec({
mocks.notificationGenerationProcessor.processNotificationData(mocks.context, 1, mocks.notificationPayload, false, 1111)

// Then
// notificationReceived should be called
coVerify(exactly = 1) {
mocks.notificationLifecycleService.notificationReceived(any())
}
}

test("processNotificationData should display notification when external callback takes longer than 30 seconds") {
Expand Down Expand Up @@ -209,6 +213,10 @@ class NotificationGenerationProcessorTests : FunSpec({
mocks.notificationGenerationProcessor.processNotificationData(mocks.context, 1, mocks.notificationPayload, false, 1111)

// Then
// notificationReceived should be called
coVerify(exactly = 1) {
mocks.notificationLifecycleService.notificationReceived(any())
}
}

test("processNotificationData should display notification when foreground callback takes longer than 30 seconds") {
Expand Down