Skip to content
Snippets Groups Projects
Commit 0b8b387b authored by John's avatar John
Browse files

Merge branch 'develop' into 'develop'

Fix for issue #209 - Issue does not update when label is added

- Trigger update for labels if necessary after updating issues
- Trigger update for notes after issue is edited (Required if assignee is changed while editing the issue)
- Use `notifyItemRangeChanged` instead of `notfiyDatasetChanged` for updating notes

See merge request !18
parents 55fc6400 cd2b4515
No related branches found
No related tags found
1 merge request!18Fix for issue #209 - Issue does not update when label is added
Pipeline #
Loading
Loading
@@ -481,6 +481,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