diff options
Diffstat (limited to 'src/components/NewMessageForm')
-rw-r--r-- | src/components/NewMessageForm/NewMessageForm.vue | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/src/components/NewMessageForm/NewMessageForm.vue b/src/components/NewMessageForm/NewMessageForm.vue index 1bf89fd83..548740494 100644 --- a/src/components/NewMessageForm/NewMessageForm.vue +++ b/src/components/NewMessageForm/NewMessageForm.vue @@ -234,11 +234,24 @@ export default { } this.$refs.uploadMenu.$refs.menuButton.disabled = newValue }, + + text(newValue) { + this.$store.dispatch('setCurrentMessageInput', { token: this.token, text: newValue }) + }, + + token(token) { + if (token) { + this.text = this.$store.getters.currentMessageInput(token) || '' + } else { + this.text = '' + } + }, }, mounted() { EventBus.$on('uploadStart', this.handleUploadStart) EventBus.$on('retryMessage', this.handleRetryMessage) + this.text = this.$store.getters.currentMessageInput(this.token) || '' }, beforeDestroy() { |