|
|
@ -21,6 +21,7 @@ import io.legado.app.constant.Status |
|
|
|
import io.legado.app.data.entities.Book |
|
|
|
import io.legado.app.data.entities.Book |
|
|
|
import io.legado.app.data.entities.BookChapter |
|
|
|
import io.legado.app.data.entities.BookChapter |
|
|
|
import io.legado.app.data.entities.BookProgress |
|
|
|
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.ReadBookConfig |
|
|
|
import io.legado.app.help.ReadTipConfig |
|
|
|
import io.legado.app.help.ReadTipConfig |
|
|
|
import io.legado.app.help.storage.Backup |
|
|
|
import io.legado.app.help.storage.Backup |
|
|
@ -204,6 +205,21 @@ class ReadBookActivity : ReadBookBaseActivity(), |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
R.id.menu_download -> showDownloadDialog() |
|
|
|
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 -> |
|
|
|
R.id.menu_copy_text -> |
|
|
|
TextDialog.show(supportFragmentManager, ReadBook.curTextChapter?.getContent()) |
|
|
|
TextDialog.show(supportFragmentManager, ReadBook.curTextChapter?.getContent()) |
|
|
|
R.id.menu_update_toc -> ReadBook.book?.let { |
|
|
|
R.id.menu_update_toc -> ReadBook.book?.let { |
|
|
|