书架增加按作者排序 (#4574)

This commit is contained in:
niuhb
2025-01-25 17:19:51 +08:00
committed by GitHub
parent 120f8012fc
commit cc19e3fa8d
12 changed files with 23 additions and 2 deletions
@@ -178,6 +178,10 @@ class BooksFragment() : BaseFragment(R.layout.fragment_books),
4 -> list.sortedByDescending {
max(it.latestChapterTime, it.durChapterTime)
}
// 按作者排序
5 -> list.sortedWith { o1, o2 ->
o1.author.cnCompare(o2.author)
}
else -> list.sortedByDescending { it.durChapterTime }
}
@@ -1,10 +1,10 @@
<?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"
android:padding="16dp"
xmlns:app="http://schemas.android.com/apk/res-auto">
android:padding="16dp">
<LinearLayout
android:id="@+id/ll_group_style"
@@ -174,6 +174,12 @@
android:text="@string/bookshelf_px_4"
tools:ignore="TouchTargetSizeCheck" />
<RadioButton
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@string/bookshelf_px_5"
tools:ignore="TouchTargetSizeCheck" />
</RadioGroup>
</LinearLayout>
@@ -27,6 +27,8 @@
<io.legado.app.lib.theme.view.ThemeSwitch
android:id="@+id/sw_show"
android:minWidth="48dp"
android:minHeight="48dp"
android:layout_width="wrap_content"
android:layout_height="wrap_content" />
@@ -1128,6 +1128,7 @@
<string name="exit_app">退出软件</string>
<string name="result_analyzed">Analyzed</string>
<string name="bookshelf_px_4">Comprehensive</string>
<string name="bookshelf_px_5">Ordenar por autor</string>
<string name="effective_replaces">起效的替换</string>
<string name="export_book">导出书籍</string>
<string name="export_book_notification_content">正在导出(%1$s),还有%2$d本待导出</string>
@@ -1131,6 +1131,7 @@
<string name="exit_app">退出软件</string>
<string name="result_analyzed">Analyzed</string>
<string name="bookshelf_px_4">Comprehensive</string>
<string name="bookshelf_px_5">著者別</string>
<string name="effective_replaces">起效的替换</string>
<string name="export_book">导出书籍</string>
<string name="export_book_notification_content">正在导出(%1$s),还有%2$d本待导出</string>
@@ -1131,6 +1131,7 @@
<string name="exit_app">退出软件</string>
<string name="result_analyzed">Analyzed</string>
<string name="bookshelf_px_4">Comprehensive</string>
<string name="bookshelf_px_5">Ordenar por autor</string>
<string name="effective_replaces">起效的替换</string>
<string name="export_book">导出书籍</string>
<string name="export_book_notification_content">正在导出(%1$s),还有%2$d本待导出</string>
+1
View File
@@ -1127,6 +1127,7 @@ Còn </string>
<string name="exit_app">Thoát khỏi phần mềm</string>
<string name="result_analyzed">Analyzed</string>
<string name="bookshelf_px_4">Comprehensive</string>
<string name="bookshelf_px_5">Sắp xếp theo tác giả</string>
<string name="effective_replaces">起效的替换</string>
<string name="export_book">导出书籍</string>
<string name="export_book_notification_content">正在导出(%1$s),还有%2$d本待导出</string>
@@ -1128,6 +1128,7 @@
<string name="exit_app">退出软件</string>
<string name="result_analyzed">解析示例</string>
<string name="bookshelf_px_4">綜合排序</string>
<string name="bookshelf_px_5">按作者</string>
<string name="effective_replaces">起效的替换</string>
<string name="export_book">导出书籍</string>
<string name="export_book_notification_content">正在导出(%1$s),还有%2$d本待导出</string>
@@ -1130,6 +1130,7 @@
<string name="exit_app">退出软件</string>
<string name="result_analyzed">解析示例</string>
<string name="bookshelf_px_4">綜合排序</string>
<string name="bookshelf_px_5">按作者</string>
<string name="effective_replaces">起效的替换</string>
<string name="export_book">导出书籍</string>
<string name="export_book_notification_content">正在导出(%1$s),还有%2$d本待导出</string>
+1
View File
@@ -1130,6 +1130,7 @@
<string name="exit_app">退出软件</string>
<string name="result_analyzed">解析示例</string>
<string name="bookshelf_px_4">综合排序</string>
<string name="bookshelf_px_5">按作者</string>
<string name="effective_replaces">起效的替换</string>
<string name="export_book">导出书籍</string>
<string name="export_book_notification_content">正在导出(%1$s),还有%2$d本待导出</string>
+1
View File
@@ -24,6 +24,7 @@
<item>@string/bookshelf_px_2</item>
<item>@string/bookshelf_px_3</item>
<item>@string/bookshelf_px_4</item>
<item>@string/bookshelf_px_5</item>
</string-array>
<string-array name="indent">
+1
View File
@@ -1133,6 +1133,7 @@
<string name="exit_app">Exit</string>
<string name="result_analyzed">Analyzed</string>
<string name="bookshelf_px_4">Comprehensive</string>
<string name="bookshelf_px_5">Sort by author</string>
<string name="effective_replaces">Effective replacement</string>
<string name="export_book">Export Book</string>
<string name="export_book_notification_content">Exporting (%1$s), with %2$d to be exported.</string>