Delete regular data cache on logout.

This commit is contained in:
Antoine POPINEAU 2020-06-21 18:51:22 +02:00
parent bab7040b8f
commit 3a88e02ca0
No known key found for this signature in database
GPG Key ID: A78AC64694F84063
1 changed files with 6 additions and 0 deletions

View File

@ -78,6 +78,12 @@ class Otter : Application() {
fun deleteAllData() {
PowerPreference.getFileByName(AppContext.PREFS_CREDENTIALS).clear()
cacheDir.listFiles()?.forEach {
it.delete()
}
cacheDir.resolve("picasso-cache").deleteRecursively()
exoDownloadManager.removeAllDownloads()
}