Merge "Make sure threads have commentSide attribute"

This commit is contained in:
Becky Siegel
2018-02-28 18:09:49 +00:00
committed by Gerrit Code Review
3 changed files with 4 additions and 4 deletions

View File

@@ -32,7 +32,7 @@ limitations under the License.
<template is="dom-repeat" items="[[_threads]]" as="thread"> <template is="dom-repeat" items="[[_threads]]" as="thread">
<gr-diff-comment-thread <gr-diff-comment-thread
comments="[[thread.comments]]" comments="[[thread.comments]]"
comment-side="[[commentSide]]" comment-side="[[thread.commentSide]]"
is-on-parent="[[isOnParent]]" is-on-parent="[[isOnParent]]"
parent-index="[[parentIndex]]" parent-index="[[parentIndex]]"
change-num="[[changeNum]]" change-num="[[changeNum]]"

View File

@@ -19,7 +19,6 @@
properties: { properties: {
changeNum: String, changeNum: String,
commentSide: String,
comments: { comments: {
type: Array, type: Array,
value() { return []; }, value() { return []; },
@@ -51,9 +50,10 @@
* *
* @param {!Object} opt_range * @param {!Object} opt_range
*/ */
addNewThread(opt_range) { addNewThread(commentSide, opt_range) {
this.push('_threads', { this.push('_threads', {
comments: [], comments: [],
commentSide,
patchNum: this.patchForNewThreads, patchNum: this.patchForNewThreads,
range: opt_range, range: opt_range,
}); });

View File

@@ -448,7 +448,7 @@
let threadEl = this._getThread(threadGroupEl, opt_range); let threadEl = this._getThread(threadGroupEl, opt_range);
if (!threadEl) { if (!threadEl) {
threadGroupEl.addNewThread(opt_range); threadGroupEl.addNewThread(commentSide, opt_range);
Polymer.dom.flush(); Polymer.dom.flush();
threadEl = this._getThread(threadGroupEl, opt_range); threadEl = this._getThread(threadGroupEl, opt_range);
} }