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:
@@ -151,7 +151,7 @@ public class NotificationsListFragment extends BaseStatusListFragment<Notificati
|
|||||||
loadRelationships(needRelationships);
|
loadRelationships(needRelationships);
|
||||||
maxID=result.maxID;
|
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());
|
E.post(new AllNotificationsSeenEvent());
|
||||||
new SaveMarkers(null, result.items.get(0).id).exec(accountID);
|
new SaveMarkers(null, result.items.get(0).id).exec(accountID);
|
||||||
if (AccountSessionManager.getInstance().getAccount(accountID).markers != null)
|
if (AccountSessionManager.getInstance().getAccount(accountID).markers != null)
|
||||||
|
|||||||
Reference in New Issue
Block a user