pull/84/head
kunfei 5 years ago
parent 23e0d44667
commit d261d25330
  1. 3
      app/src/main/java/io/legado/app/ui/book/read/ReadBookActivity.kt
  2. 2
      app/src/main/java/io/legado/app/ui/book/read/ReadBookViewModel.kt
  3. 4
      app/src/main/res/menu/read_book.xml
  4. 2
      app/src/main/res/values/strings.xml

@ -219,6 +219,9 @@ class ReadBookActivity : VMBaseActivity<ReadBookViewModel>(R.layout.activity_boo
R.id.menu_copy_text -> { R.id.menu_copy_text -> {
} }
R.id.menu_update_toc -> ReadBook.book?.let {
viewModel.loadChapterList(it)
}
} }
return super.onCompatOptionsItemSelected(item) return super.onCompatOptionsItemSelected(item)
} }

@ -91,7 +91,7 @@ class ReadBookViewModel(application: Application) : BaseViewModel(application) {
} }
} }
private fun loadChapterList( fun loadChapterList(
book: Book, book: Book,
changeDruChapterIndex: ((chapters: List<BookChapter>) -> Unit)? = null changeDruChapterIndex: ((chapters: List<BookChapter>) -> Unit)? = null
) { ) {

@ -80,9 +80,9 @@
app:showAsAction="never" /> app:showAsAction="never" />
<item <item
android:id="@+id/menu_update_chapter_list" android:id="@+id/menu_update_toc"
android:icon="@drawable/ic_update" android:icon="@drawable/ic_update"
android:title="@string/update_chapter" android:title="@string/update_toc"
app:showAsAction="never" /> app:showAsAction="never" />
<item <item

@ -329,7 +329,7 @@
<string name="faq">常见问题</string> <string name="faq">常见问题</string>
<string name="pt_show_all_find">显示所有发现</string> <string name="pt_show_all_find">显示所有发现</string>
<string name="ps_show_all_find">关闭则只显示勾选源的发现</string> <string name="ps_show_all_find">关闭则只显示勾选源的发现</string>
<string name="update_chapter">更新目录</string> <string name="update_toc">更新目录</string>
<string name="txt_chapter_regex">txt目录正则</string> <string name="txt_chapter_regex">txt目录正则</string>
<string name="set_charset">设置编码</string> <string name="set_charset">设置编码</string>
<string name="swap_sort">倒序-顺序</string> <string name="swap_sort">倒序-顺序</string>

Loading…
Cancel
Save