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:
@@ -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
|
||||
|
Reference in New Issue
Block a user