diff options
| author | dave <starpumadev@gmail.com> | 2019-04-14 22:27:16 -0400 |
|---|---|---|
| committer | taehoon <th.dev91@gmail.com> | 2019-05-15 12:04:25 -0400 |
| commit | 8095ce8f6263115979a784c51b79ff089a8b16d3 (patch) | |
| tree | ed325123cb5112572b0e6fe9b4ccc3b403900d2b /src/components/extra_buttons/extra_buttons.js | |
| parent | 075ddc34f1e3139d8a7b6c28802347ecdbe48f34 (diff) | |
#468 - hide status menu after action button is clicked
Diffstat (limited to 'src/components/extra_buttons/extra_buttons.js')
| -rw-r--r-- | src/components/extra_buttons/extra_buttons.js | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/src/components/extra_buttons/extra_buttons.js b/src/components/extra_buttons/extra_buttons.js index 0b12f993..71f5946d 100644 --- a/src/components/extra_buttons/extra_buttons.js +++ b/src/components/extra_buttons/extra_buttons.js @@ -7,11 +7,13 @@ const ExtraButtons = { }, data () { return { - showDropDown: false + showDropDown: false, + showPopper: true } }, methods: { deleteStatus () { + this.refreshPopper() const confirmed = window.confirm(this.$t('status.delete_confirm')) if (confirmed) { this.$store.dispatch('deleteStatus', { id: this.status.id }) @@ -21,6 +23,7 @@ const ExtraButtons = { this.showDropDown = !this.showDropDown }, pinStatus () { + this.refreshPopper() this.$store.state.api.backendInteractor.pinOwnStatus(this.status.id).then((status) => { if (status.error) { this.$emit('onError', status.error) @@ -30,9 +33,17 @@ const ExtraButtons = { }) }, unpinStatus () { + this.refreshPopper() this.$store.state.api.backendInteractor.unpinOwnStatus(this.status.id).then((status) => { this.$store.dispatch('updatePinned', status) }) + }, + refreshPopper () { + this.showPopper = false + this.showDropDown = false + setTimeout(() => { + this.showPopper = true + }) } }, computed: { |
