feat(HomeTabFragment): switch timeline when triple clicking

Closes #83. When clicking the HomeTab and the timeline is already scrolled up, the timeline is cycled.
This commit is contained in:
FineFindus 2023-03-18 15:57:13 +01:00
parent 287e75e54a
commit 62d5c7a492
No known key found for this signature in database
GPG Key ID: 64873EE210FF8E6B
1 changed files with 5 additions and 0 deletions

View File

@ -477,6 +477,11 @@ public class HomeTabFragment extends MastodonToolbarFragment implements Scrollab
@Override
public void scrollToTop(){
if (((ScrollableToTop) fragments[pager.getCurrentItem()]).isScrolledToTop()) {
int nextPage = (pager.getCurrentItem() + 1) % count;
navigateTo(nextPage);
return;
}
((ScrollableToTop) fragments[pager.getCurrentItem()]).scrollToTop();
}