@ -80,9 +80,7 @@ class OtherConfigFragment : PreferenceFragmentCompat(),
}
PreferKey.cleanCache -> {
BookHelp.clearCache()
requireActivity().cacheDir.listFiles()?.forEach {
it.delete()
FileUtils.deleteFile(requireActivity().cacheDir.absolutePath)
toast(R.string.clear_cache_success)
PreferKey.defaultCover -> {
@ -81,11 +81,7 @@ class MainViewModel(application: Application) : BaseViewModel(application) {
fun postLoad() {
execute {
FileUtils.getDirFile(context.cacheDir, "Fonts").let {
if (it.exists()) {
FileUtils.deleteFile(FileUtils.getPath(context.cacheDir, "Fonts"))