diff --git a/app/src/main/java/org/bspeice/minimalbible/activity/viewer/ExpListNavDrawerFragment.java b/app/src/main/java/org/bspeice/minimalbible/activity/viewer/ExpListNavDrawerFragment.java index c8e8e8e..9bc3419 100644 --- a/app/src/main/java/org/bspeice/minimalbible/activity/viewer/ExpListNavDrawerFragment.java +++ b/app/src/main/java/org/bspeice/minimalbible/activity/viewer/ExpListNavDrawerFragment.java @@ -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> chapterMap = new HashMap>(); + Map> chapterMap; if (mainBook != null) { - vUtil.getBooks(mainBook).map(new Func1>>() { + chapterMap = vUtil.getBooks(mainBook).map(new Func1>>() { @Override public Map> call(BibleBook bibleBook) { // These lines are important @@ -103,13 +103,13 @@ public class ExpListNavDrawerFragment extends NavDrawerFragment { }) .toBlocking() .first(); + + ExpListNavAdapter adapter = + new ExpListNavAdapter(bibleBooks, chapterMap); + + mActualListView.setAdapter(adapter); } - ExpListNavAdapter adapter = - new ExpListNavAdapter(bibleBooks, chapterMap); - - mActualListView.setAdapter(adapter); - mActualListView.setItemChecked(mCurrentSelectedPosition, true); return mActualListView; }