diff --git a/src/renderer/components/TimelineSpace/NewTootModal.vue b/src/renderer/components/TimelineSpace/NewTootModal.vue index c1265d67..f4faacbe 100644 --- a/src/renderer/components/TimelineSpace/NewTootModal.vue +++ b/src/renderer/components/TimelineSpace/NewTootModal.vue @@ -42,7 +42,7 @@ export default { return this.$store.state.TimelineSpace.NewTootModal.modalOpen }, set (value) { - this.$store.commit('TimelineSpace/NewTootModal/changeModal', value) + this.$store.dispatch('TimelineSpace/NewTootModal/changeModal', value) } }, status: { diff --git a/src/renderer/store/TimelineSpace/NewTootModal.js b/src/renderer/store/TimelineSpace/NewTootModal.js index 1f9b2000..5b6c6c1e 100644 --- a/src/renderer/store/TimelineSpace/NewTootModal.js +++ b/src/renderer/store/TimelineSpace/NewTootModal.js @@ -43,6 +43,13 @@ const NewTootModal = { commit('setReplyTo', message) commit('updateStatus', `@${message.account.acct} `) commit('changeModal', true) + }, + changeModal ({ commit }, value) { + commit('changeModal', value) + if (!value) { + commit('updateStatus', '') + commit('setReplyTo', null) + } } } }