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

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

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
Change-Id: Ie2f489acca973c0aebbd8e7d8fc7fbef2bac793f
parent acf1151d
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -22,7 +22,9 @@ class NotificationInteractionTracker @Inject constructor(
        entryManager.addCollectionListener(this)
    }

    fun hasUserInteractedWith(key: String): Boolean = key in interactions
    fun hasUserInteractedWith(key: String): Boolean {
        return interactions[key] ?: false
    }

    override fun onEntryAdded(entry: NotificationEntry) {
        interactions[entry.key] = false