diff options
Diffstat (limited to 'app/src/main/java')
-rw-r--r-- | app/src/main/java/ml/docilealligator/infinityforreddit/Activity/MainActivity.java | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/app/src/main/java/ml/docilealligator/infinityforreddit/Activity/MainActivity.java b/app/src/main/java/ml/docilealligator/infinityforreddit/Activity/MainActivity.java index 14c12d2e..ad7458f7 100644 --- a/app/src/main/java/ml/docilealligator/infinityforreddit/Activity/MainActivity.java +++ b/app/src/main/java/ml/docilealligator/infinityforreddit/Activity/MainActivity.java @@ -1366,9 +1366,17 @@ public class MainActivity extends BaseActivity implements SortTypeSelectionCallb void goBackToTop() { if (viewPager.getCurrentItem() == 0) { - tab1.goBackToTop(); + if (mAccessToken != null && tab1 != null) { + tab1.goBackToTop(); + } else if (tab2 != null) { + tab2.goBackToTop(); + } } else if (viewPager.getCurrentItem() == 1) { - tab2.goBackToTop(); + if (mAccessToken != null && tab2 != null) { + tab2.goBackToTop(); + } else if (tab3 != null) { + tab3.goBackToTop(); + } } else { tab3.goBackToTop(); } |