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:
@@ -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();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user