diff --git a/components/ui/Unread/Unread.vue b/components/ui/Unread/Unread.vue index 8c640001cd..840a274213 100644 --- a/components/ui/Unread/Unread.vue +++ b/components/ui/Unread/Unread.vue @@ -71,12 +71,18 @@ export default Vue.extend({ this.$store.dispatch('ui/showProfile', this.user) }, navigateToUser() { - if ( - this.$route.params.address === this.user.address && - this.$device.isMobile - ) { - this.$store.commit('ui/showSidebar', false) + if (this.$route.params.address === this.user.address) { + if (this.$device.isMobile) { + this.$store.commit('ui/showSidebar', false) + } + return } + this.$store.dispatch('conversation/setConversation', { + id: this.user.address, + type: 'friend', + participants: [this.user], + calling: false, + }) this.$router.push(`/chat/direct/${this.user.address}`) }, }, diff --git a/components/views/chat/chatbar/footer/is-connected/Connected.vue b/components/views/chat/chatbar/footer/is-connected/Connected.vue index 5272dfedf3..78e8f43229 100644 --- a/components/views/chat/chatbar/footer/is-connected/Connected.vue +++ b/components/views/chat/chatbar/footer/is-connected/Connected.vue @@ -18,7 +18,7 @@ export default Vue.extend({ }, }, computed: { - ...mapState(['ui', 'webrtc', 'friends', 'conversation']), + ...mapState(['friends', 'conversation']), onlineParticipants() { return this.conversation.participants .filter((participant) => participant.state === 'CONNECTED') @@ -50,13 +50,6 @@ export default Vue.extend({ )} ${this.$t('ui.offline')}` }, }, - watch: { - 'conversation.participants': { - handler() {}, - deep: true, - immediate: true, - }, - }, methods: { /** * @method friendConnected diff --git a/components/views/group/clickable/Clickable.html b/components/views/group/clickable/Clickable.html index 9aaed5731c..beacfa0461 100644 --- a/components/views/group/clickable/Clickable.html +++ b/components/views/group/clickable/Clickable.html @@ -1,5 +1,6 @@
diff --git a/components/views/group/clickable/Clickable.less b/components/views/group/clickable/Clickable.less index 2dee37afd1..22c6c8e424 100644 --- a/components/views/group/clickable/Clickable.less +++ b/components/views/group/clickable/Clickable.less @@ -1,4 +1,8 @@ .group { + &.is-selected { + &:extend(.background-semitransparent-lighter); + } + .status { path { stroke: @midground; diff --git a/components/views/group/clickable/Clickable.vue b/components/views/group/clickable/Clickable.vue index 0b96252f3e..787cee27e9 100644 --- a/components/views/group/clickable/Clickable.vue +++ b/components/views/group/clickable/Clickable.vue @@ -4,7 +4,6 @@ import Vue, { PropType } from 'vue' import ContextMenu from '~/components/mixins/UI/ContextMenu' import { Group } from '~/store/groups/types' -import { Message } from '~/types/textile/mailbox' declare module 'vue/types/vue' { interface Vue { @@ -23,6 +22,11 @@ export default Vue.extend({ }), required: true, }, + isSelected: { + type: Boolean, + default: false, + required: false, + }, }, data() { return { @@ -46,6 +50,12 @@ export default Vue.extend({ */ navigateToGroup(address: string) { this.$router.push(`/chat/groups/${address}`) + this.$store.dispatch('conversation/setConversation', { + id: this.group.id, + type: 'group', + calling: false, + participants: this.group.members, + }) }, }, }) diff --git a/components/views/navigation/sidebar/Sidebar.html b/components/views/navigation/sidebar/Sidebar.html index 70a5c5f74b..5b0e344696 100644 --- a/components/views/navigation/sidebar/Sidebar.html +++ b/components/views/navigation/sidebar/Sidebar.html @@ -111,7 +111,12 @@ :isTyping="ui.isTyping.address === thing.address" :isSelected="thing.address === $route.params.address" /> - +