Skip to content

Commit

Permalink
书架增加按作者排序 (#4574)
Browse files Browse the repository at this point in the history
  • Loading branch information
niu-hb authored Jan 25, 2025
1 parent 1f998cf commit 28b8b66
Show file tree
Hide file tree
Showing 12 changed files with 23 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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 }
}
Expand Down
10 changes: 8 additions & 2 deletions app/src/main/res/layout/dialog_bookshelf_config.xml
Original file line number Diff line number Diff line change
@@ -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"
Expand Down Expand Up @@ -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>
Expand Down
2 changes: 2 additions & 0 deletions app/src/main/res/layout/item_book_group_manage.xml
Original file line number Diff line number Diff line change
Expand Up @@ -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" />

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 @@ -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>
Expand Down
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 @@ -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>
Expand Down
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 @@ -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>
Expand Down
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 @@ -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>
Expand Down
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 @@ -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>
Expand Down
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 @@ -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>
Expand Down
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 @@ -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>
Expand Down
1 change: 1 addition & 0 deletions app/src/main/res/values/arrays.xml
Original file line number Diff line number Diff line change
Expand Up @@ -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">
Expand Down
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 @@ -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>
Expand Down

0 comments on commit 28b8b66

Please sign in to comment.