Remove obsolete
This commit is contained in:
1 parent
e1de57c98c
commit
769308c9f0
2 files changed
-26
No files matched your search
@@ -51,7 +51,6 @@ import com.hippo.ehviewer.download.DownloadsFilterMode
|
||||
import com.hippo.ehviewer.ktbuilder.diskCache
|
||||
import com.hippo.ehviewer.ktbuilder.imageLoader
|
||||
import com.hippo.ehviewer.ktor.Cronet
|
||||
import com.hippo.ehviewer.legacy.cleanObsoleteCache
|
||||
import com.hippo.ehviewer.ui.keepNoMediaFileStatus
|
||||
import com.hippo.ehviewer.ui.lockObserver
|
||||
import com.hippo.ehviewer.ui.screen.detailCache
|
||||
@@ -136,9 +135,6 @@ class EhApplication :
|
||||
checkDawn()
|
||||
}
|
||||
}
|
||||
launch {
|
||||
cleanObsoleteCache()
|
||||
}
|
||||
}
|
||||
if (BuildConfig.DEBUG) {
|
||||
StrictMode.enableDefaults()
|
||||
|
||||
@@ -1,22 +0,0 @@
|
||||
package com.hippo.ehviewer.legacy
|
||||
|
||||
import java.io.File
|
||||
import splitties.init.appCtx
|
||||
|
||||
private val OBSOLETE_CACHE_DIRS = arrayOf(
|
||||
"image",
|
||||
"thumb",
|
||||
"gallery_image",
|
||||
"spider_info",
|
||||
)
|
||||
|
||||
fun cleanObsoleteCache() {
|
||||
appCtx.deleteDatabase("hosts.db")
|
||||
val dir = appCtx.cacheDir
|
||||
for (subdir in OBSOLETE_CACHE_DIRS) {
|
||||
val file = File(dir, subdir)
|
||||
if (file.exists()) {
|
||||
file.deleteRecursively()
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user