PDF written highlights: trash cached tiles on close (#8002)

Small followup to e3bac94d.
pull/8008/head
poire-z 3 years ago committed by GitHub
parent 817e9e26e8
commit 7b90305570
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -889,6 +889,12 @@ function ReaderView:onPageGapUpdate(page_gap)
end
function ReaderView:onSaveSettings()
if self.document:isEdited() and G_reader_settings:readSetting("save_document") ~= "always" then
-- Either "disable" (and the current tiles will be wrong) or "prompt" (but the
-- prompt will happen later, too late to catch "Don't save"), so force cached
-- tiles to be ignored on next opening.
self.document:resetTileCacheValidity()
end
self.ui.doc_settings:saveSetting("tile_cache_validity_ts", self.document:getTileCacheValidity())
self.ui.doc_settings:saveSetting("render_mode", self.render_mode)
-- Don't etch the current rotation in stone when sticky rotation is enabled

Loading…
Cancel
Save