1
0
mirror of https://github.com/KokaKiwi/BarInsta synced 2024-11-26 08:37:29 +00:00

small fixes so i can test

1. left users are users not ids
2. null guard (crash)
3. arbitrary fix for layout issue
This commit is contained in:
Austin Huang 2021-01-02 21:32:31 -05:00
parent 7e88fda645
commit 47e8645dea
No known key found for this signature in database
GPG Key ID: 84C23AA04587A91F
3 changed files with 5 additions and 4 deletions

View File

@ -69,7 +69,7 @@ public final class DirectItemsAdapter extends RecyclerView.Adapter<RecyclerView.
if (bothHeaders) {
return oldItem.date.equals(newItem.date);
}
if (oldItem.item != null && newItem.item != null) {
if (oldItem.item != null && oldItem.item.getClientContext() != null && newItem.item != null) {
return oldItem.item.getClientContext().equals(newItem.item.getClientContext());
}
return false;

View File

@ -10,7 +10,7 @@ public class DirectThread {
private final String threadId;
private final String threadV2Id;
private final List<DirectUser> users;
private final List<String> leftUsers;
private final List<DirectUser> leftUsers;
private final List<String> adminUserIds;
private final List<DirectItem> items;
private final long lastActivityAt;
@ -42,7 +42,7 @@ public class DirectThread {
public DirectThread(final String threadId,
final String threadV2Id,
final List<DirectUser> users,
final List<String> leftUsers,
final List<DirectUser> leftUsers,
final List<String> adminUserIds,
final List<DirectItem> items,
final long lastActivityAt,
@ -115,7 +115,7 @@ public class DirectThread {
return users;
}
public List<String> getLeftUsers() {
public List<DirectUser> getLeftUsers() {
return leftUsers;
}

View File

@ -123,6 +123,7 @@
app:layout_constraintStart_toEndOf="@id/ivProfilePic"
app:layout_constraintTop_toBottomOf="@id/tvUsername"
app:layout_constraintWidth_min="wrap"
app:layout_constraintWidth_max="230dp"
app:viewPartInfo="@id/message_info"
app:viewPartMain="@id/message">