From 0eb5a3176b27b9e852a6b56bd336d79776c8f9a5 Mon Sep 17 00:00:00 2001 From: arkon Date: Sun, 24 Apr 2022 09:42:26 -0400 Subject: [PATCH] Delete entire app_webview folder when clearing WebView data (cherry picked from commit 6e95fde4ece64e5959c04bb4b7fb69299ef37ca5) --- .../kanade/tachiyomi/ui/setting/SettingsAdvancedController.kt | 2 ++ 1 file changed, 2 insertions(+) diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/setting/SettingsAdvancedController.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/setting/SettingsAdvancedController.kt index e94d6be088..594ae3894a 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/ui/setting/SettingsAdvancedController.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/ui/setting/SettingsAdvancedController.kt @@ -48,6 +48,7 @@ import eu.kanade.tachiyomi.util.system.toast import logcat.LogPriority import rikka.sui.Sui import uy.kohesive.injekt.injectLazy +import java.io.File import eu.kanade.tachiyomi.data.preference.PreferenceKeys as Keys class SettingsAdvancedController : SettingsController() { @@ -301,6 +302,7 @@ class SettingsAdvancedController : SettingsController() { webview.clearHistory() webview.clearSslPreferences() WebStorage.getInstance().deleteAllData() + activity?.applicationInfo?.dataDir?.let { File("$it/app_webview/").deleteRecursively() } activity?.toast(R.string.webview_data_deleted) } catch (e: Throwable) { logcat(LogPriority.ERROR, e)