mirror of
https://github.com/koreader/koreader.git
synced 2025-08-10 00:52:38 +00:00
PDF written highlights: fix boxes, trash cached tiles
TileCacheItem: add created_ts property. Document: manage a tile_cache_validity_ts and ignore older cached tiles. This timestamps is updated when highlights are written as annotations in, or deleted from, the PDF, so we can get the most current rendered bitmap from MuPDF and avoid highlight ghosts on old tiles. Save this timestamp in doc settings so older cached to disk tiles will also be ignored across re-openings. Bump base for: mupdf.lua: update frontend pboxes with MuPDF adjusted ones.
This commit is contained in:
@@ -17,6 +17,7 @@ function TileCacheItem:totable()
|
||||
size = self.size,
|
||||
pageno = self.pageno,
|
||||
excerpt = self.excerpt,
|
||||
created_ts = self.created_ts,
|
||||
persistent = self.persistent,
|
||||
bb = {
|
||||
w = self.bb.w,
|
||||
@@ -51,6 +52,7 @@ function TileCacheItem:fromtable(t)
|
||||
self.size = t.size
|
||||
self.pageno = t.pageno
|
||||
self.excerpt = t.excerpt
|
||||
self.created_ts = t.created_ts
|
||||
self.persistent = t.persistent
|
||||
self.bb = Blitbuffer.fromstring(t.bb.w, t.bb.h, t.bb.fmt, t.bb.data, t.bb.stride)
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user