Fix crash when switching lists

If show subtasks disabled and sort set to 'My order', app would crash
when switching between manually sortable and non-manually sortable lists
pull/996/head
Alex Baker 5 years ago
parent 5cae334688
commit 66e1ba7552

@ -45,6 +45,8 @@ public class TaskListViewModel extends ViewModel implements Observer<PagedList<T
private LiveData<PagedList<TaskContainer>> internal; private LiveData<PagedList<TaskContainer>> internal;
public void setFilter(@NonNull Filter filter) { public void setFilter(@NonNull Filter filter) {
boolean manualSort =
preferences.showSubtasks() || (filter.supportsManualSort() && preferences.isManualSort());
setFilter(filter, manualSort); setFilter(filter, manualSort);
} }

Loading…
Cancel
Save