diff --git a/frontend/apps/reader/modules/readertoc.lua b/frontend/apps/reader/modules/readertoc.lua index 8f7473758..7d1953a8c 100644 --- a/frontend/apps/reader/modules/readertoc.lua +++ b/frontend/apps/reader/modules/readertoc.lua @@ -70,6 +70,16 @@ end function ReaderToc:onPageUpdate(pageno) self.pageno = pageno + if G_reader_settings:readSetting("full_refresh_count") == -1 then + if self:isChapterEnd(pageno, 0) then + self.chapter_refresh = true + elseif self:isChapterBegin(pageno, 0) and self.chapter_refresh then + UIManager:setDirty("all", "full") + self.chapter_refresh = false + else + self.chapter_refresh = false + end + end end function ReaderToc:onPosUpdate(pos, pageno) diff --git a/frontend/ui/elements/refresh_menu_table.lua b/frontend/ui/elements/refresh_menu_table.lua index f12f2f187..c33054216 100644 --- a/frontend/ui/elements/refresh_menu_table.lua +++ b/frontend/ui/elements/refresh_menu_table.lua @@ -67,5 +67,10 @@ return { callback = function() UIManager:setRefreshRate(custom_3()) end, hold_input = custom_input("refresh_rate_3") }, + { + text = _("Every chapter"), + checked_func = function() return UIManager:getRefreshRate() == -1 end, + callback = function() UIManager:setRefreshRate(-1) end, + }, } }