Archived
fix: cleanup
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user