feat: readd double click to swipe in NotificationsFragment

This commit is contained in:
LucasGGamerM 2023-08-26 17:05:29 -03:00
parent dd110c7c74
commit 45a990eca5
1 changed files with 6 additions and 0 deletions

View File

@ -270,9 +270,15 @@ public class NotificationsFragment extends MastodonToolbarFragment implements Sc
@Override @Override
public void scrollToTop(){ public void scrollToTop(){
if (getFragmentForPage(pager.getCurrentItem()).isOnTop() && GlobalUserPreferences.doubleTapToSwipe) {
int nextPage = (pager.getCurrentItem() + 1) % tabViews.length;
pager.setCurrentItem(nextPage, true);
return;
}
getFragmentForPage(pager.getCurrentItem()).scrollToTop(); getFragmentForPage(pager.getCurrentItem()).scrollToTop();
} }
public void loadData(){ public void loadData(){
refreshFollowRequestsBadge(); refreshFollowRequestsBadge();
if(allNotificationsFragment!=null && !allNotificationsFragment.loaded && !allNotificationsFragment.dataLoading) if(allNotificationsFragment!=null && !allNotificationsFragment.loaded && !allNotificationsFragment.dataLoading)