Fix a NetworkOnMainThreadException

Rx/Retrolambda
Bradlee Speice 2014-06-14 14:10:43 -04:00
parent ba3c6ebe6c
commit 93abe065a2
1 changed files with 3 additions and 0 deletions

View File

@ -9,6 +9,8 @@ import org.crosswire.jsword.book.install.Installer;
import javax.inject.Inject;
import rx.schedulers.Schedulers;
/**
* Thread that handles downloading a book
*/
@ -31,6 +33,7 @@ public class BookDownloadThread {
// First, look up where the Book came from
refreshManager.installerFromBook(b)
.subscribeOn(Schedulers.io())
.subscribe((installer) -> {
try {
installer.install(b);