Refine sorting within the file list
+ Always place the Commit message at the top.
+ Put {.h|.hxx|.hpp} files before others with the same base name.
Bug: Issue 3852
Bug: Issue 4065
Change-Id: I5295a19734711516c69831fd8250f13f962cbba2
diff --git a/polygerrit-ui/app/elements/diff/gr-diff-view/gr-diff-view.js b/polygerrit-ui/app/elements/diff/gr-diff-view/gr-diff-view.js
index c4f2a83..12d7f69 100644
--- a/polygerrit-ui/app/elements/diff/gr-diff-view/gr-diff-view.js
+++ b/polygerrit-ui/app/elements/diff/gr-diff-view/gr-diff-view.js
@@ -109,9 +109,9 @@
},
_getFiles: function(changeNum, patchNum) {
- return this.$.restAPI.getChangeFiles(changeNum, patchNum).then(
- function(files) {
- this._fileList = Object.keys(files).sort();
+ return this.$.restAPI.getChangeFilePathsAsSpeciallySortedArray(
+ changeNum, patchNum).then(function(files) {
+ this._fileList = files;
}.bind(this));
},