From 8cd579d443bbede02e40bae1c6cb8685f91ae9c9 Mon Sep 17 00:00:00 2001 From: John Preston Date: Tue, 1 Mar 2022 13:58:45 +0300 Subject: [PATCH] Show no stream channels warning even if we have a frame. --- .../calls/group/calls_group_panel.cpp | 49 ++++++++++++++----- .../calls/group/calls_group_panel.h | 2 +- 2 files changed, 38 insertions(+), 13 deletions(-) diff --git a/Telegram/SourceFiles/calls/group/calls_group_panel.cpp b/Telegram/SourceFiles/calls/group/calls_group_panel.cpp index e243482606..f62d2afdb1 100644 --- a/Telegram/SourceFiles/calls/group/calls_group_panel.cpp +++ b/Telegram/SourceFiles/calls/group/calls_group_panel.cpp @@ -1603,26 +1603,51 @@ void Panel::setupEmptyRtmp() { if (!empty) { _emptyRtmp.destroy(); return; - } else if (_emptyRtmp || _call->hasVideoWithFrames()) { + } else if (_emptyRtmp) { return; } - auto text = _call->rtmpInfo().url.isEmpty() - ? tr::lng_group_call_no_stream( - lt_group, - rpl::single(_peer->name)) - : tr::lng_group_call_no_stream_admin(); - _emptyRtmp.create( - widget(), - std::move(text), - st::groupCallVideoLimitLabel); + struct Label { + Label(QWidget *parent, rpl::producer text) + : widget(parent, std::move(text), st::groupCallVideoLimitLabel) + , color([] { + auto result = st::groupCallBg->c; + result.setAlphaF(kControlsBackgroundOpacity); + return result; + }) + , corners(st::groupCallControlsBackRadius, color.color()) { + } + + Ui::FlatLabel widget; + style::complex_color color; + Ui::RoundRect corners; + }; + _emptyRtmp.create(widget()); + const auto label = _emptyRtmp->lifetime().make_state