From 824fbc21e89a82c3c683be1afc1c779fa54ba175 Mon Sep 17 00:00:00 2001 From: 23rd <23rd@vivaldi.net> Date: Thu, 27 May 2021 00:55:40 +0300 Subject: [PATCH] Removed Adaptive namespace from peer context menu. --- Telegram/SourceFiles/window/window_peer_menu.cpp | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/Telegram/SourceFiles/window/window_peer_menu.cpp b/Telegram/SourceFiles/window/window_peer_menu.cpp index 163a61449..6412cd920 100644 --- a/Telegram/SourceFiles/window/window_peer_menu.cpp +++ b/Telegram/SourceFiles/window/window_peer_menu.cpp @@ -33,6 +33,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL #include "history/history_item.h" #include "history/history_message.h" // GetErrorTextForSending. #include "history/view/history_view_context_menu.h" +#include "window/window_adaptive.h" // Adaptive::isThreeColumn #include "window/window_session_controller.h" #include "window/window_controller.h" #include "support/support_helper.h" @@ -54,7 +55,6 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL #include "core/application.h" #include "export/export_manager.h" #include "boxes/peers/edit_peer_info_box.h" -#include "facades.h" // Adaptive::ThreeColumn #include "styles/style_layers.h" #include "styles/style_boxes.h" #include "styles/style_window.h" // st::windowMinWidth @@ -271,7 +271,7 @@ bool Filler::showInfo() { return false; } else if (_controller->activeChatCurrent().peer() != _peer) { return true; - } else if (!Adaptive::ThreeColumn()) { + } else if (!_controller->adaptive().isThreeColumn()) { return true; } else if (!Core::App().settings().thirdSectionInfoEnabled() && !Core::App().settings().tabbedReplacedWithInfo()) { @@ -760,9 +760,12 @@ void PeerMenuShareContactBox( Ui::show(Box( tr::lng_forward_share_contact(tr::now, lt_recipient, recipient), tr::lng_forward_send(tr::now), - [peer, user] { + [peer, user, navigation] { const auto history = peer->owner().history(peer); - Ui::showPeerHistory(history, ShowAtTheEndMsgId); + navigation->showPeerHistory( + history, + Window::SectionShow::Way::ClearStack, + ShowAtTheEndMsgId); auto action = Api::SendAction(history); action.clearDraft = false; user->session().api().shareContact(user, action);