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:
parent
287e75e54a
commit
62d5c7a492
|
@ -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();
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue