Sort animations

pull/795/head
Alex Baker 6 years ago
parent 2b0933255a
commit dc0eb2b2e3

@ -129,6 +129,7 @@ public class MainActivity extends InjectingAppCompatActivity
private CompositeDisposable disposables; private CompositeDisposable disposables;
private NavigationDrawerFragment navigationDrawer; private NavigationDrawerFragment navigationDrawer;
private int currentNightMode; private int currentNightMode;
private TaskListViewModel viewModel;
private Filter filter; private Filter filter;
private ActionMode actionMode = null; private ActionMode actionMode = null;
@ -138,7 +139,7 @@ public class MainActivity extends InjectingAppCompatActivity
protected void onCreate(Bundle savedInstanceState) { protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState); super.onCreate(savedInstanceState);
TaskListViewModel viewModel = ViewModelProviders.of(this).get(TaskListViewModel.class); viewModel = ViewModelProviders.of(this).get(TaskListViewModel.class);
getComponent().inject(viewModel); getComponent().inject(viewModel);
@ -529,7 +530,11 @@ public class MainActivity extends InjectingAppCompatActivity
@Override @Override
public void sortChanged() { public void sortChanged() {
localBroadcastManager.broadcastRefresh(); localBroadcastManager.broadcastRefresh();
onFilterItemClicked(filter); disposables.add(
Single.fromCallable(() -> newTaskListFragment(filter))
.subscribeOn(Schedulers.io())
.observeOn(AndroidSchedulers.mainThread())
.subscribe(this::openTaskListFragment));
} }
@Override @Override

Loading…
Cancel
Save