Removes the need to track EOSE at the base user class

This commit is contained in:
Vitor Pamplona
2025-05-13 14:47:20 -04:00
parent 466f52245b
commit 0e68031227
2 changed files with 0 additions and 10 deletions
@@ -2382,21 +2382,18 @@ object LocalCache : ILocalCache {
noteEvent.zappedAuthor().forEach {
val author = getUserIfExists(it)
author?.removeZap(note)
author?.clearEOSE()
}
}
if (noteEvent is LnZapRequestEvent) {
noteEvent.zappedAuthor().mapNotNull {
val author = getUserIfExists(it)
author?.removeZap(note)
author?.clearEOSE()
}
}
if (noteEvent is ReportEvent) {
noteEvent.reportedAuthor().mapNotNull {
val author = getUserIfExists(it.pubkey)
author?.removeReport(note)
author?.clearEOSE()
}
}
@@ -26,7 +26,6 @@ import com.vitorpamplona.amethyst.service.checkNotInMainThread
import com.vitorpamplona.amethyst.ui.note.toShortenHex
import com.vitorpamplona.ammolite.relays.BundledUpdate
import com.vitorpamplona.ammolite.relays.RelayBriefInfoCache.RelayBriefInfo
import com.vitorpamplona.ammolite.relays.filters.EOSETime
import com.vitorpamplona.quartz.lightning.Lud06
import com.vitorpamplona.quartz.nip01Core.core.HexKey
import com.vitorpamplona.quartz.nip01Core.metadata.MetadataEvent
@@ -67,8 +66,6 @@ class User(
var reports = mapOf<User, Set<Note>>()
private set
var latestEOSEs: Map<String, EOSETime> = emptyMap()
var zaps = mapOf<Note, Note?>()
private set
@@ -127,10 +124,6 @@ class User(
flowSet?.bookmarks?.invalidateData()
}
fun clearEOSE() {
latestEOSEs = emptyMap()
}
fun updateContactList(event: ContactListEvent) {
if (event.id == latestContactList?.id) return