Skip to content

Commit

Permalink
Update summary notification for any notificationId
Browse files Browse the repository at this point in the history
There's no guarantee that the hash of the string id is greater than 0.

Signed-off-by: mueller-ma <[email protected]>
  • Loading branch information
mueller-ma committed Jul 8, 2024
1 parent cc6b072 commit 22160a6
Showing 1 changed file with 1 addition and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,7 @@ import org.openhab.habdroid.core.NotificationHelper.Companion.NOTIFICATION_ID_EX
class NotificationDismissedReceiver : BroadcastReceiver() {
override fun onReceive(context: Context, intent: Intent) {
Log.d(TAG, "onReceive(): $intent")
val notificationId = intent.getIntExtra(NOTIFICATION_ID_EXTRA, -1)
if (notificationId < 0) {
return
}
val notificationId = intent.getIntExtra(NOTIFICATION_ID_EXTRA, 0)
Log.d(TAG, "Dismissed notification $notificationId")
NotificationHelper(context).updateGroupNotification()
}
Expand Down

0 comments on commit 22160a6

Please sign in to comment.