mirror of
https://codeberg.org/tom79/Fedilab.git
synced 2025-01-07 00:20:08 +02:00
Fix issue #362 - Crash with notifications
This commit is contained in:
parent
23ce0c4b06
commit
2d51946fd6
1 changed files with 2 additions and 2 deletions
|
@ -421,12 +421,12 @@ public class FragmentMastodonNotification extends Fragment implements Notificati
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private List<Notification> aggregateNotifications(List<Notification> notifications) {
|
private List<Notification> aggregateNotifications(@NonNull List<Notification> notifications) {
|
||||||
List<Notification> notificationList = new ArrayList<>();
|
List<Notification> notificationList = new ArrayList<>();
|
||||||
int refPosition = 0;
|
int refPosition = 0;
|
||||||
for (int i = 0; i < notifications.size(); i++) {
|
for (int i = 0; i < notifications.size(); i++) {
|
||||||
if (i != refPosition) {
|
if (i != refPosition) {
|
||||||
if (notifications.get(i).type.equals(notifications.get(refPosition).type)
|
if (notifications.get(i).type != null && notifications.get(refPosition).type != null && notifications.get(i).type.equals(notifications.get(refPosition).type)
|
||||||
&& (notifications.get(i).type.equals("favourite") || notifications.get(i).type.equals("reblog"))
|
&& (notifications.get(i).type.equals("favourite") || notifications.get(i).type.equals("reblog"))
|
||||||
&& notifications.get(i).status != null && notifications.get(refPosition).status != null && notifications.get(i).status.id.equals(notifications.get(refPosition).status.id)
|
&& notifications.get(i).status != null && notifications.get(refPosition).status != null && notifications.get(i).status.id.equals(notifications.get(refPosition).status.id)
|
||||||
) {
|
) {
|
||||||
|
|
Loading…
Reference in a new issue