Loading app/src/main/java/app/fedilab/android/mastodon/helper/PinnedTimelineHelper.java +2 −2 Original line number Diff line number Diff line Loading @@ -304,7 +304,7 @@ public class PinnedTimelineHelper { //Small hack to hide first tabs (they represent the item of the bottom menu) toRemove = itemToRemoveInBottomMenu(activity); for (int i = 0; i < (FedilabPageAdapter.BOTTOM_TIMELINE_COUNT - toRemove); i++) { activityMainBinding.tabLayout.addTab(activityMainBinding.tabLayout.newTab()); activityMainBinding.tabLayout.addTab(activityMainBinding.tabLayout.newTab(), false); ((ViewGroup) activityMainBinding.tabLayout.getChildAt(0)).getChildAt(i).setVisibility(View.GONE); } } Loading Loading @@ -413,7 +413,7 @@ public class PinnedTimelineHelper { //We be used to fetch position of tabs String slug = pinnedTimeline.type.getValue() + (ident != null ? "|" + ident : ""); tab.setTag(slug); activityMainBinding.tabLayout.addTab(tab); activityMainBinding.tabLayout.addTab(tab, false); pinnedTimelineVisibleList.add(pinnedTimeline); } } Loading app/src/main/java/app/fedilab/android/mastodon/ui/drawer/CacheAdapter.java +12 −3 Original line number Diff line number Diff line Loading @@ -28,6 +28,7 @@ import app.fedilab.android.databinding.DrawerCacheBinding; import app.fedilab.android.mastodon.client.entities.app.CacheAccount; import app.fedilab.android.mastodon.helper.CacheHelper; import app.fedilab.android.mastodon.helper.MastodonHelper; import app.fedilab.android.peertube.helper.Helper; public class CacheAdapter extends RecyclerView.Adapter<RecyclerView.ViewHolder> { Loading Loading @@ -61,9 +62,17 @@ public class CacheAdapter extends RecyclerView.Adapter<RecyclerView.ViewHolder> public void onBindViewHolder(@NonNull RecyclerView.ViewHolder viewHolder, int position) { CacheAccount cacheAccount = accountList.get(position); AccountCacheViewHolder holder = (AccountCacheViewHolder) viewHolder; if (cacheAccount.account.mastodon_account != null) { MastodonHelper.loadPPMastodon(holder.binding.pp, cacheAccount.account.mastodon_account); holder.binding.acct.setText(String.format("@%s@%s", cacheAccount.account.mastodon_account.username, cacheAccount.account.instance)); holder.binding.displayName.setText(cacheAccount.account.mastodon_account.display_name); } else if (cacheAccount.account.peertube_account != null) { Helper.loadAvatar(context, cacheAccount.account.peertube_account, holder.binding.pp); holder.binding.acct.setText(String.format("@%s@%s", cacheAccount.account.peertube_account.getUsername(), cacheAccount.account.instance)); holder.binding.displayName.setText(cacheAccount.account.peertube_account.getDisplayName()); } CacheHelper.getTimelineValues(context, cacheAccount.account, countStatuses -> { if (countStatuses != null && countStatuses.size() == 3) { holder.binding.homeCount.setText(String.valueOf(countStatuses.get(0))); Loading Loading
app/src/main/java/app/fedilab/android/mastodon/helper/PinnedTimelineHelper.java +2 −2 Original line number Diff line number Diff line Loading @@ -304,7 +304,7 @@ public class PinnedTimelineHelper { //Small hack to hide first tabs (they represent the item of the bottom menu) toRemove = itemToRemoveInBottomMenu(activity); for (int i = 0; i < (FedilabPageAdapter.BOTTOM_TIMELINE_COUNT - toRemove); i++) { activityMainBinding.tabLayout.addTab(activityMainBinding.tabLayout.newTab()); activityMainBinding.tabLayout.addTab(activityMainBinding.tabLayout.newTab(), false); ((ViewGroup) activityMainBinding.tabLayout.getChildAt(0)).getChildAt(i).setVisibility(View.GONE); } } Loading Loading @@ -413,7 +413,7 @@ public class PinnedTimelineHelper { //We be used to fetch position of tabs String slug = pinnedTimeline.type.getValue() + (ident != null ? "|" + ident : ""); tab.setTag(slug); activityMainBinding.tabLayout.addTab(tab); activityMainBinding.tabLayout.addTab(tab, false); pinnedTimelineVisibleList.add(pinnedTimeline); } } Loading
app/src/main/java/app/fedilab/android/mastodon/ui/drawer/CacheAdapter.java +12 −3 Original line number Diff line number Diff line Loading @@ -28,6 +28,7 @@ import app.fedilab.android.databinding.DrawerCacheBinding; import app.fedilab.android.mastodon.client.entities.app.CacheAccount; import app.fedilab.android.mastodon.helper.CacheHelper; import app.fedilab.android.mastodon.helper.MastodonHelper; import app.fedilab.android.peertube.helper.Helper; public class CacheAdapter extends RecyclerView.Adapter<RecyclerView.ViewHolder> { Loading Loading @@ -61,9 +62,17 @@ public class CacheAdapter extends RecyclerView.Adapter<RecyclerView.ViewHolder> public void onBindViewHolder(@NonNull RecyclerView.ViewHolder viewHolder, int position) { CacheAccount cacheAccount = accountList.get(position); AccountCacheViewHolder holder = (AccountCacheViewHolder) viewHolder; if (cacheAccount.account.mastodon_account != null) { MastodonHelper.loadPPMastodon(holder.binding.pp, cacheAccount.account.mastodon_account); holder.binding.acct.setText(String.format("@%s@%s", cacheAccount.account.mastodon_account.username, cacheAccount.account.instance)); holder.binding.displayName.setText(cacheAccount.account.mastodon_account.display_name); } else if (cacheAccount.account.peertube_account != null) { Helper.loadAvatar(context, cacheAccount.account.peertube_account, holder.binding.pp); holder.binding.acct.setText(String.format("@%s@%s", cacheAccount.account.peertube_account.getUsername(), cacheAccount.account.instance)); holder.binding.displayName.setText(cacheAccount.account.peertube_account.getDisplayName()); } CacheHelper.getTimelineValues(context, cacheAccount.account, countStatuses -> { if (countStatuses != null && countStatuses.size() == 3) { holder.binding.homeCount.setText(String.valueOf(countStatuses.get(0))); Loading