From 4564aeef6a861d20bb30d54273cc56f18cf634f5 Mon Sep 17 00:00:00 2001 From: Eduard Kuzmenko Date: Mon, 4 Apr 2022 18:09:32 +0300 Subject: [PATCH] misc fixes --- src/components/chat/audio.ts | 2 +- src/components/peerProfile.ts | 1 + src/scss/partials/_rightSidebar.scss | 10 ++++++++++ 3 files changed, 12 insertions(+), 1 deletion(-) diff --git a/src/components/chat/audio.ts b/src/components/chat/audio.ts index f22419f2..6ee6e4aa 100644 --- a/src/components/chat/audio.ts +++ b/src/components/chat/audio.ts @@ -138,7 +138,7 @@ export default class ChatAudio extends PinnedContainer { }) => { let title: string | HTMLElement, subtitle: string | HTMLElement | DocumentFragment; if(doc.type === 'voice' || doc.type === 'round') { - title = new PeerTitle({peerId: message.fromId}).element; + title = new PeerTitle({peerId: message.fromId, fromName: message.fwd_from?.from_name}).element; //subtitle = 'Voice message'; subtitle = formatFullSentTime(message.date); diff --git a/src/components/peerProfile.ts b/src/components/peerProfile.ts index 31333212..51aec4d6 100644 --- a/src/components/peerProfile.ts +++ b/src/components/peerProfile.ts @@ -242,6 +242,7 @@ export default class PeerProfile { public setPeerStatus = (needClear = false) => { const peerId = this.peerId; + this.element.classList.toggle('is-me', peerId === rootScope.myId); if(!peerId || (rootScope.myId === peerId && this.isDialog)) return; appImManager.setPeerStatus(this.peerId, this.subtitle, needClear, true, () => peerId === this.peerId, !this.isDialog); diff --git a/src/scss/partials/_rightSidebar.scss b/src/scss/partials/_rightSidebar.scss index 6f0b2ae1..4667579b 100644 --- a/src/scss/partials/_rightSidebar.scss +++ b/src/scss/partials/_rightSidebar.scss @@ -127,6 +127,16 @@ } } + .profile-content.is-me { + .profile-name { + margin-bottom: .9375rem; + } + + .profile-subtitle { + display: none; + } + } + .search-super { top: 100%; min-height: calc((var(--vh, 1vh) * 100) - 56px);