From 571eb3a4bd78584896ec6730f640a9f73c39f520 Mon Sep 17 00:00:00 2001 From: Eduard Kuzmenko Date: Fri, 11 Dec 2020 15:53:59 +0200 Subject: [PATCH] Fix highlighting single-grouped item Hide pinned message unpin button if many --- src/components/chat/bubbles.ts | 2 +- src/scss/partials/_chatPinned.scss | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/src/components/chat/bubbles.ts b/src/components/chat/bubbles.ts index f79bbbe2..8b2059a8 100644 --- a/src/components/chat/bubbles.ts +++ b/src/components/chat/bubbles.ts @@ -643,7 +643,7 @@ export default class ChatBubbles { public getMountedBubble(mid: number) { const message = this.appMessagesManager.getMessage(mid); - if(message.grouped_id) { + if(message.grouped_id && this.appMessagesManager.getMidsByAlbum(message.grouped_id).length > 1) { const a = this.getGroupedBubble(message.grouped_id); if(a) { a.bubble = a.bubble.querySelector(`.document-container[data-mid="${mid}"]`) || a.bubble; diff --git a/src/scss/partials/_chatPinned.scss b/src/scss/partials/_chatPinned.scss index 1856afca..8390f6cf 100644 --- a/src/scss/partials/_chatPinned.scss +++ b/src/scss/partials/_chatPinned.scss @@ -342,6 +342,10 @@ } &.is-many { + .pinned-message-close { + display: none; + } + &:not(.is-floating) { .pinned-message-pinlist { display: none;