mirror of
https://github.com/MinimalBible/MinimalBible-Legacy
synced 2024-11-16 04:58:26 -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 javax.inject.Inject;
|
||||||
|
|
||||||
|
import rx.schedulers.Schedulers;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Thread that handles downloading a book
|
* Thread that handles downloading a book
|
||||||
*/
|
*/
|
||||||
@ -31,6 +33,7 @@ public class BookDownloadThread {
|
|||||||
|
|
||||||
// First, look up where the Book came from
|
// First, look up where the Book came from
|
||||||
refreshManager.installerFromBook(b)
|
refreshManager.installerFromBook(b)
|
||||||
|
.subscribeOn(Schedulers.io())
|
||||||
.subscribe((installer) -> {
|
.subscribe((installer) -> {
|
||||||
try {
|
try {
|
||||||
installer.install(b);
|
installer.install(b);
|
||||||
|
Loading…
Reference in New Issue
Block a user