From 44ed414f28d6254ed85195761cf6d45e88bd31da Mon Sep 17 00:00:00 2001 From: Alex Ning Date: Sun, 16 Jan 2022 09:49:07 +0800 Subject: Go back to top of the feed after changing sort type or refreshing. --- .../ml/docilealligator/infinityforreddit/fragments/PostFragment.java | 2 ++ 1 file changed, 2 insertions(+) (limited to 'app/src/main/java') diff --git a/app/src/main/java/ml/docilealligator/infinityforreddit/fragments/PostFragment.java b/app/src/main/java/ml/docilealligator/infinityforreddit/fragments/PostFragment.java index 09655d7c..6d63b6c7 100644 --- a/app/src/main/java/ml/docilealligator/infinityforreddit/fragments/PostFragment.java +++ b/app/src/main/java/ml/docilealligator/infinityforreddit/fragments/PostFragment.java @@ -1371,6 +1371,7 @@ public class PostFragment extends Fragment implements FragmentCommunicator { } this.sortType = sortType; mPostViewModel.changeSortType(sortType); + goBackToTop(); } } @@ -1446,6 +1447,7 @@ public class PostFragment extends Fragment implements FragmentCommunicator { } saveCache(); mAdapter.refresh(); + goBackToTop(); } private void showErrorView(int stringResId) { -- cgit v1.2.3