Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 0e2acaf0 authored by Evan Laird's avatar Evan Laird
Browse files

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
parent 6dc09419
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -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