@ -219,6 +219,9 @@ class ReadBookActivity : VMBaseActivity<ReadBookViewModel>(R.layout.activity_boo
R.id.menu_copy_text -> {
}
R.id.menu_update_toc -> ReadBook.book?.let {
viewModel.loadChapterList(it)
return super.onCompatOptionsItemSelected(item)
@ -91,7 +91,7 @@ class ReadBookViewModel(application: Application) : BaseViewModel(application) {
private fun loadChapterList(
fun loadChapterList(
book: Book,
changeDruChapterIndex: ((chapters: List<BookChapter>) -> Unit)? = null
) {
@ -80,9 +80,9 @@
app:showAsAction="never" />
<item
android:id="@+id/menu_update_chapter_list"
android:id="@+id/menu_update_toc"
android:icon="@drawable/ic_update"
android:title="@string/update_chapter"
android:title="@string/update_toc"
@ -329,7 +329,7 @@
<string name="faq">常见问题</string>
<string name="pt_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="set_charset">设置编码</string>
<string name="swap_sort">倒序-顺序</string>