mirror of
				https://github.com/MinimalBible/MinimalBible
				synced 2025-11-03 18:10:27 -05:00 
			
		
		
		
	Fix the chapter count not calculated correctly
This commit is contained in:
		@ -51,7 +51,7 @@ class BookAdapter(val b: Book, val prefs: BibleViewerPreferences)
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
    val versification = b.getVersification()
 | 
					    val versification = b.getVersification()
 | 
				
			||||||
    val bookList = versification.getBooks()
 | 
					    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
 | 
					     * 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
 | 
					     * Get the number of chapters in the book
 | 
				
			||||||
     */
 | 
					     */
 | 
				
			||||||
    override fun getItemCount(): Int = chapterCount
 | 
					    override fun getItemCount(): Int = chapterList.size()
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    public fun bindScrollHandler(provider: PublishSubject<BookScrollEvent>,
 | 
					    public fun bindScrollHandler(provider: PublishSubject<BookScrollEvent>,
 | 
				
			||||||
                          lM: RecyclerView.LayoutManager) {
 | 
					                          lM: RecyclerView.LayoutManager) {
 | 
				
			||||||
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user