Skip to content

notif: Enable autoCancel flag for summary notification #755

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Jun 20, 2024
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
6 changes: 6 additions & 0 deletions lib/notifications/display.dart
Original file line number Diff line number Diff line change
Expand Up @@ -158,6 +158,12 @@ class NotificationDisplayManager {
inboxStyle: InboxStyle(
// TODO(#570) Show organization name, not URL
summaryText: data.realmUri.toString()),

// On Android 11 and lower, if autoCancel is not specified,
// the summary notification may linger even after all child
// notifications have been opened and cleared.
// TODO(android-12): cut this autoCancel workaround
autoCancel: true,
);
}

Expand Down
2 changes: 1 addition & 1 deletion test/notifications/display_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ void main() {
..isGroupSummary.equals(true)
..inboxStyle.which((it) => it.isNotNull()
..summaryText.equals(data.realmUri.toString()))
..autoCancel.isNull()
..autoCancel.equals(true)
..contentIntent.isNull()
]);
}
Expand Down
Loading