Horis 2 年之前
父節點
當前提交
6f56d27ada

+ 3 - 0
app/src/main/java/io/legado/app/ui/config/ConfigViewModel.kt

@@ -10,6 +10,7 @@ import io.legado.app.help.book.BookHelp
 import io.legado.app.utils.FileUtils
 import io.legado.app.utils.restart
 import io.legado.app.utils.toastOnUi
+import kotlinx.coroutines.delay
 import splitties.init.appCtx
 
 class ConfigViewModel(application: Application) : BaseViewModel(application) {
@@ -32,6 +33,8 @@ class ConfigViewModel(application: Application) : BaseViewModel(application) {
     fun clearWebViewData() {
         execute {
             FileUtils.delete(context.getDir("webview", Context.MODE_PRIVATE))
+            context.toastOnUi(R.string.clear_webview_data_success)
+            delay(3000)
             appCtx.restart()
         }
     }

+ 1 - 0
app/src/main/res/values-es-rES/strings.xml

@@ -1138,4 +1138,5 @@
     <string name="del_h_tag">删除h标签</string>
     <string name="adjust_chapter_page">调整本章页数</string>
     <string name="adjust_chapter_index">调整章节位置</string>
+    <string name="clear_webview_data_success">清除成功,3秒后自动重启应用</string>
 </resources>

+ 1 - 0
app/src/main/res/values-ja-rJP/strings.xml

@@ -1141,4 +1141,5 @@
     <string name="del_h_tag">删除h标签</string>
     <string name="adjust_chapter_page">调整本章页数</string>
     <string name="adjust_chapter_index">调整章节位置</string>
+    <string name="clear_webview_data_success">清除成功,3秒后自动重启应用</string>
 </resources>

+ 1 - 0
app/src/main/res/values-pt-rBR/strings.xml

@@ -1141,4 +1141,5 @@
     <string name="del_h_tag">删除h标签</string>
     <string name="adjust_chapter_page">调整本章页数</string>
     <string name="adjust_chapter_index">调整章节位置</string>
+    <string name="clear_webview_data_success">清除成功,3秒后自动重启应用</string>
 </resources>

+ 1 - 0
app/src/main/res/values-vi/strings.xml

@@ -1137,4 +1137,5 @@ Còn </string>
     <string name="del_h_tag">删除h标签</string>
     <string name="adjust_chapter_page">调整本章页数</string>
     <string name="adjust_chapter_index">调整章节位置</string>
+    <string name="clear_webview_data_success">清除成功,3秒后自动重启应用</string>
 </resources>

+ 1 - 0
app/src/main/res/values-zh-rHK/strings.xml

@@ -1138,4 +1138,5 @@
     <string name="del_h_tag">删除h标签</string>
     <string name="adjust_chapter_page">调整本章页数</string>
     <string name="adjust_chapter_index">调整章节位置</string>
+    <string name="clear_webview_data_success">清除成功,3秒后自动重启应用</string>
 </resources>

+ 1 - 0
app/src/main/res/values-zh-rTW/strings.xml

@@ -1140,4 +1140,5 @@
     <string name="del_h_tag">删除h标签</string>
     <string name="adjust_chapter_page">调整本章页数</string>
     <string name="adjust_chapter_index">调整章节位置</string>
+    <string name="clear_webview_data_success">清除成功,3秒后自动重启应用</string>
 </resources>

+ 1 - 0
app/src/main/res/values-zh/strings.xml

@@ -1140,4 +1140,5 @@
     <string name="del_h_tag">删除h标签</string>
     <string name="adjust_chapter_page">调整本章页数</string>
     <string name="adjust_chapter_index">调整章节位置</string>
+    <string name="clear_webview_data_success">清除成功,3秒后自动重启应用</string>
 </resources>

+ 1 - 0
app/src/main/res/values/strings.xml

@@ -1141,4 +1141,5 @@
     <string name="del_h_tag">Delete h tag</string>
     <string name="adjust_chapter_page">Adjust of chapter page</string>
     <string name="adjust_chapter_index">Adjust of chapter index</string>
+    <string name="clear_webview_data_success">Cleared successfully, automatically restarts the application after 3 seconds</string>
 </resources>