feat(NotificationsFragment): switch tab when triple clicking

This commit is contained in:
FineFindus 2023-03-18 16:03:54 +01:00
parent 62d5c7a492
commit ea823ef0cf
No known key found for this signature in database
GPG Key ID: 64873EE210FF8E6B
1 changed files with 5 additions and 0 deletions

View File

@ -202,6 +202,11 @@ public class NotificationsFragment extends MastodonToolbarFragment implements Sc
@Override
public void scrollToTop(){
if (getFragmentForPage(pager.getCurrentItem()).isScrolledToTop()) {
int nextPage = (pager.getCurrentItem() + 1) % tabViews.length;
pager.setCurrentItem(nextPage, true);
return;
}
getFragmentForPage(pager.getCurrentItem()).scrollToTop();
}