Skip to content
Snippets Groups Projects
Commit cd2b4515 authored by Aadithya's avatar Aadithya
Browse files

- Trigger a update for notes after editing issue

- Trigger update for labels if necessary after updating issues
parent 345c3b7c
No related branches found
No related tags found
1 merge request!18Fix for issue #209 - Issue does not update when label is added
Loading
Loading
@@ -446,6 +446,7 @@ public class IssueActivity extends BaseActivity {
if (mIssue.getId() == event.mIssue.getId()) {
mIssue = event.mIssue;
bindIssue();
loadNotes();
}
}
}
Loading
Loading
Loading
Loading
@@ -101,8 +101,8 @@ public class IssueDetailsAdapter extends RecyclerView.Adapter<RecyclerView.ViewH
public void addNotes(List<Note> notes) {
if (!notes.isEmpty()) {
mNotes.addAll(notes);
notifyItemRangeChanged(HEADER_COUNT, HEADER_COUNT + mNotes.size());
}
notifyDataSetChanged();
}
 
public void addNote(Note note) {
Loading
Loading
@@ -111,8 +111,12 @@ public class IssueDetailsAdapter extends RecyclerView.Adapter<RecyclerView.ViewH
}
 
public void updateIssue(Issue issue) {
List<String> oldLabels = mIssue.getLabels();
mIssue = issue;
notifyItemChanged(0);
if (oldLabels.size() != mIssue.getLabels().size()) {
notifyItemChanged(1);
}
}
 
public void setLoading(boolean loading) {
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment