mirror of
https://github.com/sudoxnym/habitica-android.git
synced 2026-05-18 19:59:00 +00:00
fix task list widget
This commit is contained in:
parent
9babcac69a
commit
5eaea1a408
2 changed files with 6 additions and 3 deletions
|
|
@ -26,7 +26,12 @@ public class RealmTaskLocalRepository extends RealmBaseLocalRepository implement
|
|||
|
||||
@Override
|
||||
public Observable<RealmResults<Task>> getTasks(String taskType, String userID) {
|
||||
return realm.where(Task.class).equalTo("type", taskType).equalTo("userId", userID).findAllSorted("position").sort("dateCreated", Sort.DESCENDING).asObservable()
|
||||
return realm.where(Task.class)
|
||||
.equalTo("type", taskType)
|
||||
.equalTo("userId", userID)
|
||||
.findAllSorted("position")
|
||||
.sort("dateCreated", Sort.DESCENDING)
|
||||
.asObservable()
|
||||
.filter(RealmResults::isLoaded);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -74,8 +74,6 @@ public abstract class TaskListFactory implements RemoteViewsService.RemoteViewsF
|
|||
.flatMap(Observable::from)
|
||||
.filter(task -> task.type.equals(Task.TYPE_TODO) || task.isDisplayedActive(customDayStart))
|
||||
.toList()
|
||||
.subscribeOn(Schedulers.io())
|
||||
.observeOn(AndroidSchedulers.mainThread())
|
||||
.subscribe(tasks -> {
|
||||
taskList = tasks;
|
||||
this.reloadData = false;
|
||||
|
|
|
|||
Loading…
Reference in a new issue