From 99c8edb3eb492cc32b9af5ed3c7551c2478e5f9c Mon Sep 17 00:00:00 2001 From: 23rd <23rd@vivaldi.net> Date: Mon, 30 Sep 2024 13:29:19 +0300 Subject: [PATCH] Fixed display of working hours in profiles. --- .../info/profile/info_profile_actions.cpp | 23 ++++++++++--------- 1 file changed, 12 insertions(+), 11 deletions(-) diff --git a/Telegram/SourceFiles/info/profile/info_profile_actions.cpp b/Telegram/SourceFiles/info/profile/info_profile_actions.cpp index 7a2814479..d159ecafa 100644 --- a/Telegram/SourceFiles/info/profile/info_profile_actions.cpp +++ b/Telegram/SourceFiles/info/profile/info_profile_actions.cpp @@ -1118,17 +1118,18 @@ object_ptr DetailsFiller::setupInfo() { usernameLine.subtext->overrideLinkClickHandler(callback); usernameLine.text->setContextMenuHook(hook); usernameLine.subtext->setContextMenuHook(hook); - if (user) { - const auto copyUsername = Ui::CreateChild( - usernameLine.text->parentWidget(), - st::infoProfileLabeledButtonQr); - fitLabelToButton(copyUsername, usernameLine.text); - copyUsername->setClickedCallback([=] { - controller->show( - Box(Ui::FillPeerQrBox, user, std::nullopt, nullptr)); - return false; - }); - } else { + + const auto copyUsername = Ui::CreateChild( + usernameLine.text->parentWidget(), + st::infoProfileLabeledButtonQr); + fitLabelToButton(copyUsername, usernameLine.text); + copyUsername->setClickedCallback([=] { + controller->show( + Box(Ui::FillPeerQrBox, user, std::nullopt, nullptr)); + return false; + }); + + if (!user->isBot()) { tracker.track(result->add( CreateBirthday(result, controller, user))); tracker.track(result->add(CreateWorkingHours(result, user)));