From 758ed7c09cf1f2fd24918ff458383efdcceeb328 Mon Sep 17 00:00:00 2001 From: Pierre Date: Sun, 8 Apr 2018 13:58:06 +0200 Subject: [PATCH] Removed warning. --- .../comunic/client/ui/fragments/PostsListFragment.java | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/app/src/main/java/org/communiquons/android/comunic/client/ui/fragments/PostsListFragment.java b/app/src/main/java/org/communiquons/android/comunic/client/ui/fragments/PostsListFragment.java index fb7f11d..b90217f 100644 --- a/app/src/main/java/org/communiquons/android/comunic/client/ui/fragments/PostsListFragment.java +++ b/app/src/main/java/org/communiquons/android/comunic/client/ui/fragments/PostsListFragment.java @@ -410,6 +410,10 @@ public class PostsListFragment extends Fragment @Override public void onCommentLikeUpdate(final Comment comment, final boolean is_liking) { + //Update information in the comment object + comment.setUser_like(is_liking); + comment.setLikes(comment.getLikes() + (is_liking ? 1 : -1)); + //Perform the operation in the background new AsyncTask(){ @@ -425,7 +429,8 @@ public class PostsListFragment extends Fragment public void onUpdateCommentContent(final Comment comment) { //Inflate the content of the dialog - View content = getActivity().getLayoutInflater().inflate(R.layout.dialog_edit_comment, null); + View content = getActivity().getLayoutInflater().inflate(R.layout.dialog_edit_comment, + mListView); final EditCommentContentView commentInput = content.findViewById(R.id.input_comment_content); commentInput.setText(comment.getContent());