Commit ef443a99 authored by Sam Rose's avatar Sam Rose

Update ResolveBtn when CommentStore changes state

parent d7a52716
...@@ -20,8 +20,7 @@ import Vue from 'vue'; ...@@ -20,8 +20,7 @@ import Vue from 'vue';
data: function () { data: function () {
return { return {
discussions: CommentsStore.state, discussions: CommentsStore.state,
loading: false, loading: false
note: {},
}; };
}, },
watch: { watch: {
...@@ -34,6 +33,9 @@ import Vue from 'vue'; ...@@ -34,6 +33,9 @@ import Vue from 'vue';
discussion: function () { discussion: function () {
return this.discussions[this.discussionId]; return this.discussions[this.discussionId];
}, },
note: function () {
return this.discussion ? this.discussion.getNote(this.noteId) : {};
},
buttonText: function () { buttonText: function () {
if (this.isResolved) { if (this.isResolved) {
return `Resolved by ${this.resolvedByName}`; return `Resolved by ${this.resolvedByName}`;
...@@ -112,8 +114,6 @@ import Vue from 'vue'; ...@@ -112,8 +114,6 @@ import Vue from 'vue';
authorAvatar: this.authorAvatar, authorAvatar: this.authorAvatar,
noteTruncated: this.noteTruncated, noteTruncated: this.noteTruncated,
}); });
this.note = this.discussion.getNote(this.noteId);
} }
}); });
......
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