Fix CustomExport (#2)

* perf(CacheActivity): ⚡ 提升性能

* feat(strings): 💄 新增 result_analyzed 字段

* feat(PreferKey): ✨ 新增 episodeExportFileName 字段

+ 用于保存 自定义导出文件名 的js脚本

* feat(ExportCustomEpisode): ✨ 将导出文件名格式输入框移至导出对话框

+ 新增 测试导出文件名格式按钮
+ 默认选择为 导出所有
+ 优化了保存变量逻辑

* fix(ui): cant show R.string.result_analyzed

* perf(ExportCustomEpisode): ⚡ 使用协程优化导出

* perf(ExportCustomEpisode): 优化log

* fix(AppConfig): 修复episodeExportFileName值可能为null的问题

* fix(AppConfig): 修复enableCustomExport值可能为null的问题

* fix(AppConfig): 修复第一次选择导出路径不能正常使用自定义导出的问题

* perf(ExportCustomEpisode): ⚡ 优化进度条显示、优化输出速度

* style(ExportCustomEpisode): 🎨 清理代码
This commit is contained in:
Discut
2023-07-15 17:43:25 +08:00
committed by GitHub
parent b29f65bac1
commit 4d6864051d
17 changed files with 374 additions and 127 deletions
@@ -1,5 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="wrap_content"
@@ -54,6 +55,29 @@
</LinearLayout>
<io.legado.app.ui.widget.text.TextInputLayout
android:id="@+id/ly_et_epub_filename"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="12dp"
android:hint="@string/export_file_name"
app:endIconCheckable="true"
app:endIconContentDescription="Execute script"
app:endIconDrawable="@drawable/ic_play_24dp"
app:endIconMode="custom"
app:helperText="Variable: name, author, epubIndex">
<io.legado.app.lib.theme.view.ThemeEditText
android:id="@+id/et_epub_filename"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:inputType="text"
android:enabled="false"
tools:ignore="SpeakableTextPresentCheck,TouchTargetSizeCheck" />
</io.legado.app.ui.widget.text.TextInputLayout>
<io.legado.app.ui.widget.text.TextInputLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
@@ -64,8 +88,8 @@
android:id="@+id/et_epub_size"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:maxLength="6"
android:inputType="number"
android:maxLength="6"
tools:ignore="SpeakableTextPresentCheck,TouchTargetSizeCheck" />
</io.legado.app.ui.widget.text.TextInputLayout>
@@ -1119,4 +1119,5 @@
<string name="exit_app">退出软件</string>
<string name="add_all_to_bookshelf">全部加入书架</string>
<string name="page_to">页至</string>
<string name="result_analyzed">Analyzed</string>
</resources>
@@ -1122,4 +1122,5 @@
<string name="exit_app">退出软件</string>
<string name="add_all_to_bookshelf">全部加入书架</string>
<string name="page_to">页至</string>
<string name="result_analyzed">Analyzed</string>
</resources>
@@ -1122,4 +1122,5 @@
<string name="exit_app">退出软件</string>
<string name="add_all_to_bookshelf">全部加入书架</string>
<string name="page_to">页至</string>
<string name="result_analyzed">Analyzed</string>
</resources>
+1
View File
@@ -1118,4 +1118,5 @@ Còn </string>
<string name="exit_app">Thoát khỏi phần mềm</string>
<string name="add_all_to_bookshelf">Thêm tất cả vào giá sách</string>
<string name="page_to">Trang tới</string>
<string name="result_analyzed">Analyzed</string>
</resources>
@@ -1119,4 +1119,5 @@
<string name="exit_app">退出软件</string>
<string name="add_all_to_bookshelf">全部加入书架</string>
<string name="page_to">页至</string>
<string name="result_analyzed">解析示例</string>
</resources>
@@ -1121,4 +1121,5 @@
<string name="exit_app">退出软件</string>
<string name="add_all_to_bookshelf">全部加入书架</string>
<string name="page_to">页至</string>
<string name="result_analyzed">解析示例</string>
</resources>
+1
View File
@@ -1121,4 +1121,5 @@
<string name="exit_app">退出软件</string>
<string name="add_all_to_bookshelf">全部加入书架</string>
<string name="page_to">页至</string>
<string name="result_analyzed">解析示例</string>
</resources>
+1
View File
@@ -1122,4 +1122,5 @@
<string name="exit_app">退出软件</string>
<string name="add_all_to_bookshelf">全部加入书架</string>
<string name="page_to">页至</string>
<string name="result_analyzed">Analyzed</string>
</resources>