Skip to content

Commit 3dc81d0

Browse files
Various fixes
1 parent e50d80b commit 3dc81d0

2 files changed

Lines changed: 11 additions & 5 deletions

File tree

lib/ui/views/navigation_sections_chapters/navigation_sections_chapters_viewmodel.dart

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -55,11 +55,14 @@ class NavigationSectionsChaptersViewModel extends BaseViewModel {
5555
}
5656

5757
Future<void> onTapSectionItem(int index) async {
58+
_biblesService.setViewBy(ViewBy.section);
59+
60+
log(index.toString());
61+
5862
_biblesService.setBook(bookCode);
5963
_biblesService.addBookToRecentHistory(bookCode);
60-
61-
//_biblesService.setViewBy(ViewBy.section);
6264
String sectionHeading = sections[index][0];
65+
6366
log(sectionHeading);
6467
_biblesService.setSection(index);
6568

@@ -69,9 +72,12 @@ class NavigationSectionsChaptersViewModel extends BaseViewModel {
6972

7073
// For bibles that do not have a by section implementation
7174
Future<void> onTapChapterItem(int index) async {
75+
_biblesService.setViewBy(ViewBy.chapter);
76+
77+
log(index.toString());
78+
7279
_biblesService.setBook(bookCode);
7380
_biblesService.addBookToRecentHistory(bookCode);
74-
//_biblesService.setViewBy(ViewBy.chapter);
7581
_biblesService.setChapter(index);
7682

7783
_navigationService.clearStackAndShow(Routes.readerView);

lib/ui/views/reader/reader_viewmodel.dart

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -135,9 +135,9 @@ class ReaderViewModel extends ReactiveViewModel {
135135

136136
// Refresh for first section/chapter
137137
fetchDown(currentPage, viewBy, Area.primary);
138-
fetchDown(currentPage, viewBy, Area.secondary);
139-
140138
fetchUp(currentPage, viewBy, Area.primary);
139+
140+
fetchDown(currentPage, viewBy, Area.secondary);
141141
fetchUp(currentPage, viewBy, Area.secondary);
142142

143143
rebuildUi();

0 commit comments

Comments
 (0)