Pruning file storage events when pausing the app.
This commit is contained in:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user