Detach ComposeControls from SessionController.

This commit is contained in:
John Preston
2023-05-02 13:33:19 +04:00
parent 665467b02d
commit 65afa2c402
178 changed files with 2080 additions and 1869 deletions

View File

@@ -12,6 +12,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
#include "ui/wrap/vertical_layout.h"
#include "ui/widgets/multi_select.h"
#include "ui/widgets/scroll_area.h"
#include "main/session/session_show.h"
#include "main/main_session.h"
#include "data/data_session.h"
#include "data/data_peer.h"
@@ -301,7 +302,7 @@ PeerListsBox::Delegate::Delegate(
not_null<PeerListController*> controller)
: _box(box)
, _controller(controller)
, _show(_box) {
, _show(Main::MakeSessionShow(_box->uiShow(), &_controller->session())) {
}
void PeerListsBox::Delegate::peerListSetTitle(rpl::producer<QString> title) {
@@ -374,15 +375,16 @@ void PeerListsBox::Delegate::peerListFinishSelectedRowsBunch() {
void PeerListsBox::Delegate::peerListShowBox(
object_ptr<Ui::BoxContent> content,
Ui::LayerOptions options) {
_show.showBox(std::move(content), options);
_show->showBox(std::move(content), options);
}
void PeerListsBox::Delegate::peerListHideLayer() {
_show.hideLayer();
_show->hideLayer();
}
not_null<QWidget*> PeerListsBox::Delegate::peerListToastParent() {
return _show.toastParent();
auto PeerListsBox::Delegate::peerListUiShow()
-> std::shared_ptr<Main::SessionShow> {
return _show;
}
bool PeerListsBox::Delegate::peerListIsRowChecked(