mirror of
https://github.com/sudoxnym/habitica-android.git
synced 2026-05-20 12:49:02 +00:00
fixes #278 - NPE likes was null
This commit is contained in:
parent
a871b3f1a5
commit
9aa0aee5af
1 changed files with 8 additions and 6 deletions
|
|
@ -249,13 +249,15 @@ public class ChatRecyclerViewAdapter extends RecyclerView.Adapter<ChatRecyclerVi
|
|||
likeCount = 0;
|
||||
currentUserLikedPost = false;
|
||||
|
||||
for (Map.Entry<String, Boolean> e : msg.likes.entrySet()) {
|
||||
if (e.getValue()) {
|
||||
likeCount++;
|
||||
}
|
||||
if(msg != null && msg.likes != null) {
|
||||
for (Map.Entry<String, Boolean> e : msg.likes.entrySet()) {
|
||||
if (e.getValue()) {
|
||||
likeCount++;
|
||||
}
|
||||
|
||||
if (e.getKey().equals(uuid)) {
|
||||
currentUserLikedPost = true;
|
||||
if (e.getKey().equals(uuid)) {
|
||||
currentUserLikedPost = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue