From d1e3e7d24040afd0204ea23af578296051429468 Mon Sep 17 00:00:00 2001 From: John Preston Date: Wed, 23 Jun 2021 20:14:49 +0400 Subject: [PATCH] Don't show pinned tooltips if only one video. --- Telegram/SourceFiles/calls/group/calls_group_toasts.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Telegram/SourceFiles/calls/group/calls_group_toasts.cpp b/Telegram/SourceFiles/calls/group/calls_group_toasts.cpp index 7d8d3c217d..cf27a9a810 100644 --- a/Telegram/SourceFiles/calls/group/calls_group_toasts.cpp +++ b/Telegram/SourceFiles/calls/group/calls_group_toasts.cpp @@ -105,7 +105,9 @@ void Toasts::setupPinnedVideo() { ? _call->videoEndpointLargeValue() : rpl::single(_call->videoEndpointLarge()); }) | rpl::flatten_latest( - ) | rpl::start_with_next([=](const VideoEndpoint &endpoint) { + ) | rpl::filter([=] { + return (_call->shownVideoTracks().size() > 1); + }) | rpl::start_with_next([=](const VideoEndpoint &endpoint) { const auto pinned = _call->videoEndpointPinned(); const auto peer = endpoint.peer; if (!peer) {