mirror of
https://hubproxy.babadafafafafa.cn/https://github.com/telegramdesktop/tdesktop
synced 2026-09-21 00:23:56 +08:00
Detach ComposeControls from SessionController.
This commit is contained in:
@@ -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(
|
||||
|
||||
Reference in New Issue
Block a user