mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2025-06-05 06:33:57 +02:00
Added icon and name of contact to deletion confirmation box.
This commit is contained in:
parent
c03fcf9a23
commit
eb27c12117
1 changed files with 18 additions and 5 deletions
|
@ -12,6 +12,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
|
||||||
#include "chat_helpers/compose/compose_show.h"
|
#include "chat_helpers/compose/compose_show.h"
|
||||||
#include "chat_helpers/message_field.h"
|
#include "chat_helpers/message_field.h"
|
||||||
#include "chat_helpers/share_message_phrase_factory.h"
|
#include "chat_helpers/share_message_phrase_factory.h"
|
||||||
|
#include "ui/controls/userpic_button.h"
|
||||||
#include "ui/wrap/slide_wrap.h"
|
#include "ui/wrap/slide_wrap.h"
|
||||||
#include "ui/widgets/fields/input_field.h"
|
#include "ui/widgets/fields/input_field.h"
|
||||||
#include "api/api_chat_participants.h"
|
#include "api/api_chat_participants.h"
|
||||||
|
@ -1545,16 +1546,28 @@ void PeerMenuDeleteContact(
|
||||||
user->session().api().applyUpdates(result);
|
user->session().api().applyUpdates(result);
|
||||||
}).send();
|
}).send();
|
||||||
};
|
};
|
||||||
controller->show(
|
auto box = Box([=](not_null<Ui::GenericBox*> box) {
|
||||||
Ui::MakeConfirmBox({
|
Ui::AddSkip(box->verticalLayout());
|
||||||
|
Ui::IconWithTitle(
|
||||||
|
box->verticalLayout(),
|
||||||
|
Ui::CreateChild<Ui::UserpicButton>(
|
||||||
|
box,
|
||||||
|
user,
|
||||||
|
st::mainMenuUserpic),
|
||||||
|
Ui::CreateChild<Ui::FlatLabel>(
|
||||||
|
box,
|
||||||
|
tr::lng_info_delete_contact() | Ui::Text::ToBold(),
|
||||||
|
box->getDelegate()->style().title));
|
||||||
|
Ui::ConfirmBox(box, {
|
||||||
.text = text,
|
.text = text,
|
||||||
.confirmed = deleteSure,
|
.confirmed = deleteSure,
|
||||||
.confirmText = tr::lng_box_delete(),
|
.confirmText = tr::lng_box_delete(),
|
||||||
}),
|
.confirmStyle = &st::attentionBoxButton,
|
||||||
Ui::LayerOption::CloseOther);
|
});
|
||||||
|
});
|
||||||
|
controller->show(std::move(box), Ui::LayerOption::CloseOther);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void PeerMenuDeleteTopicWithConfirmation(
|
void PeerMenuDeleteTopicWithConfirmation(
|
||||||
not_null<Window::SessionNavigation*> navigation,
|
not_null<Window::SessionNavigation*> navigation,
|
||||||
not_null<Data::ForumTopic*> topic) {
|
not_null<Data::ForumTopic*> topic) {
|
||||||
|
|
Loading…
Add table
Reference in a new issue