fix crash when notification markers are null
This would happen when an account had 0 notifications and received one. After which, the user would tap on the notification icon on the tab bar and the app would crash.
This commit is contained in:
parent
a6ac68499c
commit
69ddc95c2c
|
@ -151,7 +151,7 @@ public class NotificationsListFragment extends BaseStatusListFragment<Notificati
|
|||
loadRelationships(needRelationships);
|
||||
maxID=result.maxID;
|
||||
|
||||
if(offset==0 && !result.items.isEmpty() && !result.isFromCache()){
|
||||
if(offset==0 && !result.items.isEmpty() && !result.isFromCache() && AccountSessionManager.getInstance().getAccount(accountID).markers.notifications != null){
|
||||
E.post(new AllNotificationsSeenEvent());
|
||||
new SaveMarkers(null, result.items.get(0).id).exec(accountID);
|
||||
if (AccountSessionManager.getInstance().getAccount(accountID).markers != null)
|
||||
|
|
Loading…
Reference in New Issue