Update ResolveBtn when CommentStore changes state
This commit is contained in:
parent
d7a527163b
commit
ef443a99ee
1 changed files with 4 additions and 4 deletions
|
@ -20,8 +20,7 @@ import Vue from 'vue';
|
|||
data: function () {
|
||||
return {
|
||||
discussions: CommentsStore.state,
|
||||
loading: false,
|
||||
note: {},
|
||||
loading: false
|
||||
};
|
||||
},
|
||||
watch: {
|
||||
|
@ -34,6 +33,9 @@ import Vue from 'vue';
|
|||
discussion: function () {
|
||||
return this.discussions[this.discussionId];
|
||||
},
|
||||
note: function () {
|
||||
return this.discussion ? this.discussion.getNote(this.noteId) : {};
|
||||
},
|
||||
buttonText: function () {
|
||||
if (this.isResolved) {
|
||||
return `Resolved by ${this.resolvedByName}`;
|
||||
|
@ -112,8 +114,6 @@ import Vue from 'vue';
|
|||
authorAvatar: this.authorAvatar,
|
||||
noteTruncated: this.noteTruncated,
|
||||
});
|
||||
|
||||
this.note = this.discussion.getNote(this.noteId);
|
||||
}
|
||||
});
|
||||
|
||||
|
|
Loading…
Reference in a new issue