From b59f508d3afd77272cc07d398a1a225c130315d8 Mon Sep 17 00:00:00 2001 From: Jason Woodland Date: Fri, 20 May 2022 16:39:36 +1000 Subject: [PATCH] refactor(chat): replace hounddog calls with store getters --- components/views/chat/chatbar/Chatbar.vue | 3 ++- components/views/chat/enhancers/glyphs/item/Item.vue | 7 +++---- components/views/chat/group/Group.vue | 5 +++-- components/views/chat/message/Message.vue | 9 ++++----- components/views/chat/message/reply/Item/Item.vue | 5 +++-- pages/chat/direct/_address.vue | 7 ++++--- 6 files changed, 19 insertions(+), 17 deletions(-) diff --git a/components/views/chat/chatbar/Chatbar.vue b/components/views/chat/chatbar/Chatbar.vue index 56ca87a9a9..08a80c7ab1 100644 --- a/components/views/chat/chatbar/Chatbar.vue +++ b/components/views/chat/chatbar/Chatbar.vue @@ -41,6 +41,7 @@ export default Vue.extend({ }, computed: { ...mapGetters('chat', ['getFiles']), + ...mapGetters('friends', ['getActiveFriend']), ...mapState(['ui', 'friends', 'webrtc', 'chat', 'textile', 'conversation']), activeFriend() { return this.conversation?.participants?.[0] @@ -128,7 +129,7 @@ export default Vue.extend({ watch: { 'friends.all': { handler() { - const activeFriend = this.$Hounddog.getActiveFriend(this.friends) + const activeFriend = this.getActiveFriend() if (activeFriend) this.recipientTyping = activeFriend.typingState === PropCommonEnum.TYPING diff --git a/components/views/chat/enhancers/glyphs/item/Item.vue b/components/views/chat/enhancers/glyphs/item/Item.vue index 654b13f19b..d790114bc2 100644 --- a/components/views/chat/enhancers/glyphs/item/Item.vue +++ b/components/views/chat/enhancers/glyphs/item/Item.vue @@ -1,6 +1,7 @@