- Declare RxJava as dependency
- Add a folder chooser for downloads
- Fix a force close when updating library
- Enable ACRA and add a setting to send crash reports
- Manga class now uses the default get resolver
- Other minor changes
This commit is contained in:
inorichi
2015-12-08 19:39:57 +01:00
parent 65a2345bf7
commit e1b68f66f2
18 changed files with 217 additions and 133 deletions

View File

@@ -32,7 +32,6 @@ public class LibraryUpdateService extends Service {
@Inject SourceManager sourceManager;
private Subscription updateSubscription;
private Subscription favoriteMangasSubscription;
public static final int UPDATE_NOTIFICATION_ID = 1;
@@ -68,14 +67,9 @@ public class LibraryUpdateService extends Service {
return START_NOT_STICKY;
}
if (favoriteMangasSubscription != null && !favoriteMangasSubscription.isUnsubscribed())
favoriteMangasSubscription.unsubscribe();
favoriteMangasSubscription = db.getFavoriteMangas().createObservable()
Observable.fromCallable(() -> db.getFavoriteMangas().executeAsBlocking())
.subscribe(mangas -> {
// Don't receive further db updates
favoriteMangasSubscription.unsubscribe();
this.startUpdating(mangas, startId);
startUpdating(mangas, startId);
});
return START_STICKY;