From f6d9ffd5c1e4e37dbb9a3479e47209f3f72d3723 Mon Sep 17 00:00:00 2001 From: samcm Date: Mon, 10 Apr 2017 22:28:49 +1000 Subject: [PATCH] Disconnect from server if not in room --- src/components/application.vue | 7 ++++++- src/components/application/joinroom.vue | 1 - 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/src/components/application.vue b/src/components/application.vue index c2b9f6a7..f60d62d5 100644 --- a/src/components/application.vue +++ b/src/components/application.vue @@ -64,7 +64,7 @@
- +
@@ -313,6 +313,11 @@ export default { return this.$refs.joinroomModal.open() //$('#joinRoomModal').modal('open'); }, + joinRoomModalClosed: function(){ + if (!this.ptRoom){ + this.$store.dispatch('disconnectServer') + } + }, showChat: function(){ this.showToggleChat = !this.showToggleChat console.log('toggleChat') diff --git a/src/components/application/joinroom.vue b/src/components/application/joinroom.vue index a57b409a..a99634a4 100644 --- a/src/components/application/joinroom.vue +++ b/src/components/application/joinroom.vue @@ -151,7 +151,6 @@ export default { joinRoom: function(){ var that = this console.log('Attempting to join room ' + this.room) - console.log(this) if (!this.context.getters.getConnected){ console.log('Cant join room because we arent connected to a server!') return