Content server viewer: Fix highlights not sorted correctly in the highlights panel. Fixes #1918436 [Highlights in viewer are not sorted correctly](https://bugs.launchpad.net/calibre/+bug/1918436)

This commit is contained in:
Kovid Goyal 2021-03-15 11:26:37 +05:30
parent c44bd3f94c
commit bc84d139af
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C

View File

@ -18,7 +18,8 @@ def bookmark_get_cfi(b):
def highlight_get_cfi(hl):
cfi = hl.start_cfi
if cfi:
return cfi[8:-1]
si = hl.spine_index or 9999999999
return f'/{si}/{cfi}'
def sort_annot_list(annots, get_cfi_func):