@@ -35,6 +35,8 @@ class ReaderViewModel extends ReactiveViewModel {
3535 bool get showSecondaryArea => _settingsService.showSecondaryArea;
3636 bool get linkReaderAreaScrolling => _settingsService.linkReaderAreaScrolling;
3737
38+ List <String > get bookmarks => _settingsService.bookmarks;
39+
3840 ReaderViewModel ({required this .context});
3941
4042 final BuildContext context;
@@ -44,21 +46,24 @@ class ReaderViewModel extends ReactiveViewModel {
4446 bool isPrimaryReaderAreaPopupActive = false ;
4547 bool isSecondaryReaderAreaPopupActive = false ;
4648
47- void initilize () async {
49+ Future < void > initilize () async {
4850 await setupWebviewController ();
4951 await _biblesService.reloadBiblesJson ();
5052
51- String primaryAreaHTML = await _readerService.getReaderBookHTML (
53+ String primaryAreaHTML = _readerService.getReaderBookHTML (
5254 Area .primary,
5355 viewBy,
5456 primaryAreaBible,
5557 bookCode,
58+ bookmarks,
5659 );
57- String secondaryAreaHTML = await _readerService.getReaderBookHTML (
60+
61+ String secondaryAreaHTML = _readerService.getReaderBookHTML (
5862 Area .secondary,
5963 viewBy,
6064 secondaryAreaBible,
6165 bookCode,
66+ bookmarks,
6267 );
6368
6469 await initilizeReaderWebview (
@@ -108,7 +113,7 @@ class ReaderViewModel extends ReactiveViewModel {
108113 },
109114 ),
110115 );
111- AndroidWebViewController .enableDebugging (true );
116+ await AndroidWebViewController .enableDebugging (true );
112117 }
113118
114119 /// Initilizes the webview html with everything except for the reader area contents.
@@ -497,11 +502,12 @@ class ReaderViewModel extends ReactiveViewModel {
497502 Future <void > updateReaderAreas () async {
498503 await _biblesService.reloadBiblesJson ();
499504
500- String primaryAreaHTML = await _readerService.getReaderBookHTML (Area .primary, viewBy, primaryAreaBible, bookCode);
505+ String primaryAreaHTML =
506+ _readerService.getReaderBookHTML (Area .primary, viewBy, primaryAreaBible, bookCode, bookmarks);
501507 await updateReaderAreaHTMLContent (Area .primary, primaryAreaHTML);
502508 if (showSecondaryArea == true ) {
503509 String secondaryAreaHTML =
504- await _readerService.getReaderBookHTML (Area .secondary, viewBy, secondaryAreaBible, bookCode);
510+ _readerService.getReaderBookHTML (Area .secondary, viewBy, secondaryAreaBible, bookCode, bookmarks );
505511 await updateReaderAreaHTMLContent (Area .secondary, secondaryAreaHTML);
506512 }
507513
0 commit comments