Fix a NullPointerException in NotificationsListFragment.java

- Some notifications will have the status attribute set as null and the if in 128 is trying to access to attributes from a null object, causing a NPE as soon the app is opened.
This commit is contained in:
Rafael Carrillo
2025-05-16 18:12:35 -07:00
parent 732a0f9b4c
commit b56a922c65

View File

@@ -125,7 +125,7 @@ public class NotificationsListFragment extends BaseStatusListFragment<Notificati
NotificationHeaderStatusDisplayItem titleItem;
Account self=AccountSessionManager.get(accountID).self;
if(n.type==Notification.Type.MENTION || n.type==Notification.Type.STATUS
|| (n.type==Notification.Type.REBLOG && n.status.account != null && !n.status.account.id.equals(self.id))){ // Iceshrimp quote
|| (n.type==Notification.Type.REBLOG && n.status != null && n.status.account != null && !n.status.account.id.equals(self.id))){ // Iceshrimp quote
titleItem=null;
}else{
titleItem=new NotificationHeaderStatusDisplayItem(n.id, this, n, accountID);