mirror of
https://github.com/MinimalBible/MinimalBible
synced 2024-12-22 14:48:23 -05:00
Fix NPE trying to open a book
This commit is contained in:
parent
2ee16ceb4f
commit
bfde7d5839
@ -70,9 +70,9 @@ public class ExpListNavDrawerFragment extends NavDrawerFragment {
|
||||
// I really don't like how we build the chapters, but I'm not adding Guava just for Range.
|
||||
// RXJava does get ridiculous with the angle brackets, you have me there. But Intellij
|
||||
// folds nicely.
|
||||
Map<String, List<Integer>> chapterMap = new HashMap<String, List<Integer>>();
|
||||
Map<String, List<Integer>> chapterMap;
|
||||
if (mainBook != null) {
|
||||
vUtil.getBooks(mainBook).map(new Func1<BibleBook, Map<String, List<Integer>>>() {
|
||||
chapterMap = vUtil.getBooks(mainBook).map(new Func1<BibleBook, Map<String, List<Integer>>>() {
|
||||
@Override
|
||||
public Map<String, List<Integer>> call(BibleBook bibleBook) {
|
||||
// These lines are important
|
||||
@ -103,13 +103,13 @@ public class ExpListNavDrawerFragment extends NavDrawerFragment {
|
||||
})
|
||||
.toBlocking()
|
||||
.first();
|
||||
|
||||
ExpListNavAdapter<String, Integer> adapter =
|
||||
new ExpListNavAdapter<String, Integer>(bibleBooks, chapterMap);
|
||||
|
||||
mActualListView.setAdapter(adapter);
|
||||
}
|
||||
|
||||
ExpListNavAdapter<String, Integer> adapter =
|
||||
new ExpListNavAdapter<String, Integer>(bibleBooks, chapterMap);
|
||||
|
||||
mActualListView.setAdapter(adapter);
|
||||
|
||||
mActualListView.setItemChecked(mCurrentSelectedPosition, true);
|
||||
return mActualListView;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user