From 34f89e5cfde232e09b8b5955579f5f65cb3761f8 Mon Sep 17 00:00:00 2001 From: Bradlee Speice Date: Sun, 18 Jan 2015 22:36:45 -0500 Subject: [PATCH] Fix the chapter count not calculated correctly --- .../org/bspeice/minimalbible/activity/viewer/BibleView.kt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/src/main/kotlin/org/bspeice/minimalbible/activity/viewer/BibleView.kt b/app/src/main/kotlin/org/bspeice/minimalbible/activity/viewer/BibleView.kt index 2cd412f..b0b6dab 100644 --- a/app/src/main/kotlin/org/bspeice/minimalbible/activity/viewer/BibleView.kt +++ b/app/src/main/kotlin/org/bspeice/minimalbible/activity/viewer/BibleView.kt @@ -51,7 +51,7 @@ class BookAdapter(val b: Book, val prefs: BibleViewerPreferences) val versification = b.getVersification() val bookList = versification.getBooks() - val chapterCount = bookList.map { versification.getLastChapter(it) - 1 }.sum() + // val chapterCount = bookList.map { versification.getLastChapter(it) - 1 }.sum() /** * Store information needed to decode the text of a chapter @@ -117,7 +117,7 @@ class BookAdapter(val b: Book, val prefs: BibleViewerPreferences) /** * Get the number of chapters in the book */ - override fun getItemCount(): Int = chapterCount + override fun getItemCount(): Int = chapterList.size() public fun bindScrollHandler(provider: PublishSubject, lM: RecyclerView.LayoutManager) {