mirror of
https://github.com/mihonapp/mihon.git
synced 2024-11-07 20:31:02 -05:00
Delete entire app_webview folder when clearing WebView data
(cherry picked from commit 6e95fde4ec
)
This commit is contained in:
parent
867a5a3ea0
commit
0eb5a3176b
1 changed files with 2 additions and 0 deletions
|
@ -48,6 +48,7 @@ import eu.kanade.tachiyomi.util.system.toast
|
||||||
import logcat.LogPriority
|
import logcat.LogPriority
|
||||||
import rikka.sui.Sui
|
import rikka.sui.Sui
|
||||||
import uy.kohesive.injekt.injectLazy
|
import uy.kohesive.injekt.injectLazy
|
||||||
|
import java.io.File
|
||||||
import eu.kanade.tachiyomi.data.preference.PreferenceKeys as Keys
|
import eu.kanade.tachiyomi.data.preference.PreferenceKeys as Keys
|
||||||
|
|
||||||
class SettingsAdvancedController : SettingsController() {
|
class SettingsAdvancedController : SettingsController() {
|
||||||
|
@ -301,6 +302,7 @@ class SettingsAdvancedController : SettingsController() {
|
||||||
webview.clearHistory()
|
webview.clearHistory()
|
||||||
webview.clearSslPreferences()
|
webview.clearSslPreferences()
|
||||||
WebStorage.getInstance().deleteAllData()
|
WebStorage.getInstance().deleteAllData()
|
||||||
|
activity?.applicationInfo?.dataDir?.let { File("$it/app_webview/").deleteRecursively() }
|
||||||
activity?.toast(R.string.webview_data_deleted)
|
activity?.toast(R.string.webview_data_deleted)
|
||||||
} catch (e: Throwable) {
|
} catch (e: Throwable) {
|
||||||
logcat(LogPriority.ERROR, e)
|
logcat(LogPriority.ERROR, e)
|
||||||
|
|
Loading…
Reference in a new issue