diff --git a/src/components/poll/poll_form/poll_form.vue b/src/components/poll/poll_form/poll_form.vue
index e6cc6a52..7cb5c949 100644
--- a/src/components/poll/poll_form/poll_form.vue
+++ b/src/components/poll/poll_form/poll_form.vue
@@ -42,17 +42,16 @@ export default {
methods: {
onAddOption () {
if (this.optionsLength < maxOptions) {
- this.$store.commit('addPollOption', '')
+ this.$store.dispatch('addPollOption', { option: '' })
}
},
onDeleteOption (index) {
- console.log(index)
if (this.optionsLength > 1) {
- this.$store.commit('deletePollOption', index)
+ this.$store.dispatch('deletePollOption', { index })
}
},
onUpdateOption (e, index) {
- this.$store.commit('updatePollOption', { index, option: e.target.value })
+ this.$store.dispatch('updatePollOption', { index, option: e.target.value })
}
}
}
diff --git a/src/components/post_status_form/post_status_form.js b/src/components/post_status_form/post_status_form.js
index 847cdf1d..9c2ad723 100644
--- a/src/components/post_status_form/post_status_form.js
+++ b/src/components/post_status_form/post_status_form.js
@@ -275,6 +275,8 @@ const PostStatusForm = {
visibility: newStatus.visibility,
contentType: newStatus.contentType
}
+ this.$store.dispatch('swapPollOptions', { options: ['', ''] })
+ this.pollFormVisible = false
this.$refs.mediaUpload.clearFile()
this.$emit('posted')
let el = this.$el.querySelector('textarea')
diff --git a/src/components/post_status_form/post_status_form.vue b/src/components/post_status_form/post_status_form.vue
index 773ccc58..2c68c28b 100644
--- a/src/components/post_status_form/post_status_form.vue
+++ b/src/components/post_status_form/post_status_form.vue
@@ -74,7 +74,7 @@
-