From 316c66047877be3d486c122718210cc41b5408f2 Mon Sep 17 00:00:00 2001 From: LucasGGamerM Date: Thu, 24 Aug 2023 07:41:11 -0300 Subject: [PATCH] refactor: fix compilation errors on the HomeTabFragment.java --- .../android/fragments/HomeTabFragment.java | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/mastodon/src/main/java/org/joinmastodon/android/fragments/HomeTabFragment.java b/mastodon/src/main/java/org/joinmastodon/android/fragments/HomeTabFragment.java index c08f2f4a9..89e089bfb 100644 --- a/mastodon/src/main/java/org/joinmastodon/android/fragments/HomeTabFragment.java +++ b/mastodon/src/main/java/org/joinmastodon/android/fragments/HomeTabFragment.java @@ -115,14 +115,14 @@ public class HomeTabFragment extends MastodonToolbarFragment implements Scrollab super.onCreate(savedInstanceState); E.register(this); accountID = getArguments().getString("account"); - timelineDefinitions = GlobalUserPreferences.pinnedTimelines.getOrDefault(accountID, TimelineDefinition.getDefaultTimelines(accountID)); - assert timelineDefinitions != null; - if (timelineDefinitions.size() == 0) timelineDefinitions = List.of(TimelineDefinition.HOME_TIMELINE); - count = timelineDefinitions.size(); - fragments = new Fragment[count]; - tabViews = new FrameLayout[count]; - timelines = new TimelineDefinition[count]; - if(GlobalUserPreferences.disableMarquee){ + timelinesList=AccountSessionManager.get(accountID).getLocalPreferences().timelines; + assert timelinesList!=null; + if(timelinesList.isEmpty()) timelinesList=List.of(TimelineDefinition.HOME_TIMELINE); + count=timelinesList.size(); + fragments=new Fragment[count]; + tabViews=new FrameLayout[count]; + timelines=new TimelineDefinition[count]; + if(GlobalUserPreferences.toolbarMarquee){ setTitleMarqueeEnabled(false); setSubtitleMarqueeEnabled(false); }