Browse Source
Merge pull request #5071 from nextcloud/fix-new-conversation-dialog-when-no-item-is-selected
Fix new conversation dialog when no item is selected
pull/5076/head
Joas Schilling
5 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with
9 additions and
4 deletions
-
src/components/LeftSidebar/NewGroupConversation/NewGroupConversation.vue
|
|
|
@ -204,21 +204,26 @@ export default { |
|
|
|
}, |
|
|
|
|
|
|
|
mounted() { |
|
|
|
EventBus.$on('NewGroupConversationDialog', this.showModal) |
|
|
|
EventBus.$on('NewGroupConversationDialog', this.showModalForItem) |
|
|
|
}, |
|
|
|
|
|
|
|
destroyed() { |
|
|
|
EventBus.$off('NewGroupConversationDialog', this.showModal) |
|
|
|
EventBus.$off('NewGroupConversationDialog', this.showModalForItem) |
|
|
|
}, |
|
|
|
|
|
|
|
methods: { |
|
|
|
showModal(item) { |
|
|
|
showModal() { |
|
|
|
this.modal = true |
|
|
|
}, |
|
|
|
|
|
|
|
showModalForItem(item) { |
|
|
|
if (item) { |
|
|
|
// Preload the conversation name from group selection |
|
|
|
this.conversationNameInput = item.label |
|
|
|
this.$store.dispatch('updateSelectedParticipants', item) |
|
|
|
} |
|
|
|
this.modal = true |
|
|
|
|
|
|
|
this.showModal() |
|
|
|
}, |
|
|
|
/** Reinitialise the component to it's initial state. This is necessary |
|
|
|
* because once the component is mounted it's data would persist even if |
|
|
|
|