Change recent chapters query, now it shows last month updates. Download manager now uses a thread pool.

This commit is contained in:
inorichi
2016-01-21 02:26:34 +01:00
parent e6a17e25a9
commit fa71e906c9
4 changed files with 29 additions and 13 deletions

View File

@@ -42,7 +42,11 @@ public class RecentChaptersPresenter extends BasePresenter<RecentChaptersFragmen
}
private Observable<List<Object>> getRecentChaptersObservable() {
return db.getRecentChapters().asRxObservable()
Calendar cal = Calendar.getInstance();
cal.setTime(new Date());
cal.add(Calendar.MONTH, -1);
return db.getRecentChapters(cal.getTime()).asRxObservable()
// group chapters by the date they were fetched on a ordered map
.flatMap(recents -> Observable.from(recents)
.toMultimap(