@ -80,9 +80,7 @@ class OtherConfigFragment : PreferenceFragmentCompat(),
}
PreferKey.cleanCache -> {
BookHelp.clearCache()
requireActivity().cacheDir.listFiles()?.forEach {
FileUtils.deleteFile(requireActivity().cacheDir.absolutePath)
it.delete()
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 {
FileUtils.deleteFile(FileUtils.getPath(context.cacheDir, "Fonts"))
if (it.exists()) {