commit: a1641193b5b7c72e919b9848b167bc4d4a40444b
parent e31bf6646b9cdd21bef7b4f64083b1f8c2bbd913
Author: HJ <30-hj@users.noreply.git.pleroma.social>
Date:   Tue, 25 Jul 2023 08:29:59 +0000
Merge branch 'tusooa/983-mention-twice' into 'develop'
Fix a bug where mentioning a user twice will not fill the mention into the textarea
Closes #983
See merge request pleroma/pleroma-fe!1850
Diffstat:
4 files changed, 12 insertions(+), 1 deletion(-)
diff --git a/changelog.d/mention-twice.fix b/changelog.d/mention-twice.fix
@@ -0,0 +1 @@
+Fix a bug where mentioning a user twice will not fill the mention into the textarea
diff --git a/src/components/post_status_modal/post_status_modal.js b/src/components/post_status_modal/post_status_modal.js
@@ -44,6 +44,10 @@ const PostStatusModal = {
   methods: {
     closeModal () {
       this.$store.dispatch('closePostStatusModal')
+    },
+    resetAndClose () {
+      this.$store.dispatch('resetPostStatusModal')
+      this.$store.dispatch('closePostStatusModal')
     }
   }
 }
diff --git a/src/components/post_status_modal/post_status_modal.vue b/src/components/post_status_modal/post_status_modal.vue
@@ -12,7 +12,7 @@
       <PostStatusForm
         class="panel-body"
         v-bind="params"
-        @posted="closeModal"
+        @posted="resetAndClose"
       />
     </div>
   </Modal>
diff --git a/src/modules/postStatus.js b/src/modules/postStatus.js
@@ -10,6 +10,9 @@ const postStatus = {
     },
     closePostStatusModal (state) {
       state.modalActivated = false
+    },
+    resetPostStatusModal (state) {
+      state.params = null
     }
   },
   actions: {
@@ -18,6 +21,9 @@ const postStatus = {
     },
     closePostStatusModal ({ commit }) {
       commit('closePostStatusModal')
+    },
+    resetPostStatusModal ({ commit }) {
+      commit('resetPostStatusModal')
     }
   }
 }