Skip to content

Commit

Permalink
Fix return order and filter of getAll query
Browse files Browse the repository at this point in the history
  • Loading branch information
tspoke committed Mar 15, 2017
1 parent 1b5d350 commit 5f138ba
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ public IDao<T> getStorage() {
*************************************************************************/

@Override
public Observable<List<T>> getAll(Filter filter, SortingMode sortingMode, CustomObserver<List<T>> otherSubscriber) {
public Observable<List<T>> getAll(final Filter filter, final SortingMode sortingMode, CustomObserver<List<T>> otherSubscriber) {
final Subscription s = getAll(filter, sortingMode)
.flatMap(new Func1<List<T>, Observable<List<T>>>() {
@Override
Expand All @@ -71,7 +71,8 @@ public List<T> call(Void aVoid) {
.flatMap(new Func1<List<T>, Observable<List<T>>>() {
@Override
public Observable<List<T>> call(List<T> ts) {
return storage.insertOrUpdate(ts);
storage.insertOrUpdate(ts);
return storage.getAll(filter, sortingMode);
}
})
.observeOn(AndroidSchedulers.mainThread())
Expand Down

0 comments on commit 5f138ba

Please sign in to comment.