allowing the first notification for each child of the group to vibrate/make a sound

- by having the group and child notifications alert once we can safetly always update the group and get consistent alertOnce behaviour
This commit is contained in:
Adam Brown 2021-10-13 18:42:02 +01:00
parent 99de9d4a4f
commit 64c532e54b

View file

@ -561,7 +561,7 @@ class NotificationUtils @Inject constructor(private val context: Context,
// TODO Group should be current user display name
.setGroup(stringProvider.getString(R.string.app_name))
// In order to avoid notification making sound twice (due to the summary notification)
.setGroupAlertBehavior(NotificationCompat.GROUP_ALERT_SUMMARY)
.setGroupAlertBehavior(NotificationCompat.GROUP_ALERT_ALL)
.setSmallIcon(smallIcon)
// Set primary color (important for Wear 2.0 Notifications).
.setColor(accentColor)
@ -644,7 +644,7 @@ class NotificationUtils @Inject constructor(private val context: Context,
.setContentTitle(stringProvider.getString(R.string.app_name))
.setContentText(inviteNotifiableEvent.description)
.setGroup(stringProvider.getString(R.string.app_name))
.setGroupAlertBehavior(NotificationCompat.GROUP_ALERT_SUMMARY)
.setGroupAlertBehavior(NotificationCompat.GROUP_ALERT_ALL)
.setSmallIcon(smallIcon)
.setColor(accentColor)
.apply {
@ -708,7 +708,7 @@ class NotificationUtils @Inject constructor(private val context: Context,
.setContentTitle(stringProvider.getString(R.string.app_name))
.setContentText(simpleNotifiableEvent.description)
.setGroup(stringProvider.getString(R.string.app_name))
.setGroupAlertBehavior(NotificationCompat.GROUP_ALERT_SUMMARY)
.setGroupAlertBehavior(NotificationCompat.GROUP_ALERT_ALL)
.setSmallIcon(smallIcon)
.setColor(accentColor)
.setAutoCancel(true)