Add reloadDrafts function in gr-comment-api This function also re-initializes a ChangeComment object, but uses the old values for comments and robot comments, and only makes a request for new drafts. It's response is identical to loadAll for the purposes of elements using these functions, but will reduce unneeded API calls. Change-Id: I3c0872b86a0e24c9c378acf3311fe8cc3e078eda
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 7c46b58..5431a78 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
@@ -751,8 +751,8 @@ }, _loadComments() { - return this.$.commentAPI.loadAll(this._changeNum).then(() => { - this._changeComments = this.$.commentAPI._changeComments; + return this.$.commentAPI.loadAll(this._changeNum).then(comments => { + this._changeComments = comments; this._commentMap = this._getPaths(this._patchRange); this._commentsForDiff = this._getCommentsForPath(this._path,