refactor: fix compilation errors on the HomeTabFragment.java

This commit is contained in:
LucasGGamerM 2023-08-24 07:41:11 -03:00
parent f9b4f9d1b4
commit 316c660478
1 changed files with 8 additions and 8 deletions

View File

@ -115,14 +115,14 @@ public class HomeTabFragment extends MastodonToolbarFragment implements Scrollab
super.onCreate(savedInstanceState); super.onCreate(savedInstanceState);
E.register(this); E.register(this);
accountID = getArguments().getString("account"); accountID = getArguments().getString("account");
timelineDefinitions = GlobalUserPreferences.pinnedTimelines.getOrDefault(accountID, TimelineDefinition.getDefaultTimelines(accountID)); timelinesList=AccountSessionManager.get(accountID).getLocalPreferences().timelines;
assert timelineDefinitions != null; assert timelinesList!=null;
if (timelineDefinitions.size() == 0) timelineDefinitions = List.of(TimelineDefinition.HOME_TIMELINE); if(timelinesList.isEmpty()) timelinesList=List.of(TimelineDefinition.HOME_TIMELINE);
count = timelineDefinitions.size(); count=timelinesList.size();
fragments = new Fragment[count]; fragments=new Fragment[count];
tabViews = new FrameLayout[count]; tabViews=new FrameLayout[count];
timelines = new TimelineDefinition[count]; timelines=new TimelineDefinition[count];
if(GlobalUserPreferences.disableMarquee){ if(GlobalUserPreferences.toolbarMarquee){
setTitleMarqueeEnabled(false); setTitleMarqueeEnabled(false);
setSubtitleMarqueeEnabled(false); setSubtitleMarqueeEnabled(false);
} }