2
0
mirror of https://github.com/kotatogram/kotatogram-desktop synced 2025-08-31 06:35:14 +00:00

Moved some session dependent methods to SessionController.

MainWindow::showAddContact(),
MainWindow::showNewGroup(),
MainWindow::showNewChannel().
This commit is contained in:
23rd
2021-02-03 04:17:03 +03:00
committed by John Preston
parent 683d78c64a
commit 019e691fbb
9 changed files with 95 additions and 64 deletions

View File

@@ -7,6 +7,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
*/
#include "window/window_session_controller.h"
#include "boxes/add_contact_box.h"
#include "boxes/peers/edit_peer_info_box.h"
#include "boxes/peer_list_controllers.h"
#include "window/window_controller.h"
@@ -1140,6 +1141,24 @@ void SessionController::setActiveChatsFilter(FilterId id) {
}
}
void SessionController::showAddContact() {
_window->show(
Box<AddContactBox>(&session()),
Ui::LayerOption::KeepOther);
}
void SessionController::showNewGroup() {
_window->show(
Box<GroupInfoBox>(this, GroupInfoBox::Type::Group),
Ui::LayerOption::KeepOther);
}
void SessionController::showNewChannel() {
_window->show(
Box<GroupInfoBox>(this, GroupInfoBox::Type::Channel),
Ui::LayerOption::KeepOther);
}
SessionController::~SessionController() = default;
} // namespace Window