Fix notifications
This commit is contained in:
parent
a0cbf0fa31
commit
fd3613109d
|
@ -90,7 +90,7 @@ public class NotificationsListFragment extends BaseStatusListFragment<Notificati
|
||||||
public void onSuccess(List<Notification> result){
|
public void onSuccess(List<Notification> result){
|
||||||
if(refreshing)
|
if(refreshing)
|
||||||
relationships.clear();
|
relationships.clear();
|
||||||
onDataLoaded(result, !result.isEmpty());
|
onDataLoaded(result.stream().filter(n->n.type!=null).collect(Collectors.toList()), !result.isEmpty());
|
||||||
Set<String> needRelationships=result.stream()
|
Set<String> needRelationships=result.stream()
|
||||||
.filter(ntf->ntf.status==null && !relationships.containsKey(ntf.account.id))
|
.filter(ntf->ntf.status==null && !relationships.containsKey(ntf.account.id))
|
||||||
.map(ntf->ntf.account.id)
|
.map(ntf->ntf.account.id)
|
||||||
|
|
|
@ -12,7 +12,7 @@ import java.time.Instant;
|
||||||
public class Notification extends BaseModel implements DisplayItemsParent{
|
public class Notification extends BaseModel implements DisplayItemsParent{
|
||||||
@RequiredField
|
@RequiredField
|
||||||
public String id;
|
public String id;
|
||||||
@RequiredField
|
// @RequiredField
|
||||||
public Type type;
|
public Type type;
|
||||||
@RequiredField
|
@RequiredField
|
||||||
public Instant createdAt;
|
public Instant createdAt;
|
||||||
|
|
Loading…
Reference in New Issue