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">
<gr-diff-comment-thread
comments="[[thread.comments]]"
comment-side="[[commentSide]]"
comment-side="[[thread.commentSide]]"
is-on-parent="[[isOnParent]]"
parent-index="[[parentIndex]]"
change-num="[[changeNum]]"

View File

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

View File

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