From 8845ff1255e44ae81d7d7f0b1fb657ace89e16be Mon Sep 17 00:00:00 2001 From: Sasha Zakablukov <38879804+AlexZakablukov@users.noreply.github.com> Date: Fri, 13 May 2022 14:13:47 +0300 Subject: [PATCH 1/2] fix(chat): focus on chatbar on send message click --- components/views/user/User.vue | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/components/views/user/User.vue b/components/views/user/User.vue index e3c3f9b777..992e57ad69 100644 --- a/components/views/user/User.vue +++ b/components/views/user/User.vue @@ -159,6 +159,11 @@ export default Vue.extend({ this.$store.commit('ui/showSidebar', false) } + if (this.user.address === this.$store.state.textile.activeConversation) { + this.$store.dispatch('ui/setChatbarFocus') + return + } + this.$router.push(`/chat/direct/${this.user.address}`) }, async handleShowProfile() { From 4eae6edd7745f2e21e5b50e7ae5562488e08471d Mon Sep 17 00:00:00 2001 From: Sasha Zakablukov <38879804+AlexZakablukov@users.noreply.github.com> Date: Tue, 17 May 2022 11:33:19 +0300 Subject: [PATCH 2/2] fix(chat): reset active conversation on chat leave --- layouts/chat.vue | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/layouts/chat.vue b/layouts/chat.vue index cb6a395b99..79633b9ea0 100644 --- a/layouts/chat.vue +++ b/layouts/chat.vue @@ -249,6 +249,10 @@ export default Vue.extend({ } }, }, + beforeDestroy() { + // reset active conversation on chat leave + this.$store.commit('textile/setActiveConversation', '') + }, mounted() { this.$Sounds.changeLevels(this.audio.volume / 100)