mirror of
https://github.com/vitorpamplona/amethyst.git
synced 2025-03-30 12:36:00 +02:00
Deleting awards cache.
This commit is contained in:
parent
0986698c4b
commit
30e2070b89
@ -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)
|
||||
|
@ -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()
|
||||
|
Loading…
x
Reference in New Issue
Block a user