Ensure reply dialog comments are properly sorted
When making inline comments, they were appended, which means they would appear in the order that they were added. Ensure proper sorting based on the line number (or -1 if it’s a file comment). Change-Id: Ic1ba951184a468d78b09581831e2b4623fbfb7e2
This commit is contained in:
@@ -217,6 +217,11 @@
|
||||
}
|
||||
}
|
||||
diffDrafts[draft.path].push(draft);
|
||||
diffDrafts[draft.path].sort(function(c1, c2) {
|
||||
// No line number means that it’s a file comment. Sort it above the
|
||||
// others.
|
||||
return (c1.line || -1) - (c2.line || -1);
|
||||
});
|
||||
this._diffDrafts = diffDrafts;
|
||||
},
|
||||
|
||||
|
Reference in New Issue
Block a user