Commit f65d8eb3 authored by Phil Hughes's avatar Phil Hughes

Updated method name to be more descriptive

parent 9accca43
...@@ -70,7 +70,7 @@ ...@@ -70,7 +70,7 @@
const resolved_by = data ? data.resolved_by : null; const resolved_by = data ? data.resolved_by : null;
CommentsStore.update(this.discussionId, this.noteId, !this.isResolved, resolved_by); CommentsStore.update(this.discussionId, this.noteId, !this.isResolved, resolved_by);
ResolveService.updateUpdatedHtml(this.discussionId, data); ResolveService.updateDiscussionHeadline(this.discussionId, data);
} else { } else {
new Flash('An error occurred when trying to resolve a comment. Please try again.', 'alert'); new Flash('An error occurred when trying to resolve a comment. Please try again.', 'alert');
} }
......
...@@ -47,7 +47,6 @@ ...@@ -47,7 +47,6 @@
} }
discussion.loading = true; discussion.loading = true;
console.log(discussion.loading);
return this.discussionResource.save({ return this.discussionResource.save({
mergeRequestId, mergeRequestId,
...@@ -59,7 +58,7 @@ ...@@ -59,7 +58,7 @@
discussion.resolveAllNotes(resolved_by); discussion.resolveAllNotes(resolved_by);
discussion.loading = false; discussion.loading = false;
this.updateUpdatedHtml(discussionId, data); this.updateDiscussionHeadline(discussionId, data);
} else { } else {
new Flash('An error occurred when trying to resolve a discussion. Please try again.', 'alert'); new Flash('An error occurred when trying to resolve a discussion. Please try again.', 'alert');
} }
...@@ -83,14 +82,14 @@ ...@@ -83,14 +82,14 @@
discussion.unResolveAllNotes(); discussion.unResolveAllNotes();
discussion.loading = false; discussion.loading = false;
this.updateUpdatedHtml(discussionId, data); this.updateDiscussionHeadline(discussionId, data);
} else { } else {
new Flash('An error occurred when trying to unresolve a discussion. Please try again.', 'alert'); new Flash('An error occurred when trying to unresolve a discussion. Please try again.', 'alert');
} }
}); });
} }
updateUpdatedHtml(discussionId, data) { updateDiscussionHeadline(discussionId, data) {
const $discussionHeadline = $(`.discussion[data-discussion-id="${discussionId}"] .js-discussion-headline`); const $discussionHeadline = $(`.discussion[data-discussion-id="${discussionId}"] .js-discussion-headline`);
if (data.discussion_headline_html) { if (data.discussion_headline_html) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment