diff --git a/Telegram/SourceFiles/info/profile/info_profile_actions.cpp b/Telegram/SourceFiles/info/profile/info_profile_actions.cpp index fa6c77f7a3..60e1034407 100644 --- a/Telegram/SourceFiles/info/profile/info_profile_actions.cpp +++ b/Telegram/SourceFiles/info/profile/info_profile_actions.cpp @@ -1642,13 +1642,6 @@ object_ptr DetailsFiller::setupInfo( QString() ).text->setLinksTrusted(); } - - AddMainButton( - result, - tr::lng_info_add_as_contact(), - CanAddContactValue(user), - [=] { controller->window().show(Box(EditContactBox, controller, user)); }, - tracker); } else { const auto topicRootId = _topic ? _topic->rootId() : 0; const auto addToLink = topicRootId @@ -2169,6 +2162,24 @@ object_ptr DetailsFiller::fill( mainTracker.atLeastOneShownValue()); add(setupInfo(mainTracker)); if (const auto user = _peer->asUser()) { + { + const auto wrap = _wrap->add( + object_ptr>( + _wrap.data(), + object_ptr(_wrap.data()))); + Ui::AddSkip(wrap->entity()); + auto &tracker = mainTracker; + AddMainButton( + wrap->entity(), + tr::lng_info_add_as_contact(), + CanAddContactValue(user), + [=, controller = _controller->parentController()] { + controller->uiShow()->show( + Box(EditContactBox, controller, user)); + }, + tracker); + wrap->toggleOn(CanAddContactValue(user)); + } if (const auto info = user->botInfo.get()) { if (info->hasMainApp) { setupMainApp();