Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/spreed.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorDaniel Calviño Sánchez <danxuliu@gmail.com>2021-02-03 15:33:04 +0300
committerbackportbot[bot] <backportbot[bot]@users.noreply.github.com>2021-02-03 15:50:09 +0300
commit2d7bd5723c5158171fc4894d0be792c5b26fb3fb (patch)
tree318ad46b20cb69e9c4d66751a1283fae45397815 /src
parent76c8c22035ab90e60a34bc6390482576c2c552c0 (diff)
Fix new conversation dialog when no item is selected
"showModal()" was being called as the handler for the on-click event and the EventBus.$on('NewGroupConversationDialog'). As the first one always provides the event as the first parameter the item was always defined, but it never contained a label, so the model became undefined and thus the dialog failed to open. Now the method was split in two, one to be used to just show the modal and another one that also takes into account the item being given. Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
Diffstat (limited to 'src')
-rw-r--r--src/components/LeftSidebar/NewGroupConversation/NewGroupConversation.vue13
1 files changed, 9 insertions, 4 deletions
diff --git a/src/components/LeftSidebar/NewGroupConversation/NewGroupConversation.vue b/src/components/LeftSidebar/NewGroupConversation/NewGroupConversation.vue
index c74acdc66..6c1b828df 100644
--- a/src/components/LeftSidebar/NewGroupConversation/NewGroupConversation.vue
+++ b/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