Improves the timeline

This commit is contained in:
stom79 2018-10-10 10:42:30 +02:00
parent 1ecccf8c46
commit e0c3845a9b
2 changed files with 20 additions and 5 deletions

View File

@ -1751,22 +1751,37 @@ public abstract class BaseMainActivity extends BaseActivity
}else if( position == 1) {
notificationsFragment = new DisplayNotificationsFragment();
return notificationsFragment;
}else if( position == 2 && display_local) {
}else if( position == 2 && display_direct) {
statusFragment = new DisplayStatusFragment();
bundle.putSerializable("type", RetrieveFeedsAsyncTask.Type.DIRECT);
statusFragment.setArguments(bundle);
return statusFragment;
}else if(position == 2 && display_local ){
statusFragment = new DisplayStatusFragment();
bundle.putSerializable("type", RetrieveFeedsAsyncTask.Type.LOCAL);
statusFragment.setArguments(bundle);
return statusFragment;
}else if(position == 2 && display_global){
}else if(position == 2 && display_global ){
statusFragment = new DisplayStatusFragment();
bundle.putSerializable("type", RetrieveFeedsAsyncTask.Type.PUBLIC);
statusFragment.setArguments(bundle);
return statusFragment;
}else if (position == 3 && display_global && display_local){
}else if (position == 3 && display_local && display_direct){
statusFragment = new DisplayStatusFragment();
bundle.putSerializable("type", RetrieveFeedsAsyncTask.Type.LOCAL);
statusFragment.setArguments(bundle);
return statusFragment;
}else if (position == 3 && display_global && display_direct){
statusFragment = new DisplayStatusFragment();
bundle.putSerializable("type", RetrieveFeedsAsyncTask.Type.PUBLIC);
statusFragment.setArguments(bundle);
return statusFragment;
}else{ //Here it's a search fragment
} else if (position == 4 && display_global){
statusFragment = new DisplayStatusFragment();
bundle.putSerializable("type", RetrieveFeedsAsyncTask.Type.PUBLIC);
statusFragment.setArguments(bundle);
return statusFragment;
} else{ //Here it's a search fragment
statusFragment = new DisplayStatusFragment();
bundle.putSerializable("type", RetrieveFeedsAsyncTask.Type.TAG);
if( tabLayout.getTabAt(position) != null && tabLayout.getTabAt(position).getText() != null)

View File

@ -460,7 +460,7 @@ public class DisplayStatusFragment extends Fragment implements OnRetrieveFeedsIn
}
} else if (type == RetrieveFeedsAsyncTask.Type.PUBLIC || type == RetrieveFeedsAsyncTask.Type.LOCAL) {
} else if (type == RetrieveFeedsAsyncTask.Type.PUBLIC || type == RetrieveFeedsAsyncTask.Type.LOCAL|| type == RetrieveFeedsAsyncTask.Type.DIRECT) {
status.setNew(false);
statuses.add(0, status);