Add new slot for ported threads without a range
Change-Id: I5f4ecb35d4ecee6f56db7ae7a3029ce88775c5c7
diff --git a/polygerrit-ui/app/elements/diff/gr-diff-processor/gr-diff-processor.ts b/polygerrit-ui/app/elements/diff/gr-diff-processor/gr-diff-processor.ts
index a0584b6..034081d 100644
--- a/polygerrit-ui/app/elements/diff/gr-diff-processor/gr-diff-processor.ts
+++ b/polygerrit-ui/app/elements/diff/gr-diff-processor/gr-diff-processor.ts
@@ -22,6 +22,7 @@
GrDiffLineType,
FILE,
Highlights,
+ LineNumber,
} from '../gr-diff/gr-diff-line';
import {
GrDiffGroup,
@@ -150,7 +151,8 @@
this.cancel();
this.groups = [];
- this.push('groups', this._makeFileComments());
+ this.push('groups', this._makeGroup('LOST'));
+ this.push('groups', this._makeGroup(FILE));
// If it's a binary diff, we won't be rendering hunks of text differences
// so finish processing.
@@ -450,10 +452,10 @@
return line;
}
- _makeFileComments() {
+ _makeGroup(number: LineNumber) {
const line = new GrDiffLine(GrDiffLineType.BOTH);
- line.beforeNumber = FILE;
- line.afterNumber = FILE;
+ line.beforeNumber = number;
+ line.afterNumber = number;
return new GrDiffGroup(GrDiffGroupType.BOTH, [line]);
}