mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-08 10:44:09 -04:00
Fix sync not working for highlights
This commit is contained in:
parent
c003690502
commit
70f1540484
@ -33,7 +33,7 @@ class AnnotationsManager:
|
|||||||
newvals = {'highlight': highlights}
|
newvals = {'highlight': highlights}
|
||||||
updated, ans = merge_annotation_maps(base, newvals)
|
updated, ans = merge_annotation_maps(base, newvals)
|
||||||
if updated:
|
if updated:
|
||||||
self.set_highlights(ans)
|
self.set_highlights(ans.highlight)
|
||||||
return updated
|
return updated
|
||||||
|
|
||||||
def remove_highlight(self, uuid):
|
def remove_highlight(self, uuid):
|
||||||
@ -110,8 +110,7 @@ class AnnotationsManager:
|
|||||||
def highlights_for_currently_showing(self):
|
def highlights_for_currently_showing(self):
|
||||||
name = self.view.currently_showing.name
|
name = self.view.currently_showing.name
|
||||||
ans = v'[]'
|
ans = v'[]'
|
||||||
for uuid in Object.keys(self.highlights):
|
for h in Object.values(self.highlights):
|
||||||
h = self.highlights[uuid]
|
|
||||||
if h.spine_name is name and not h.removed and h.start_cfi:
|
if h.spine_name is name and not h.removed and h.start_cfi:
|
||||||
ans.push(h)
|
ans.push(h)
|
||||||
return ans
|
return ans
|
||||||
|
Loading…
x
Reference in New Issue
Block a user