mirror of
https://github.com/vitorpamplona/amethyst.git
synced 2025-06-28 20:10:53 +02:00
Fixes bug of messages not reappearing after memory trimming.
This commit is contained in:
parent
72dff060d2
commit
0da031fae4
@ -142,6 +142,8 @@ object ServiceManager {
|
|||||||
|
|
||||||
account?.let {
|
account?.let {
|
||||||
LocalCache.pruneOldAndHiddenMessages(it)
|
LocalCache.pruneOldAndHiddenMessages(it)
|
||||||
|
NostrChatroomDataSource.clearEOSEs(it)
|
||||||
|
|
||||||
LocalCache.pruneHiddenMessages(it)
|
LocalCache.pruneHiddenMessages(it)
|
||||||
LocalCache.pruneContactLists(accounts)
|
LocalCache.pruneContactLists(accounts)
|
||||||
LocalCache.pruneRepliesAndReactions(accounts)
|
LocalCache.pruneRepliesAndReactions(accounts)
|
||||||
|
@ -56,6 +56,10 @@ object NostrChatroomDataSource : NostrDataSource("ChatroomFeed") {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
fun clearEOSEs(account: Account) {
|
||||||
|
latestEOSEs.removeDataFor(account.userProfile())
|
||||||
|
}
|
||||||
|
|
||||||
val inandoutChannel = requestNewChannel { time, relayUrl ->
|
val inandoutChannel = requestNewChannel { time, relayUrl ->
|
||||||
latestEOSEs.addOrUpdate(account.userProfile(), withRoom.hashCode().toString(), relayUrl, time)
|
latestEOSEs.addOrUpdate(account.userProfile(), withRoom.hashCode().toString(), relayUrl, time)
|
||||||
}
|
}
|
||||||
|
@ -43,4 +43,8 @@ class EOSEAccount(var users: Map<User, EOSEFollowList> = emptyMap()) {
|
|||||||
followList.addOrUpdate(listCode, relayUrl, time)
|
followList.addOrUpdate(listCode, relayUrl, time)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
fun removeDataFor(user: User) {
|
||||||
|
users = users.minus(user)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user