|
|
@ -278,6 +278,10 @@ function ReaderThumbnail:getPageThumbnail(page, width, height, batch_id, when_ge
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
|
|
function ReaderThumbnail:ensureTileGeneration()
|
|
|
|
function ReaderThumbnail:ensureTileGeneration()
|
|
|
|
|
|
|
|
if not self._standby_prevented then
|
|
|
|
|
|
|
|
self._standby_prevented = true
|
|
|
|
|
|
|
|
UIManager:preventStandby()
|
|
|
|
|
|
|
|
end
|
|
|
|
local has_pids_still_to_collect = self:collectPids()
|
|
|
|
local has_pids_still_to_collect = self:collectPids()
|
|
|
|
|
|
|
|
|
|
|
|
local still_in_progress = false
|
|
|
|
local still_in_progress = false
|
|
|
@ -318,6 +322,11 @@ function ReaderThumbnail:ensureTileGeneration()
|
|
|
|
end
|
|
|
|
end
|
|
|
|
if self.req_in_progress or has_pids_still_to_collect or next(self.thumbnails_requests) then
|
|
|
|
if self.req_in_progress or has_pids_still_to_collect or next(self.thumbnails_requests) then
|
|
|
|
self._ensureTileGeneration_action()
|
|
|
|
self._ensureTileGeneration_action()
|
|
|
|
|
|
|
|
else
|
|
|
|
|
|
|
|
if self._standby_prevented then
|
|
|
|
|
|
|
|
self._standby_prevented = false
|
|
|
|
|
|
|
|
UIManager:allowStandby()
|
|
|
|
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
|
@ -513,6 +522,10 @@ function ReaderThumbnail:onCloseDocument()
|
|
|
|
self.tile_cache:clear()
|
|
|
|
self.tile_cache:clear()
|
|
|
|
self.tile_cache = nil
|
|
|
|
self.tile_cache = nil
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
if self._standby_prevented then
|
|
|
|
|
|
|
|
self._standby_prevented = false
|
|
|
|
|
|
|
|
UIManager:allowStandby()
|
|
|
|
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
|
|
function ReaderThumbnail:onColorRenderingUpdate()
|
|
|
|
function ReaderThumbnail:onColorRenderingUpdate()
|
|
|
|