DO NOT MERGE: Fix interaction tracking logic
Tried to put a clever kotlin-ism there, but then the interaction tracker was returning `true` for every notification because it only checked if the key existed Test: manual Bug: 144324894 Bug: 119041698 Change-Id: Ie2f489acca973c0aebbd8e7d8fc7fbef2bac793f
This commit is contained in:
@@ -23,7 +23,9 @@ class NotificationInteractionTracker @Inject constructor(
|
||||
entryManager.addNotificationEntryListener(this)
|
||||
}
|
||||
|
||||
fun hasUserInteractedWith(key: String): Boolean = key in interactions
|
||||
fun hasUserInteractedWith(key: String): Boolean {
|
||||
return interactions[key] ?: false
|
||||
}
|
||||
|
||||
override fun onNotificationAdded(entry: NotificationEntry) {
|
||||
interactions[entry.key] = false
|
||||
|
||||
Reference in New Issue
Block a user