mirror of
https://github.com/gedoor/legado.git
synced 2024-07-06 23:47:49 +08:00
优化
This commit is contained in:
parent
635d4360d9
commit
9f5a22f01b
@ -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()
|
||||
}
|
||||
}
|
||||
|
@ -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>
|
||||
|
@ -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>
|
||||
|
@ -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>
|
||||
|
@ -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>
|
||||
|
@ -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>
|
||||
|
@ -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>
|
||||
|
@ -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>
|
||||
|
@ -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>
|
||||
|
Loading…
Reference in New Issue
Block a user