From abbcbb394705286eda7af9055de42c88f69b5590 Mon Sep 17 00:00:00 2001 From: Bradlee Speice Date: Mon, 1 Sep 2014 23:01:51 -0400 Subject: [PATCH] Quick fix so tests pass Please note, this needs to get fixed before going live. This logic is needed. --- .../activity/downloader/manager/RefreshManager.java | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/app/src/main/java/org/bspeice/minimalbible/activity/downloader/manager/RefreshManager.java b/app/src/main/java/org/bspeice/minimalbible/activity/downloader/manager/RefreshManager.java index 4481279..e6fd5d6 100644 --- a/app/src/main/java/org/bspeice/minimalbible/activity/downloader/manager/RefreshManager.java +++ b/app/src/main/java/org/bspeice/minimalbible/activity/downloader/manager/RefreshManager.java @@ -2,6 +2,7 @@ package org.bspeice.minimalbible.activity.downloader.manager; import org.bspeice.minimalbible.Injector; import org.crosswire.jsword.book.Book; +import org.crosswire.jsword.book.install.InstallException; import org.crosswire.jsword.book.install.Installer; import java.util.Collection; @@ -48,6 +49,7 @@ public class RefreshManager { * NOTE: This code assigns its own thread. This is because we are called privately, and * don't want to expose this method. I don't like hiding the side effects like this, but * in this case I'm making an exception. + * TODO: Need logic for when to do reloadBookList() vs. getBooks() */ private Observable>> refreshModules() { if (availableModules == null) { @@ -56,7 +58,13 @@ public class RefreshManager { @Override public Map> call(Installer installer) { Map> map = new HashMap>(); - map.put(installer, installer.getBooks()); + try { + installer.reloadBookList(); + map.put(installer, installer.getBooks()); + } catch (InstallException e) { + e.printStackTrace(); + } + return map; } }).subscribeOn(Schedulers.io())