mirror of
https://github.com/MinimalBible/MinimalBible-Legacy
synced 2024-12-21 22:28:18 -05:00
Fix a NetworkOnMainThreadException
This commit is contained in:
parent
ba3c6ebe6c
commit
93abe065a2
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user