mirror of
https://github.com/koreader/koreader.git
synced 2025-12-24 12:14:05 +01:00
ReaderView: Flash when paging *away* from images, too (#11152)
Reword the `Always flash around pages with images` Menu/Dispatcher entry accordingly. Fix #11143
This commit is contained in:
@@ -40,6 +40,9 @@ local Document = {
|
||||
-- bb type needed by engine for color rendering
|
||||
color_bb_type = Blitbuffer.TYPE_BBRGB32,
|
||||
|
||||
-- image content stats, if supported by the engine
|
||||
_drawn_images_count = nil,
|
||||
_drawn_images_surface_ratio = nil,
|
||||
}
|
||||
|
||||
function Document:extend(subclass_prototype)
|
||||
@@ -92,6 +95,10 @@ function Document:_init()
|
||||
self.hw_dithering = false
|
||||
-- Whether SW dithering is enabled
|
||||
self.sw_dithering = false
|
||||
|
||||
-- Zero-init those to be able to drop the nil guards at runtime
|
||||
self._drawn_images_count = 0
|
||||
self._drawn_images_surface_ratio = 0
|
||||
end
|
||||
|
||||
-- override this method to open a document
|
||||
@@ -522,6 +529,7 @@ end
|
||||
|
||||
function Document:getDrawnImagesStatistics()
|
||||
-- For now, only set by CreDocument in CreDocument:drawCurrentView()
|
||||
-- Returns 0, 0 (as per Document:init) otherwise.
|
||||
return self._drawn_images_count, self._drawn_images_surface_ratio
|
||||
end
|
||||
|
||||
|
||||
Reference in New Issue
Block a user