Go back to top of the feed after changing sort type or refreshing.

This commit is contained in:
Alex Ning 2022-01-16 09:49:07 +08:00
parent 94f08d616a
commit 44ed414f28

View File

@ -1371,6 +1371,7 @@ public class PostFragment extends Fragment implements FragmentCommunicator {
} }
this.sortType = sortType; this.sortType = sortType;
mPostViewModel.changeSortType(sortType); mPostViewModel.changeSortType(sortType);
goBackToTop();
} }
} }
@ -1446,6 +1447,7 @@ public class PostFragment extends Fragment implements FragmentCommunicator {
} }
saveCache(); saveCache();
mAdapter.refresh(); mAdapter.refresh();
goBackToTop();
} }
private void showErrorView(int stringResId) { private void showErrorView(int stringResId) {