Skip to content

Commit 09d05af

Browse files
Fix secondary reader toggling
1 parent cbf1b16 commit 09d05af

1 file changed

Lines changed: 2 additions & 7 deletions

File tree

lib/ui/views/reader/reader_viewmodel.dart

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -408,18 +408,13 @@ class ReaderViewModel extends ReactiveViewModel {
408408
}
409409

410410
Future<void> toggleSecondaryAreaHTML(bool showSecondaryArea) async {
411-
// TODO
412411
if (showSecondaryArea == false) {
413412
await webviewController.runJavaScript("""
414-
document.addEventListener("DOMContentLoaded", () => {
415-
document.getElementById('container').classList.add('hidden');
416-
});
413+
document.getElementById('container').classList.add('hidden');
417414
""");
418415
} else {
419416
await webviewController.runJavaScript("""
420-
document.addEventListener("DOMContentLoaded", () => {
421-
document.getElementById('container').classList.remove('hidden');
422-
});
417+
document.getElementById('container').classList.remove('hidden');
423418
""");
424419
}
425420
}

0 commit comments

Comments
 (0)