Browse Source

fix(RightSidebar): do not close sidebar in 1-1

Signed-off-by: Maksim Sukharev <antreesy.web@gmail.com>
pull/15050/head
Maksim Sukharev 7 months ago
committed by backportbot[bot]
parent
commit
b9f5222a7c
  1. 13
      src/App.vue

13
src/App.vue

@ -153,23 +153,12 @@ export default {
currentConversation() {
return this.$store.getters.conversation(this.token)
},
/**
* Computes whether the current conversation is one to one
*
* @return {boolean} The result
*/
isOneToOne() {
return this.currentConversation?.type === CONVERSATION.TYPE.ONE_TO_ONE
|| this.currentConversation?.type === CONVERSATION.TYPE.ONE_TO_ONE_FORMER
},
},
watch: {
token(newValue, oldValue) {
const shouldShowSidebar = BrowserStorage.getItem('sidebarOpen') !== 'false'
// Collapse the sidebar if it's a one to one conversation
if (this.isOneToOne || !shouldShowSidebar || this.isMobile) {
if (!shouldShowSidebar || this.isMobile) {
this.sidebarStore.hideSidebar({ cache: false })
} else if (shouldShowSidebar) {
this.sidebarStore.showSidebar({ cache: false })

Loading…
Cancel
Save