|
|
|
@ -186,11 +186,11 @@ function ReaderThumbnail:removeFromCache(hash_subs, remove_only_non_matching)
|
|
|
|
|
return nb_removed, size_removed
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
function ReaderThumbnail:resetCachedPagesForBookmarks(...)
|
|
|
|
|
function ReaderThumbnail:resetCachedPagesForBookmarks(items)
|
|
|
|
|
-- Multiple bookmarks may be provided
|
|
|
|
|
local start_page, end_page
|
|
|
|
|
for i = 1, select("#", ...) do
|
|
|
|
|
local bm = select(i, ...)
|
|
|
|
|
for i = 1, #items do
|
|
|
|
|
local bm = items[i]
|
|
|
|
|
if self.ui.rolling then
|
|
|
|
|
-- Look at all properties that may be xpointers
|
|
|
|
|
for _, k in ipairs({"page", "pos0", "pos1"}) do
|
|
|
|
@ -537,9 +537,6 @@ end
|
|
|
|
|
ReaderThumbnail.onDocumentRerendered = ReaderThumbnail.resetCache
|
|
|
|
|
ReaderThumbnail.onDocumentPartiallyRerendered = ReaderThumbnail.resetCache
|
|
|
|
|
-- Emitted When adding/removing/updating bookmarks and highlights
|
|
|
|
|
ReaderThumbnail.onBookmarkAdded = ReaderThumbnail.resetCachedPagesForBookmarks
|
|
|
|
|
ReaderThumbnail.onBookmarkRemoved = ReaderThumbnail.resetCachedPagesForBookmarks
|
|
|
|
|
ReaderThumbnail.onBookmarkUpdated = ReaderThumbnail.resetCachedPagesForBookmarks
|
|
|
|
|
ReaderThumbnail.onBookmarkEdited = ReaderThumbnail.resetCachedPagesForBookmarks
|
|
|
|
|
ReaderThumbnail.onAnnotationsModified = ReaderThumbnail.resetCachedPagesForBookmarks
|
|
|
|
|
|
|
|
|
|
return ReaderThumbnail
|
|
|
|
|