fix: cleanup

This commit is contained in:
2026-06-04 06:42:27 -05:00
parent f989b144cf
commit 654cfec147
52 changed files with 290 additions and 540 deletions
+8 -2
View File
@@ -1,5 +1,4 @@
import { DEFAULT_BOOKMARK_HIGHLIGHT_COLOR } from "@/constants/bookmarkHighlightColors";
import { DEFAULT_BOOKMARK_HIGHLIGHT_COLOR } from "@/constants/bookmarkHighlightColors";
import type { Bookmark, MarkerEntry, MarkersByBook } from "@/types";
export function bookmarkToMarkerEntry(b: Bookmark): MarkerEntry {
@@ -19,7 +18,14 @@ export function bookmarkToMarkerEntry(b: Bookmark): MarkerEntry {
};
}
export function sortMarkers(a: MarkerEntry, b: MarkerEntry): number {
function sortMarkers(a: MarkerEntry, b: MarkerEntry): number {
if (a.chapter_index !== b.chapter_index) {
return a.chapter_index - b.chapter_index;
}
return a.epub_cfi.localeCompare(b.epub_cfi);
}
export function sortBookmarks(a: Bookmark, b: Bookmark): number {
if (a.chapter_index !== b.chapter_index) {
return a.chapter_index - b.chapter_index;
}