diff --git a/Telegram/SourceFiles/window/window_peer_menu.cpp b/Telegram/SourceFiles/window/window_peer_menu.cpp index 3b025b138..e2ac57f67 100644 --- a/Telegram/SourceFiles/window/window_peer_menu.cpp +++ b/Telegram/SourceFiles/window/window_peer_menu.cpp @@ -12,6 +12,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL #include "chat_helpers/compose/compose_show.h" #include "chat_helpers/message_field.h" #include "chat_helpers/share_message_phrase_factory.h" +#include "ui/controls/userpic_button.h" #include "ui/wrap/slide_wrap.h" #include "ui/widgets/fields/input_field.h" #include "api/api_chat_participants.h" @@ -1545,16 +1546,28 @@ void PeerMenuDeleteContact( user->session().api().applyUpdates(result); }).send(); }; - controller->show( - Ui::MakeConfirmBox({ + auto box = Box([=](not_null box) { + Ui::AddSkip(box->verticalLayout()); + Ui::IconWithTitle( + box->verticalLayout(), + Ui::CreateChild( + box, + user, + st::mainMenuUserpic), + Ui::CreateChild( + box, + tr::lng_info_delete_contact() | Ui::Text::ToBold(), + box->getDelegate()->style().title)); + Ui::ConfirmBox(box, { .text = text, .confirmed = deleteSure, .confirmText = tr::lng_box_delete(), - }), - Ui::LayerOption::CloseOther); + .confirmStyle = &st::attentionBoxButton, + }); + }); + controller->show(std::move(box), Ui::LayerOption::CloseOther); } - void PeerMenuDeleteTopicWithConfirmation( not_null navigation, not_null topic) {