avoid null in notification display items
fixes bug where type = status, but status = null, causing buildDisplayItems to return a null title status item and an account card
This commit is contained in:
parent
50c844aa25
commit
bc0b56a90e
|
@ -22,10 +22,12 @@ import org.parceler.Parcels;
|
|||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
import java.util.Set;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.recyclerview.widget.RecyclerView;
|
||||
import me.grishka.appkit.Nav;
|
||||
import me.grishka.appkit.api.SimpleCallback;
|
||||
|
@ -76,9 +78,11 @@ public class NotificationsListFragment extends BaseStatusListFragment<Notificati
|
|||
if(titleItem!=null)
|
||||
items.add(0, titleItem);
|
||||
return items;
|
||||
}else{
|
||||
}else if(extraText!=null){
|
||||
AccountCardStatusDisplayItem card=new AccountCardStatusDisplayItem(n.id, this, n.account);
|
||||
return Arrays.asList(titleItem, card);
|
||||
}else{
|
||||
return Collections.emptyList();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue