From e0b2b1ed398bc321a478b2b83f40a36bc3dc7ce2 Mon Sep 17 00:00:00 2001 From: Eduard Kuzmenko Date: Tue, 2 Feb 2021 08:10:20 +0200 Subject: [PATCH] Fix folder unread badges count if dialog muted Fix poll circles --- src/lib/appManagers/appDialogsManager.ts | 7 ++++++- src/scss/style.scss | 24 ++++++++++++------------ 2 files changed, 18 insertions(+), 13 deletions(-) diff --git a/src/lib/appManagers/appDialogsManager.ts b/src/lib/appManagers/appDialogsManager.ts index d6e4181b..aa59ba2a 100644 --- a/src/lib/appManagers/appDialogsManager.ts +++ b/src/lib/appManagers/appDialogsManager.ts @@ -550,7 +550,12 @@ export class AppDialogsManager { let notMutedCount = 0; folder.forEach(dialog => { const isMuted = appMessagesManager.isDialogMuted(dialog); - const value = +!!dialog.unread_count || ((filterId !== 0 || !isMuted) && +dialog.pFlags.unread_mark) || 0; // * unread_mark can be undefined + + if(isMuted && filterId === 0) { + return; + } + + const value = +!!dialog.unread_count || +dialog.pFlags.unread_mark || 0; // * unread_mark can be undefined if(isMuted) mutedCount += value; else notMutedCount += value; }); diff --git a/src/scss/style.scss b/src/scss/style.scss index ebafdc17..b1dffc52 100644 --- a/src/scss/style.scss +++ b/src/scss/style.scss @@ -1122,6 +1122,18 @@ middle-ellipsis-element { } } +.progress-ring { + position: absolute; + top: 0; + left: 0; + pointer-events: none; + + &__circle { + transition: stroke-dashoffset; + stroke-linecap: round; + } +} + .rlottie, .rlottie-vector { left: 0; top: 0; @@ -1178,18 +1190,6 @@ middle-ellipsis-element { position: relative; } - .progress-ring { - position: absolute; - top: 0; - left: 0; - pointer-events: none; - - &__circle { - transition: stroke-dashoffset; - stroke-linecap: round; - } - } - .video-time { padding: 1px 6px 2px 7px; background-color: rgba(0, 0, 0, .23) !important;