1
0
mirror of https://github.com/KokaKiwi/BarInsta synced 2024-12-26 22:56:58 +00:00

Handle null client context for action log direct items

This commit is contained in:
Ammar Githam 2021-01-02 15:28:18 +09:00
parent 502d72ecd8
commit 093ccc9f00

View File

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