Deleting awards cache.

This commit is contained in:
Vitor Pamplona 2023-03-09 08:47:16 -05:00
parent 0986698c4b
commit 30e2070b89
2 changed files with 0 additions and 20 deletions

View File

@ -305,11 +305,6 @@ object LocalCache {
it.addTaggedPost(note)
}
// Counts the replies
awardees.forEach {
it.addBadgeAward(note)
}
// Replies of an Badge Definition are Award Events
awardDefinition.forEach {
it.addReply(note)

View File

@ -60,9 +60,6 @@ class User(val pubkeyHex: String) {
var privateChatrooms = mapOf<User, Chatroom>()
private set
var badgeAwards = setOf<Note>()
private set
var acceptedBadges: AddressableNote? = null
fun pubkey() = Hex.decode(pubkeyHex)
@ -185,18 +182,6 @@ class User(val pubkeyHex: String) {
}
}
fun addBadgeAward(note: Note) {
if (note !in badgeAwards) {
badgeAwards = badgeAwards + note
liveSet?.badges?.invalidateData()
}
}
fun removeBadgeAward(deleteNote: Note) {
badgeAwards = badgeAwards - deleteNote
liveSet?.badges?.invalidateData()
}
fun updateAcceptedBadges(note: AddressableNote) {
acceptedBadges = note
liveSet?.badges?.invalidateData()