diff --git a/lib/notifications/display.dart b/lib/notifications/display.dart index acbf15012a..54e8d18c19 100644 --- a/lib/notifications/display.dart +++ b/lib/notifications/display.dart @@ -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, ); } diff --git a/test/notifications/display_test.dart b/test/notifications/display_test.dart index 907ab3991f..5c352123d3 100644 --- a/test/notifications/display_test.dart +++ b/test/notifications/display_test.dart @@ -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() ]); }