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
@@ -950,18 +950,7 @@ void MainWindow::createGlobalMenu() {
return;
}
Ui::show(
Box<PeerListBox>(std::make_unique<ContactsBoxController>(
sessionController()),
[](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(sessionController()));
}));
psAddContact = tools->addAction(