From c0f8d145f83b852ebd4fa7e407da26754e379936 Mon Sep 17 00:00:00 2001 From: Stypox Date: Wed, 20 Dec 2023 22:46:24 +0100 Subject: [PATCH] Fix lag with many channels on main page Disable loading all tabs at once, since there can be many of them, and use default strategy of only keeping in memory the two tabs adjacent to the current tab. --- app/src/main/java/org/schabi/newpipe/fragments/MainFragment.java | 1 - 1 file changed, 1 deletion(-) diff --git a/app/src/main/java/org/schabi/newpipe/fragments/MainFragment.java b/app/src/main/java/org/schabi/newpipe/fragments/MainFragment.java index 96b13922b..d50f0b0d8 100644 --- a/app/src/main/java/org/schabi/newpipe/fragments/MainFragment.java +++ b/app/src/main/java/org/schabi/newpipe/fragments/MainFragment.java @@ -194,7 +194,6 @@ public class MainFragment extends BaseFragment implements TabLayout.OnTabSelecte } binding.pager.setAdapter(null); - binding.pager.setOffscreenPageLimit(tabsList.size()); binding.pager.setAdapter(pagerAdapter); updateTabsIconAndDescription();