Merge pull request #131

fix(home-double-tab): scroll up for new posts
This commit is contained in:
LucasGGamerM
2023-03-23 13:52:39 -03:00
committed by GitHub

View File

@@ -1,6 +1,7 @@
package org.joinmastodon.android.fragments;
import static org.joinmastodon.android.GlobalUserPreferences.reduceMotion;
import static org.joinmastodon.android.GlobalUserPreferences.showNewPostsButton;
import android.animation.Animator;
import android.animation.AnimatorListenerAdapter;
@@ -477,7 +478,8 @@ public class HomeTabFragment extends MastodonToolbarFragment implements Scrollab
@Override
public void scrollToTop(){
if (((ScrollableToTop) fragments[pager.getCurrentItem()]).isScrolledToTop() && !GlobalUserPreferences.disableDoubleTapToSwipe) {
if (((ScrollableToTop) fragments[pager.getCurrentItem()]).isScrolledToTop() &&
!GlobalUserPreferences.disableDoubleTapToSwipe && !newPostsBtnShown) {
int nextPage = (pager.getCurrentItem() + 1) % count;
navigateTo(nextPage);
return;