Stop removing the logs dir when clearing cache (#6765)

This commit is contained in:
Jorge Martin Espinosa 2026-05-11 16:55:40 +02:00 committed by GitHub
parent 90ce30d6e7
commit 1ffc09e046
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -55,7 +55,12 @@ class DefaultClearCacheUseCase(
// Clear OkHttp cache
okHttpClient().cache?.delete()
// Clear app cache
context.cacheDir.deleteRecursively()
context.cacheDir?.listFiles {
// But keep the logs
it.name != "logs"
}?.onEach {
it.deleteRecursively()
}
// Clear some settings
seenInvitesStore.clear()
// Ensure any error will be displayed again