Fix counter issue
This commit is contained in:
parent
fe30985a2f
commit
3eecc584d9
|
@ -708,9 +708,7 @@ public abstract class BaseMainActivity extends BaseActivity
|
|||
tabLayout.addTab(tabHome);
|
||||
tabLayout.addTab(tabNotif);
|
||||
tabPosition.put("home",0);
|
||||
typePosition.put(0, RetrieveFeedsAsyncTask.Type.HOME);
|
||||
tabPosition.put("notifications",1);
|
||||
typePosition.put(1, null);
|
||||
int i = 2;
|
||||
if( display_direct) {
|
||||
tabLayout.addTab(tabDirect);
|
||||
|
|
|
@ -161,7 +161,6 @@ public class DisplayStatusFragment extends Fragment implements OnRetrieveFeedsIn
|
|||
textviewNoAction = rootView.findViewById(R.id.no_action);
|
||||
mainLoader.setVisibility(View.VISIBLE);
|
||||
nextElementLoader.setVisibility(View.GONE);
|
||||
|
||||
userId = sharedpreferences.getString(Helper.PREF_KEY_ID, null);
|
||||
instance = sharedpreferences.getString(Helper.PREF_INSTANCE, context!=null?Helper.getLiveInstance(context):null);
|
||||
Account account = new AccountDAO(context, db).getAccountByID(userId);
|
||||
|
@ -521,8 +520,9 @@ public class DisplayStatusFragment extends Fragment implements OnRetrieveFeedsIn
|
|||
//Update the id of the last toot retrieved
|
||||
MainActivity.lastHomeId = status.getId();
|
||||
statuses.add(0, status);
|
||||
if (!status.getAccount().getId().equals(userId))
|
||||
if (!status.getAccount().getId().equals(userId)) {
|
||||
MainActivity.countNewStatus++;
|
||||
}
|
||||
try {
|
||||
((MainActivity) context).updateHomeCounter();
|
||||
}catch (Exception ignored){}
|
||||
|
|
Loading…
Reference in New Issue