diff options
author | Maksim Sukharev <antreesy.web@gmail.com> | 2023-09-27 13:33:46 +0200 |
---|---|---|
committer | Maksim Sukharev <antreesy.web@gmail.com> | 2023-09-28 21:13:27 +0200 |
commit | 450a9270baa5af3e03df15668444c08b2f5dc5b2 (patch) | |
tree | e6976081f129e8aea38b176f360f767f7aeae27a | |
parent | f279b81afa74d489970749d956f1d552597e6f60 (diff) |
partially revert a0f8a993, enable mixin for 1-1 conversations only
Signed-off-by: Maksim Sukharev <antreesy.web@gmail.com>
-rw-r--r-- | src/components/TopBar/TopBar.vue | 22 |
1 files changed, 17 insertions, 5 deletions
diff --git a/src/components/TopBar/TopBar.vue b/src/components/TopBar/TopBar.vue index ffaa256ff..71e5b7798 100644 --- a/src/components/TopBar/TopBar.vue +++ b/src/components/TopBar/TopBar.vue @@ -23,7 +23,7 @@ <div class="top-bar" :class="{ 'in-call': isInCall }"> <ConversationIcon :key="conversation.token" class="conversation-icon" - :offline="isPeerOffline" + :offline="isPeerInactive" :item="conversation" :disable-menu="isAvatarMenuDisabled" :hide-favorite="false" @@ -33,7 +33,7 @@ class="conversation-header" @click="openConversationSettings"> <div class="conversation-header__text" - :class="{'conversation-header__text--offline': isPeerOffline}"> + :class="{'conversation-header__text--offline': isPeerInactive}"> <p class="title"> {{ conversation.displayName }} </p> @@ -164,7 +164,7 @@ import TopBarMediaControls from './TopBarMediaControls.vue' import TopBarMenu from './TopBarMenu.vue' import { CONVERSATION } from '../../constants.js' -import isInLobby from '../../mixins/isInLobby.js' +import getParticipants from '../../mixins/getParticipants.js' import BrowserStorage from '../../services/BrowserStorage.js' import { getStatusMessage } from '../../utils/userStatus.js' import { localCallParticipantModel, localMediaModel } from '../../utils/webrtc/index.js' @@ -195,7 +195,7 @@ export default { mixins: [ richEditor, - isInLobby, + getParticipants, ], props: { @@ -272,7 +272,7 @@ export default { /** * Online status of the peer in one to one conversation. */ - isPeerOffline() { + isPeerInactive() { // Only compute this in one-to-one conversations if (!this.isOneToOneConversation) { return undefined @@ -343,6 +343,18 @@ export default { this.notifyUnreadMessages(null) } }, + + isOneToOneConversation: { + immediate: true, + // Group conversations have mixin in RightSidebar, so should work only for one-to-one + handler(newValue) { + if (newValue) { + this.initialiseGetParticipantsMixin() + } else { + this.stopGetParticipantsMixin() + } + }, + }, }, mounted() { |