Skip to content

Commit

Permalink
优化
Browse files Browse the repository at this point in the history
  • Loading branch information
821938089 committed Dec 11, 2023
1 parent 635d436 commit 9f5a22f
Show file tree
Hide file tree
Showing 9 changed files with 11 additions and 0 deletions.
3 changes: 3 additions & 0 deletions app/src/main/java/io/legado/app/ui/config/ConfigViewModel.kt
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand All @@ -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()
}
}
Expand Down
1 change: 1 addition & 0 deletions app/src/main/res/values-es-rES/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -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 change: 1 addition & 0 deletions app/src/main/res/values-ja-rJP/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -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 change: 1 addition & 0 deletions app/src/main/res/values-pt-rBR/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -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 change: 1 addition & 0 deletions app/src/main/res/values-vi/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -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 change: 1 addition & 0 deletions app/src/main/res/values-zh-rHK/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -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 change: 1 addition & 0 deletions app/src/main/res/values-zh-rTW/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -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 change: 1 addition & 0 deletions app/src/main/res/values-zh/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -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 change: 1 addition & 0 deletions app/src/main/res/values/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -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>

0 comments on commit 9f5a22f

Please sign in to comment.