fix(notificationsListFragment): 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. Merge this @sk22, as this is a thing that might also happen on megalodon
This commit is contained in:
parent
251ffbba8d
commit
4e13f868fd
|
@ -156,7 +156,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);
|
||||||
AccountSessionManager.getInstance().getAccount(accountID).markers
|
AccountSessionManager.getInstance().getAccount(accountID).markers
|
||||||
|
|
Loading…
Reference in New Issue