diff --git a/app/src/main/java/io/legado/app/ui/book/read/ReadBookActivity.kt b/app/src/main/java/io/legado/app/ui/book/read/ReadBookActivity.kt
index f2cd19baa..926bc8d1e 100644
--- a/app/src/main/java/io/legado/app/ui/book/read/ReadBookActivity.kt
+++ b/app/src/main/java/io/legado/app/ui/book/read/ReadBookActivity.kt
@@ -21,6 +21,7 @@ import io.legado.app.constant.Status
import io.legado.app.data.entities.Book
import io.legado.app.data.entities.BookChapter
import io.legado.app.data.entities.BookProgress
+import io.legado.app.data.entities.Bookmark
import io.legado.app.help.ReadBookConfig
import io.legado.app.help.ReadTipConfig
import io.legado.app.help.storage.Backup
@@ -204,6 +205,21 @@ class ReadBookActivity : ReadBookBaseActivity(),
}
}
R.id.menu_download -> showDownloadDialog()
+ R.id.menu_add_bookmark -> {
+ val book = ReadBook.book
+ val page = ReadBook.curTextChapter?.page(ReadBook.durPageIndex())
+ if (book != null && page != null) {
+ val bookmark = Bookmark(
+ bookUrl = book.bookUrl,
+ bookName = book.name,
+ chapterIndex = ReadBook.durChapterIndex,
+ chapterPos = ReadBook.durChapterPos,
+ chapterName = page.title,
+ bookText = page.text
+ )
+ showBookMark(bookmark)
+ }
+ }
R.id.menu_copy_text ->
TextDialog.show(supportFragmentManager, ReadBook.curTextChapter?.getContent())
R.id.menu_update_toc -> ReadBook.book?.let {
diff --git a/app/src/main/res/menu/book_read.xml b/app/src/main/res/menu/book_read.xml
index d7bb23caf..f35b5b901 100644
--- a/app/src/main/res/menu/book_read.xml
+++ b/app/src/main/res/menu/book_read.xml
@@ -44,6 +44,11 @@
+
+