2
0
mirror of https://github.com/telegramdesktop/tdesktop synced 2025-08-31 06:26:18 +00:00

Moved contacts box preparing to single place.

This commit is contained in:
23rd
2020-10-07 20:08:50 +03:00
committed by John Preston
parent 8b27aa5331
commit 367b028094
5 changed files with 22 additions and 20 deletions

View File

@@ -861,10 +861,7 @@ void MainMenu::refreshMenu() {
App::wnd()->onShowNewChannel();
}, &st::mainMenuNewChannel, &st::mainMenuNewChannelOver);
_menu->addAction(tr::lng_menu_contacts(tr::now), [=] {
Ui::show(Box<PeerListBox>(std::make_unique<ContactsBoxController>(controller), [](not_null<PeerListBox*> box) {
box->addButton(tr::lng_close(), [box] { box->closeBox(); });
box->addLeftButton(tr::lng_profile_add_contact(), [] { App::wnd()->onShowAddContact(); });
}));
Ui::show(PrepareContactsBox(controller));
}, &st::mainMenuContacts, &st::mainMenuContactsOver);
if (_controller->session().serverConfig().phoneCallsEnabled.current()) {
_menu->addAction(tr::lng_menu_calls(tr::now), [=] {