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);
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);
}