fix: Store context at module level in gestures.ts

Fix bug where context parameter was unused in init() but referenced
throughout the file. Now properly stored as module-level variable
so all gesture handler functions can access it.
This commit is contained in:
2026-04-04 14:16:24 -04:00
parent 4b2b7ee66a
commit 6649d0526d
+3 -1
View File
@@ -4,8 +4,10 @@ import type { ReaderContext } from "../core/reader-context";
let currentPanelIndex = 0;
let currentPagePanels: Panel[] = [];
let context: ReaderContext;
export async function init(context: ReaderContext): Promise<void> {
export async function init(readerContext: ReaderContext): Promise<void> {
context = readerContext;
setupGestures();
await loadPanelsIfComic();
}