From 67cc0ef75c015d68c57315d3aeca4e5fe22cbdc0 Mon Sep 17 00:00:00 2001 From: 23rd <23rd@vivaldi.net> Date: Fri, 17 Jan 2025 21:34:43 +0300 Subject: [PATCH] Removed call button from history with deleted account. --- .../SourceFiles/history/view/history_view_top_bar_widget.cpp | 1 + Telegram/SourceFiles/info/info_wrap_widget.cpp | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/Telegram/SourceFiles/history/view/history_view_top_bar_widget.cpp b/Telegram/SourceFiles/history/view/history_view_top_bar_widget.cpp index c0a6c9e7b..e129816fe 100644 --- a/Telegram/SourceFiles/history/view/history_view_top_bar_widget.cpp +++ b/Telegram/SourceFiles/history/view/history_view_top_bar_widget.cpp @@ -1179,6 +1179,7 @@ void TopBarWidget::updateControlsVisibility() { if (const auto user = peer->asUser()) { return !user->isSelf() && !user->isBot() + && !user->isInaccessible() && !peer->isServiceUser(); } } diff --git a/Telegram/SourceFiles/info/info_wrap_widget.cpp b/Telegram/SourceFiles/info/info_wrap_widget.cpp index 9c4ce7719..faa5c4835 100644 --- a/Telegram/SourceFiles/info/info_wrap_widget.cpp +++ b/Telegram/SourceFiles/info/info_wrap_widget.cpp @@ -498,7 +498,7 @@ void WrapWidget::addProfileCallsButton() { const auto peer = key().peer(); const auto user = peer ? peer->asUser() : nullptr; - if (!user || user->sharedMediaInfo()) { + if (!user || user->sharedMediaInfo() || user->isInaccessible()) { return; }