Fix notifications

This commit is contained in:
Grishka 2022-04-04 02:28:21 +03:00
parent a0cbf0fa31
commit fd3613109d
2 changed files with 2 additions and 2 deletions

View File

@ -90,7 +90,7 @@ public class NotificationsListFragment extends BaseStatusListFragment<Notificati
public void onSuccess(List<Notification> result){
if(refreshing)
relationships.clear();
onDataLoaded(result, !result.isEmpty());
onDataLoaded(result.stream().filter(n->n.type!=null).collect(Collectors.toList()), !result.isEmpty());
Set<String> needRelationships=result.stream()
.filter(ntf->ntf.status==null && !relationships.containsKey(ntf.account.id))
.map(ntf->ntf.account.id)

View File

@ -12,7 +12,7 @@ import java.time.Instant;
public class Notification extends BaseModel implements DisplayItemsParent{
@RequiredField
public String id;
@RequiredField
// @RequiredField
public Type type;
@RequiredField
public Instant createdAt;