Merge "Make sure threads have commentSide attribute"
This commit is contained in:
		@@ -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]]"
 | 
			
		||||
 
 | 
			
		||||
@@ -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,
 | 
			
		||||
      });
 | 
			
		||||
 
 | 
			
		||||
@@ -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);
 | 
			
		||||
      }
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user