mirror of
https://github.com/vitorpamplona/amethyst.git
synced 2024-09-30 00:40:49 +00:00
Pruning file storage events when pausing the app.
This commit is contained in:
parent
d4a3ee2651
commit
1596a7b559
@ -72,6 +72,7 @@ object ServiceManager {
|
||||
LocalCache.pruneOldAndHiddenMessages(it)
|
||||
LocalCache.pruneHiddenMessages(it)
|
||||
LocalCache.pruneContactLists(it)
|
||||
LocalCache.pruneFileStorageEvents(it)
|
||||
// LocalCache.pruneNonFollows(it)
|
||||
}
|
||||
}
|
||||
|
@ -750,7 +750,11 @@ object LocalCache {
|
||||
}
|
||||
|
||||
fun pruneFileStorageEvents(account: Account) {
|
||||
notes.filter { it.value.event is FileStorageEvent }
|
||||
val toBeRemoved = notes.filter { it.value.event is FileStorageEvent }
|
||||
|
||||
toBeRemoved.forEach {
|
||||
notes.remove(it.key)
|
||||
}
|
||||
}
|
||||
|
||||
fun pruneOldAndHiddenMessages(account: Account) {
|
||||
|
Loading…
Reference in New Issue
Block a user