Skip to content

Commit

Permalink
[fix] Distinguish bookmark/page flipping in menu
Browse files Browse the repository at this point in the history
Fixes <koreader#5265>.
  • Loading branch information
Frenzie committed Aug 26, 2019
1 parent ba8099f commit 6bdb349
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
2 changes: 1 addition & 1 deletion frontend/apps/reader/modules/readerbookmark.lua
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ function ReaderBookmark:addToMainMenu(menu_items)
if self.ui.document.info.has_pages then
menu_items.bookmark_browsing_mode = {
text = self.bbm_menu_title,
checked_func = function() return self.view.flipping_visible end,
checked_func = function() return self.ui.paging.bookmark_flipping_mode end,
callback = function(touchmenu_instance)
self:enableBookmarkBrowsingMode()
touchmenu_instance:closeMenu()
Expand Down
6 changes: 5 additions & 1 deletion frontend/apps/reader/modules/readerpaging.lua
Original file line number Diff line number Diff line change
Expand Up @@ -273,6 +273,10 @@ function ReaderPaging:getPagePosition(page)
end

function ReaderPaging:onTogglePageFlipping()
if self.bookmark_flipping_mode then
self:onToggleBookmarkFlipping()
return
end
self.view.flipping_visible = not self.view.flipping_visible
self.page_flipping_mode = self.view.flipping_visible
self.flipping_page = self.current_page
Expand All @@ -290,7 +294,7 @@ function ReaderPaging:onTogglePageFlipping()
end

function ReaderPaging:onToggleBookmarkFlipping()
self.bookmark_flipping_mode = not self.bookmark_flipping_mode
self.bookmark_flipping_mode = not self.bookmark_flipping_mode

if self.bookmark_flipping_mode then
self.orig_flipping_mode = self.view.flipping_visible
Expand Down

0 comments on commit 6bdb349

Please sign in to comment.