From c0af89f465c78c0b42ef4121e9c8f607ab4926ae Mon Sep 17 00:00:00 2001 From: John Preston Date: Tue, 1 Dec 2020 17:28:01 +0300 Subject: [PATCH] Show group name in the title. --- Telegram/Resources/langs/lang.strings | 2 +- Telegram/SourceFiles/calls/calls_group_panel.cpp | 10 ++++++++-- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/Telegram/Resources/langs/lang.strings b/Telegram/Resources/langs/lang.strings index 5aa204d79..ee967a1ef 100644 --- a/Telegram/Resources/langs/lang.strings +++ b/Telegram/Resources/langs/lang.strings @@ -1847,7 +1847,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL "lng_group_call_members#other" = "{count} members"; "lng_group_call_no_anonymous" = "Anonymous admins can't join voice chats :("; "lng_group_call_context_mute" = "Mute"; -"lng_group_call_context_unmute" = "Unmute"; +"lng_group_call_context_unmute" = "Allow to speak"; "lng_group_call_duration_days#one" = "{count} day"; "lng_group_call_duration_days#other" = "{count} days"; "lng_group_call_duration_hours#one" = "{count} hour"; diff --git a/Telegram/SourceFiles/calls/calls_group_panel.cpp b/Telegram/SourceFiles/calls/calls_group_panel.cpp index f75d7de2c..6543b976d 100644 --- a/Telegram/SourceFiles/calls/calls_group_panel.cpp +++ b/Telegram/SourceFiles/calls/calls_group_panel.cpp @@ -18,6 +18,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL #include "ui/layers/generic_box.h" #include "ui/text/text_utilities.h" #include "ui/toast/toast.h" +#include "info/profile/info_profile_values.h" // Info::Profile::Value. #include "core/application.h" #include "lang/lang_keys.h" #include "data/data_channel.h" @@ -255,7 +256,12 @@ void GroupPanel::initWindow() { _window->setWindowIcon( QIcon(QPixmap::fromImage(Image::Empty()->original(), Qt::ColorOnly))); _window->setTitleStyle(st::callTitle); - _window->setTitle(tr::lng_group_call_title(tr::now)); + + Info::Profile::NameValue( + _channel + ) | rpl::start_with_next([=](const TextWithEntities &name) { + _window->setTitle(name.text); + }, _window->lifetime()); base::install_event_filter(_window.get(), [=](not_null e) { if (e->type() == QEvent::Close && handleClose()) { @@ -585,7 +591,7 @@ void GroupPanel::refreshTitle() { if (!_title) { _title.create( widget(), - tr::lng_group_call_title(), + Info::Profile::NameValue(_channel), st::groupCallHeaderLabel); _title->setAttribute(Qt::WA_TransparentForMouseEvents); }