mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2025-06-05 06:33:57 +02:00
Removed redundant peerListShowBox / peerListHideLayer from delegates.
This commit is contained in:
parent
135ffb13fd
commit
282c076931
21 changed files with 35 additions and 148 deletions
|
@ -362,7 +362,7 @@ void EditFilterChatsListController::rowClicked(not_null<PeerListRow*> row) {
|
||||||
delegate()->peerListSetRowChecked(row, !row->checked());
|
delegate()->peerListSetRowChecked(row, !row->checked());
|
||||||
updateTitle();
|
updateTitle();
|
||||||
} else {
|
} else {
|
||||||
delegate()->peerListShowBox(_limitBox(count));
|
delegate()->peerListUiShow()->showBox(_limitBox(count));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -575,19 +575,19 @@ void LinkController::addLinkBlock(not_null<Ui::VerticalLayout*> container) {
|
||||||
CopyInviteLink(delegate()->peerListUiShow(), link);
|
CopyInviteLink(delegate()->peerListUiShow(), link);
|
||||||
});
|
});
|
||||||
const auto shareLink = crl::guard(weak, [=] {
|
const auto shareLink = crl::guard(weak, [=] {
|
||||||
delegate()->peerListShowBox(
|
delegate()->peerListUiShow()->showBox(
|
||||||
ShareInviteLinkBox(&_window->session(), link));
|
ShareInviteLinkBox(&_window->session(), link));
|
||||||
});
|
});
|
||||||
const auto getLinkQr = crl::guard(weak, [=] {
|
const auto getLinkQr = crl::guard(weak, [=] {
|
||||||
delegate()->peerListShowBox(
|
delegate()->peerListUiShow()->showBox(
|
||||||
InviteLinkQrBox(link, tr::lng_filters_link_qr_about()));
|
InviteLinkQrBox(link, tr::lng_filters_link_qr_about()));
|
||||||
});
|
});
|
||||||
const auto editLink = crl::guard(weak, [=] {
|
const auto editLink = crl::guard(weak, [=] {
|
||||||
delegate()->peerListShowBox(
|
delegate()->peerListUiShow()->showBox(
|
||||||
Box(ChatFilterLinkBox, &_window->session(), _data));
|
Box(ChatFilterLinkBox, &_window->session(), _data));
|
||||||
});
|
});
|
||||||
const auto deleteLink = crl::guard(weak, [=] {
|
const auto deleteLink = crl::guard(weak, [=] {
|
||||||
delegate()->peerListShowBox(DeleteLinkBox(_window, _data));
|
delegate()->peerListUiShow()->showBox(DeleteLinkBox(_window, _data));
|
||||||
});
|
});
|
||||||
|
|
||||||
const auto createMenu = [=] {
|
const auto createMenu = [=] {
|
||||||
|
@ -846,7 +846,7 @@ void LinksController::rebuild(const std::vector<InviteLinkData> &rows) {
|
||||||
|
|
||||||
void LinksController::rowClicked(not_null<PeerListRow*> row) {
|
void LinksController::rowClicked(not_null<PeerListRow*> row) {
|
||||||
const auto link = static_cast<LinkRow*>(row.get())->data();
|
const auto link = static_cast<LinkRow*>(row.get())->data();
|
||||||
delegate()->peerListShowBox(
|
delegate()->peerListUiShow()->showBox(
|
||||||
ShowLinkBox(_window, _currentFilter(), link));
|
ShowLinkBox(_window, _currentFilter(), link));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -881,19 +881,19 @@ base::unique_qptr<Ui::PopupMenu> LinksController::createRowContextMenu(
|
||||||
CopyInviteLink(delegate()->peerListUiShow(), link);
|
CopyInviteLink(delegate()->peerListUiShow(), link);
|
||||||
};
|
};
|
||||||
const auto shareLink = [=] {
|
const auto shareLink = [=] {
|
||||||
delegate()->peerListShowBox(
|
delegate()->peerListUiShow()->showBox(
|
||||||
ShareInviteLinkBox(&_window->session(), link));
|
ShareInviteLinkBox(&_window->session(), link));
|
||||||
};
|
};
|
||||||
const auto getLinkQr = [=] {
|
const auto getLinkQr = [=] {
|
||||||
delegate()->peerListShowBox(
|
delegate()->peerListUiShow()->showBox(
|
||||||
InviteLinkQrBox(link, tr::lng_filters_link_qr_about()));
|
InviteLinkQrBox(link, tr::lng_filters_link_qr_about()));
|
||||||
};
|
};
|
||||||
const auto editLink = [=] {
|
const auto editLink = [=] {
|
||||||
delegate()->peerListShowBox(
|
delegate()->peerListUiShow()->showBox(
|
||||||
Box(ChatFilterLinkBox, &_window->session(), data));
|
Box(ChatFilterLinkBox, &_window->session(), data));
|
||||||
};
|
};
|
||||||
const auto deleteLink = [=] {
|
const auto deleteLink = [=] {
|
||||||
delegate()->peerListShowBox(DeleteLinkBox(_window, data));
|
delegate()->peerListUiShow()->showBox(DeleteLinkBox(_window, data));
|
||||||
};
|
};
|
||||||
auto result = base::make_unique_q<Ui::PopupMenu>(
|
auto result = base::make_unique_q<Ui::PopupMenu>(
|
||||||
parent,
|
parent,
|
||||||
|
|
|
@ -85,16 +85,6 @@ PeerListContentDelegateShow::PeerListContentDelegateShow(
|
||||||
: _show(show) {
|
: _show(show) {
|
||||||
}
|
}
|
||||||
|
|
||||||
void PeerListContentDelegateShow::peerListShowBox(
|
|
||||||
object_ptr<Ui::BoxContent> content,
|
|
||||||
Ui::LayerOptions options) {
|
|
||||||
_show->showBox(std::move(content), options);
|
|
||||||
}
|
|
||||||
|
|
||||||
void PeerListContentDelegateShow::peerListHideLayer() {
|
|
||||||
_show->hideLayer();
|
|
||||||
}
|
|
||||||
|
|
||||||
auto PeerListContentDelegateShow::peerListUiShow()
|
auto PeerListContentDelegateShow::peerListUiShow()
|
||||||
-> std::shared_ptr<Main::SessionShow>{
|
-> std::shared_ptr<Main::SessionShow>{
|
||||||
return _show;
|
return _show;
|
||||||
|
@ -324,16 +314,6 @@ void PeerListBox::peerListSetSearchMode(PeerListSearchMode mode) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void PeerListBox::peerListShowBox(
|
|
||||||
object_ptr<Ui::BoxContent> content,
|
|
||||||
Ui::LayerOptions options) {
|
|
||||||
_show->showBox(std::move(content), options);
|
|
||||||
}
|
|
||||||
|
|
||||||
void PeerListBox::peerListHideLayer() {
|
|
||||||
_show->hideLayer();
|
|
||||||
}
|
|
||||||
|
|
||||||
std::shared_ptr<Main::SessionShow> PeerListBox::peerListUiShow() {
|
std::shared_ptr<Main::SessionShow> PeerListBox::peerListUiShow() {
|
||||||
return _show;
|
return _show;
|
||||||
}
|
}
|
||||||
|
|
|
@ -332,10 +332,6 @@ public:
|
||||||
virtual std::optional<QPoint> peerListLastRowMousePosition() = 0;
|
virtual std::optional<QPoint> peerListLastRowMousePosition() = 0;
|
||||||
virtual void peerListSortRows(Fn<bool(const PeerListRow &a, const PeerListRow &b)> compare) = 0;
|
virtual void peerListSortRows(Fn<bool(const PeerListRow &a, const PeerListRow &b)> compare) = 0;
|
||||||
virtual int peerListPartitionRows(Fn<bool(const PeerListRow &a)> border) = 0;
|
virtual int peerListPartitionRows(Fn<bool(const PeerListRow &a)> border) = 0;
|
||||||
virtual void peerListShowBox(
|
|
||||||
object_ptr<Ui::BoxContent> content,
|
|
||||||
Ui::LayerOptions options = Ui::LayerOption::KeepOther) = 0;
|
|
||||||
virtual void peerListHideLayer() = 0;
|
|
||||||
virtual std::shared_ptr<Main::SessionShow> peerListUiShow() = 0;
|
virtual std::shared_ptr<Main::SessionShow> peerListUiShow() = 0;
|
||||||
|
|
||||||
template <typename PeerDataRange>
|
template <typename PeerDataRange>
|
||||||
|
@ -1007,14 +1003,6 @@ public:
|
||||||
object_ptr<Ui::FlatLabel> description) override {
|
object_ptr<Ui::FlatLabel> description) override {
|
||||||
description.destroy();
|
description.destroy();
|
||||||
}
|
}
|
||||||
void peerListShowBox(
|
|
||||||
object_ptr<Ui::BoxContent> content,
|
|
||||||
Ui::LayerOptions options = Ui::LayerOption::KeepOther) override {
|
|
||||||
Unexpected("...DelegateSimple::peerListShowBox");
|
|
||||||
}
|
|
||||||
void peerListHideLayer() override {
|
|
||||||
Unexpected("...DelegateSimple::peerListHideLayer");
|
|
||||||
}
|
|
||||||
std::shared_ptr<Main::SessionShow> peerListUiShow() override {
|
std::shared_ptr<Main::SessionShow> peerListUiShow() override {
|
||||||
Unexpected("...DelegateSimple::peerListUiShow");
|
Unexpected("...DelegateSimple::peerListUiShow");
|
||||||
}
|
}
|
||||||
|
@ -1025,10 +1013,6 @@ class PeerListContentDelegateShow : public PeerListContentDelegateSimple {
|
||||||
public:
|
public:
|
||||||
explicit PeerListContentDelegateShow(
|
explicit PeerListContentDelegateShow(
|
||||||
std::shared_ptr<Main::SessionShow> show);
|
std::shared_ptr<Main::SessionShow> show);
|
||||||
void peerListShowBox(
|
|
||||||
object_ptr<Ui::BoxContent> content,
|
|
||||||
Ui::LayerOptions options = Ui::LayerOption::KeepOther) override;
|
|
||||||
void peerListHideLayer() override;
|
|
||||||
std::shared_ptr<Main::SessionShow> peerListUiShow() override;
|
std::shared_ptr<Main::SessionShow> peerListUiShow() override;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
@ -1064,10 +1048,6 @@ public:
|
||||||
bool peerListIsRowChecked(not_null<PeerListRow*> row) override;
|
bool peerListIsRowChecked(not_null<PeerListRow*> row) override;
|
||||||
int peerListSelectedRowsCount() override;
|
int peerListSelectedRowsCount() override;
|
||||||
void peerListScrollToTop() override;
|
void peerListScrollToTop() override;
|
||||||
void peerListShowBox(
|
|
||||||
object_ptr<Ui::BoxContent> content,
|
|
||||||
Ui::LayerOptions options = Ui::LayerOption::KeepOther) override;
|
|
||||||
void peerListHideLayer() override;
|
|
||||||
std::shared_ptr<Main::SessionShow> peerListUiShow() override;
|
std::shared_ptr<Main::SessionShow> peerListUiShow() override;
|
||||||
|
|
||||||
void setAddedTopScrollSkip(int skip);
|
void setAddedTopScrollSkip(int skip);
|
||||||
|
|
|
@ -685,7 +685,7 @@ void ChooseRecipientBoxController::rowClicked(not_null<PeerListRow*> row) {
|
||||||
}, box->lifetime());
|
}, box->lifetime());
|
||||||
});
|
});
|
||||||
*weak = owned.data();
|
*weak = owned.data();
|
||||||
delegate()->peerListShowBox(std::move(owned));
|
delegate()->peerListUiShow()->showBox(std::move(owned));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
const auto history = peer->owner().history(peer);
|
const auto history = peer->owner().history(peer);
|
||||||
|
|
|
@ -372,16 +372,6 @@ void PeerListsBox::Delegate::peerListFinishSelectedRowsBunch() {
|
||||||
_box->_select->entity()->finishItemsBunch();
|
_box->_select->entity()->finishItemsBunch();
|
||||||
}
|
}
|
||||||
|
|
||||||
void PeerListsBox::Delegate::peerListShowBox(
|
|
||||||
object_ptr<Ui::BoxContent> content,
|
|
||||||
Ui::LayerOptions options) {
|
|
||||||
_show->showBox(std::move(content), options);
|
|
||||||
}
|
|
||||||
|
|
||||||
void PeerListsBox::Delegate::peerListHideLayer() {
|
|
||||||
_show->hideLayer();
|
|
||||||
}
|
|
||||||
|
|
||||||
auto PeerListsBox::Delegate::peerListUiShow()
|
auto PeerListsBox::Delegate::peerListUiShow()
|
||||||
-> std::shared_ptr<Main::SessionShow> {
|
-> std::shared_ptr<Main::SessionShow> {
|
||||||
return _show;
|
return _show;
|
||||||
|
|
|
@ -54,10 +54,6 @@ private:
|
||||||
_box->addSelectItem(row, anim::type::instant);
|
_box->addSelectItem(row, anim::type::instant);
|
||||||
}
|
}
|
||||||
void peerListFinishSelectedRowsBunch() override;
|
void peerListFinishSelectedRowsBunch() override;
|
||||||
void peerListShowBox(
|
|
||||||
object_ptr<Ui::BoxContent> content,
|
|
||||||
Ui::LayerOptions options = Ui::LayerOption::KeepOther) override;
|
|
||||||
void peerListHideLayer() override;
|
|
||||||
std::shared_ptr<Main::SessionShow> peerListUiShow() override;
|
std::shared_ptr<Main::SessionShow> peerListUiShow() override;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
|
|
@ -366,7 +366,7 @@ bool AddParticipantsBoxController::needsInviteLinkButton() {
|
||||||
QPointer<Ui::BoxContent> AddParticipantsBoxController::showBox(
|
QPointer<Ui::BoxContent> AddParticipantsBoxController::showBox(
|
||||||
object_ptr<Ui::BoxContent> box) const {
|
object_ptr<Ui::BoxContent> box) const {
|
||||||
const auto weak = Ui::MakeWeak(box.data());
|
const auto weak = Ui::MakeWeak(box.data());
|
||||||
delegate()->peerListShowBox(std::move(box));
|
delegate()->peerListUiShow()->showBox(std::move(box));
|
||||||
return weak;
|
return weak;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -668,7 +668,7 @@ void AddSpecialBoxController::migrate(
|
||||||
QPointer<Ui::BoxContent> AddSpecialBoxController::showBox(
|
QPointer<Ui::BoxContent> AddSpecialBoxController::showBox(
|
||||||
object_ptr<Ui::BoxContent> box) const {
|
object_ptr<Ui::BoxContent> box) const {
|
||||||
const auto weak = Ui::MakeWeak(box.data());
|
const auto weak = Ui::MakeWeak(box.data());
|
||||||
delegate()->peerListShowBox(std::move(box));
|
delegate()->peerListUiShow()->showBox(std::move(box));
|
||||||
return weak;
|
return weak;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -433,7 +433,7 @@ void ChoosePeerBoxController::rowClicked(not_null<PeerListRow*> row) {
|
||||||
if (const auto user = peer->asUser()) {
|
if (const auto user = peer->asUser()) {
|
||||||
done();
|
done();
|
||||||
} else {
|
} else {
|
||||||
delegate()->peerListShowBox(
|
delegate()->peerListUiShow()->showBox(
|
||||||
MakeConfirmBox(_bot, peer, _query, done));
|
MakeConfirmBox(_bot, peer, _query, done));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -168,7 +168,7 @@ void Controller::choose(not_null<ChannelData*> chat) {
|
||||||
const auto onstack = _callback;
|
const auto onstack = _callback;
|
||||||
onstack(chat);
|
onstack(chat);
|
||||||
};
|
};
|
||||||
delegate()->peerListShowBox(Ui::MakeConfirmBox({
|
delegate()->peerListUiShow()->showBox(Ui::MakeConfirmBox({
|
||||||
.text = text,
|
.text = text,
|
||||||
.confirmed = sure,
|
.confirmed = sure,
|
||||||
.confirmText = tr::lng_manage_discussion_group_link(tr::now),
|
.confirmText = tr::lng_manage_discussion_group_link(tr::now),
|
||||||
|
@ -199,7 +199,7 @@ void Controller::choose(not_null<ChatData*> chat) {
|
||||||
};
|
};
|
||||||
chat->session().api().migrateChat(chat, crl::guard(this, done));
|
chat->session().api().migrateChat(chat, crl::guard(this, done));
|
||||||
};
|
};
|
||||||
delegate()->peerListShowBox(Ui::MakeConfirmBox({
|
delegate()->peerListUiShow()->showBox(Ui::MakeConfirmBox({
|
||||||
.text = text,
|
.text = text,
|
||||||
.confirmed = sure,
|
.confirmed = sure,
|
||||||
.confirmText = tr::lng_manage_discussion_group_link(tr::now),
|
.confirmText = tr::lng_manage_discussion_group_link(tr::now),
|
||||||
|
|
|
@ -1281,7 +1281,7 @@ void ParticipantsBoxController::rebuild() {
|
||||||
QPointer<Ui::BoxContent> ParticipantsBoxController::showBox(
|
QPointer<Ui::BoxContent> ParticipantsBoxController::showBox(
|
||||||
object_ptr<Ui::BoxContent> box) const {
|
object_ptr<Ui::BoxContent> box) const {
|
||||||
const auto weak = Ui::MakeWeak(box.data());
|
const auto weak = Ui::MakeWeak(box.data());
|
||||||
delegate()->peerListShowBox(std::move(box));
|
delegate()->peerListUiShow()->showBox(std::move(box));
|
||||||
return weak;
|
return weak;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -347,21 +347,24 @@ void Controller::addHeaderBlock(not_null<Ui::VerticalLayout*> container) {
|
||||||
const auto copyLink = crl::guard(weak, [=] {
|
const auto copyLink = crl::guard(weak, [=] {
|
||||||
CopyInviteLink(delegate()->peerListUiShow(), link);
|
CopyInviteLink(delegate()->peerListUiShow(), link);
|
||||||
});
|
});
|
||||||
const auto shareLink = crl::guard(weak, [=] {
|
const auto shareLink = crl::guard(weak, [=, peer = _peer] {
|
||||||
delegate()->peerListShowBox(ShareInviteLinkBox(_peer, link));
|
delegate()->peerListUiShow()->showBox(ShareInviteLinkBox(peer, link));
|
||||||
});
|
});
|
||||||
const auto getLinkQr = crl::guard(weak, [=] {
|
const auto getLinkQr = crl::guard(weak, [=] {
|
||||||
delegate()->peerListShowBox(
|
delegate()->peerListUiShow()->showBox(
|
||||||
InviteLinkQrBox(link, tr::lng_group_invite_qr_about()));
|
InviteLinkQrBox(link, tr::lng_group_invite_qr_about()));
|
||||||
});
|
});
|
||||||
const auto revokeLink = crl::guard(weak, [=] {
|
const auto revokeLink = crl::guard(weak, [=] {
|
||||||
delegate()->peerListShowBox(RevokeLinkBox(_peer, admin, link));
|
delegate()->peerListUiShow()->showBox(
|
||||||
|
RevokeLinkBox(_peer, admin, link));
|
||||||
});
|
});
|
||||||
const auto editLink = crl::guard(weak, [=] {
|
const auto editLink = crl::guard(weak, [=] {
|
||||||
delegate()->peerListShowBox(EditLinkBox(_peer, _data.current()));
|
delegate()->peerListUiShow()->showBox(
|
||||||
|
EditLinkBox(_peer, _data.current()));
|
||||||
});
|
});
|
||||||
const auto deleteLink = crl::guard(weak, [=] {
|
const auto deleteLink = crl::guard(weak, [=] {
|
||||||
delegate()->peerListShowBox(DeleteLinkBox(_peer, admin, link));
|
delegate()->peerListUiShow()->showBox(
|
||||||
|
DeleteLinkBox(_peer, admin, link));
|
||||||
});
|
});
|
||||||
|
|
||||||
const auto createMenu = [=] {
|
const auto createMenu = [=] {
|
||||||
|
|
|
@ -537,7 +537,7 @@ void LinksController::appendSlice(const InviteLinksSlice &slice) {
|
||||||
}
|
}
|
||||||
|
|
||||||
void LinksController::rowClicked(not_null<PeerListRow*> row) {
|
void LinksController::rowClicked(not_null<PeerListRow*> row) {
|
||||||
delegate()->peerListShowBox(
|
delegate()->peerListUiShow()->showBox(
|
||||||
ShowInviteLinkBox(_peer, static_cast<Row*>(row.get())->data()));
|
ShowInviteLinkBox(_peer, static_cast<Row*>(row.get())->data()));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -573,25 +573,27 @@ base::unique_qptr<Ui::PopupMenu> LinksController::createRowContextMenu(
|
||||||
st::popupMenuWithIcons);
|
st::popupMenuWithIcons);
|
||||||
if (data.revoked) {
|
if (data.revoked) {
|
||||||
result->addAction(tr::lng_group_invite_context_delete(tr::now), [=] {
|
result->addAction(tr::lng_group_invite_context_delete(tr::now), [=] {
|
||||||
delegate()->peerListShowBox(DeleteLinkBox(_peer, _admin, link));
|
delegate()->peerListUiShow()->showBox(
|
||||||
|
DeleteLinkBox(_peer, _admin, link));
|
||||||
}, &st::menuIconDelete);
|
}, &st::menuIconDelete);
|
||||||
} else {
|
} else {
|
||||||
result->addAction(tr::lng_group_invite_context_copy(tr::now), [=] {
|
result->addAction(tr::lng_group_invite_context_copy(tr::now), [=] {
|
||||||
CopyInviteLink(delegate()->peerListUiShow(), link);
|
CopyInviteLink(delegate()->peerListUiShow(), link);
|
||||||
}, &st::menuIconCopy);
|
}, &st::menuIconCopy);
|
||||||
result->addAction(tr::lng_group_invite_context_share(tr::now), [=] {
|
result->addAction(tr::lng_group_invite_context_share(tr::now), [=] {
|
||||||
delegate()->peerListShowBox(
|
delegate()->peerListUiShow()->showBox(
|
||||||
ShareInviteLinkBox(_peer, link));
|
ShareInviteLinkBox(_peer, link));
|
||||||
}, &st::menuIconShare);
|
}, &st::menuIconShare);
|
||||||
result->addAction(tr::lng_group_invite_context_qr(tr::now), [=] {
|
result->addAction(tr::lng_group_invite_context_qr(tr::now), [=] {
|
||||||
delegate()->peerListShowBox(
|
delegate()->peerListUiShow()->showBox(
|
||||||
InviteLinkQrBox(link, tr::lng_group_invite_qr_about()));
|
InviteLinkQrBox(link, tr::lng_group_invite_qr_about()));
|
||||||
}, &st::menuIconQrCode);
|
}, &st::menuIconQrCode);
|
||||||
result->addAction(tr::lng_group_invite_context_edit(tr::now), [=] {
|
result->addAction(tr::lng_group_invite_context_edit(tr::now), [=] {
|
||||||
delegate()->peerListShowBox(EditLinkBox(_peer, data));
|
delegate()->peerListUiShow()->showBox(EditLinkBox(_peer, data));
|
||||||
}, &st::menuIconEdit);
|
}, &st::menuIconEdit);
|
||||||
result->addAction(tr::lng_group_invite_context_revoke(tr::now), [=] {
|
result->addAction(tr::lng_group_invite_context_revoke(tr::now), [=] {
|
||||||
delegate()->peerListShowBox(RevokeLinkBox(_peer, _admin, link));
|
delegate()->peerListUiShow()->showBox(
|
||||||
|
RevokeLinkBox(_peer, _admin, link));
|
||||||
}, &st::menuIconRemove);
|
}, &st::menuIconRemove);
|
||||||
}
|
}
|
||||||
return result;
|
return result;
|
||||||
|
@ -799,7 +801,7 @@ void AdminsController::loadMoreRows() {
|
||||||
}
|
}
|
||||||
|
|
||||||
void AdminsController::rowClicked(not_null<PeerListRow*> row) {
|
void AdminsController::rowClicked(not_null<PeerListRow*> row) {
|
||||||
delegate()->peerListShowBox(
|
delegate()->peerListUiShow()->showBox(
|
||||||
Box(ManageInviteLinksBox, _peer, row->peer()->asUser(), 0, 0));
|
Box(ManageInviteLinksBox, _peer, row->peer()->asUser(), 0, 0));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -115,10 +115,6 @@ public:
|
||||||
void peerListFinishSelectedRowsBunch() override;
|
void peerListFinishSelectedRowsBunch() override;
|
||||||
void peerListSetDescription(
|
void peerListSetDescription(
|
||||||
object_ptr<Ui::FlatLabel> description) override;
|
object_ptr<Ui::FlatLabel> description) override;
|
||||||
void peerListShowBox(
|
|
||||||
object_ptr<Ui::BoxContent> content,
|
|
||||||
Ui::LayerOptions options = Ui::LayerOption::KeepOther) override;
|
|
||||||
void peerListHideLayer() override;
|
|
||||||
std::shared_ptr<Main::SessionShow> peerListUiShow() override;
|
std::shared_ptr<Main::SessionShow> peerListUiShow() override;
|
||||||
void peerListSetRowChecked(
|
void peerListSetRowChecked(
|
||||||
not_null<PeerListRow*> row,
|
not_null<PeerListRow*> row,
|
||||||
|
@ -183,14 +179,6 @@ void InactiveDelegate::peerListSetDescription(
|
||||||
description.destroy();
|
description.destroy();
|
||||||
}
|
}
|
||||||
|
|
||||||
void InactiveDelegate::peerListShowBox(
|
|
||||||
object_ptr<Ui::BoxContent> content,
|
|
||||||
Ui::LayerOptions options) {
|
|
||||||
}
|
|
||||||
|
|
||||||
void InactiveDelegate::peerListHideLayer() {
|
|
||||||
}
|
|
||||||
|
|
||||||
std::shared_ptr<Main::SessionShow> InactiveDelegate::peerListUiShow() {
|
std::shared_ptr<Main::SessionShow> InactiveDelegate::peerListUiShow() {
|
||||||
Unexpected("...InactiveDelegate::peerListUiShow");
|
Unexpected("...InactiveDelegate::peerListUiShow");
|
||||||
}
|
}
|
||||||
|
|
|
@ -1975,14 +1975,6 @@ void Members::peerListSetDescription(
|
||||||
description.destroy();
|
description.destroy();
|
||||||
}
|
}
|
||||||
|
|
||||||
void Members::peerListShowBox(
|
|
||||||
object_ptr<Ui::BoxContent> content,
|
|
||||||
Ui::LayerOptions options) {
|
|
||||||
}
|
|
||||||
|
|
||||||
void Members::peerListHideLayer() {
|
|
||||||
}
|
|
||||||
|
|
||||||
std::shared_ptr<Main::SessionShow> Members::peerListUiShow() {
|
std::shared_ptr<Main::SessionShow> Members::peerListUiShow() {
|
||||||
Unexpected("...Members::peerListUiShow");
|
Unexpected("...Members::peerListUiShow");
|
||||||
}
|
}
|
||||||
|
|
|
@ -88,10 +88,6 @@ private:
|
||||||
void peerListFinishSelectedRowsBunch() override;
|
void peerListFinishSelectedRowsBunch() override;
|
||||||
void peerListSetDescription(
|
void peerListSetDescription(
|
||||||
object_ptr<Ui::FlatLabel> description) override;
|
object_ptr<Ui::FlatLabel> description) override;
|
||||||
void peerListShowBox(
|
|
||||||
object_ptr<Ui::BoxContent> content,
|
|
||||||
Ui::LayerOptions options = Ui::LayerOption::KeepOther) override;
|
|
||||||
void peerListHideLayer() override;
|
|
||||||
std::shared_ptr<Main::SessionShow> peerListUiShow() override;
|
std::shared_ptr<Main::SessionShow> peerListUiShow() override;
|
||||||
|
|
||||||
void setupAddMember(not_null<GroupCall*> call);
|
void setupAddMember(not_null<GroupCall*> call);
|
||||||
|
|
|
@ -281,16 +281,6 @@ void InnerWidget::peerListSetDescription(
|
||||||
description.destroy();
|
description.destroy();
|
||||||
}
|
}
|
||||||
|
|
||||||
void InnerWidget::peerListShowBox(
|
|
||||||
object_ptr<Ui::BoxContent> content,
|
|
||||||
Ui::LayerOptions options) {
|
|
||||||
_show->showBox(std::move(content), options);
|
|
||||||
}
|
|
||||||
|
|
||||||
void InnerWidget::peerListHideLayer() {
|
|
||||||
_show->hideLayer();
|
|
||||||
}
|
|
||||||
|
|
||||||
std::shared_ptr<Main::SessionShow> InnerWidget::peerListUiShow() {
|
std::shared_ptr<Main::SessionShow> InnerWidget::peerListUiShow() {
|
||||||
return _show;
|
return _show;
|
||||||
}
|
}
|
||||||
|
|
|
@ -64,10 +64,6 @@ private:
|
||||||
void peerListFinishSelectedRowsBunch() override;
|
void peerListFinishSelectedRowsBunch() override;
|
||||||
void peerListSetDescription(
|
void peerListSetDescription(
|
||||||
object_ptr<Ui::FlatLabel> description) override;
|
object_ptr<Ui::FlatLabel> description) override;
|
||||||
void peerListShowBox(
|
|
||||||
object_ptr<Ui::BoxContent> content,
|
|
||||||
Ui::LayerOptions options = Ui::LayerOption::KeepOther) override;
|
|
||||||
void peerListHideLayer() override;
|
|
||||||
std::shared_ptr<Main::SessionShow> peerListUiShow() override;
|
std::shared_ptr<Main::SessionShow> peerListUiShow() override;
|
||||||
|
|
||||||
object_ptr<ListWidget> setupList(
|
object_ptr<ListWidget> setupList(
|
||||||
|
|
|
@ -51,10 +51,6 @@ public:
|
||||||
void peerListFinishSelectedRowsBunch() override;
|
void peerListFinishSelectedRowsBunch() override;
|
||||||
void peerListSetDescription(
|
void peerListSetDescription(
|
||||||
object_ptr<Ui::FlatLabel> description) override;
|
object_ptr<Ui::FlatLabel> description) override;
|
||||||
void peerListShowBox(
|
|
||||||
object_ptr<Ui::BoxContent> content,
|
|
||||||
Ui::LayerOptions options = Ui::LayerOption::KeepOther) override;
|
|
||||||
void peerListHideLayer() override;
|
|
||||||
std::shared_ptr<Main::SessionShow> peerListUiShow() override;
|
std::shared_ptr<Main::SessionShow> peerListUiShow() override;
|
||||||
|
|
||||||
};
|
};
|
||||||
|
@ -92,14 +88,6 @@ void ListDelegate::peerListSetDescription(
|
||||||
description.destroy();
|
description.destroy();
|
||||||
}
|
}
|
||||||
|
|
||||||
void ListDelegate::peerListShowBox(
|
|
||||||
object_ptr<Ui::BoxContent> content,
|
|
||||||
Ui::LayerOptions options) {
|
|
||||||
}
|
|
||||||
|
|
||||||
void ListDelegate::peerListHideLayer() {
|
|
||||||
}
|
|
||||||
|
|
||||||
std::shared_ptr<Main::SessionShow> ListDelegate::peerListUiShow() {
|
std::shared_ptr<Main::SessionShow> ListDelegate::peerListUiShow() {
|
||||||
Unexpected("...ListDelegate::peerListUiShow");
|
Unexpected("...ListDelegate::peerListUiShow");
|
||||||
}
|
}
|
||||||
|
|
|
@ -459,16 +459,6 @@ void Members::peerListAddSelectedRowInBunch(not_null<PeerListRow*> row) {
|
||||||
void Members::peerListFinishSelectedRowsBunch() {
|
void Members::peerListFinishSelectedRowsBunch() {
|
||||||
}
|
}
|
||||||
|
|
||||||
void Members::peerListShowBox(
|
|
||||||
object_ptr<Ui::BoxContent> content,
|
|
||||||
Ui::LayerOptions options) {
|
|
||||||
_show->showBox(std::move(content), options);
|
|
||||||
}
|
|
||||||
|
|
||||||
void Members::peerListHideLayer() {
|
|
||||||
_show->hideLayer();
|
|
||||||
}
|
|
||||||
|
|
||||||
std::shared_ptr<Main::SessionShow> Members::peerListUiShow() {
|
std::shared_ptr<Main::SessionShow> Members::peerListUiShow() {
|
||||||
return _show;
|
return _show;
|
||||||
}
|
}
|
||||||
|
|
|
@ -78,10 +78,6 @@ private:
|
||||||
void peerListFinishSelectedRowsBunch() override;
|
void peerListFinishSelectedRowsBunch() override;
|
||||||
void peerListSetDescription(
|
void peerListSetDescription(
|
||||||
object_ptr<Ui::FlatLabel> description) override;
|
object_ptr<Ui::FlatLabel> description) override;
|
||||||
void peerListShowBox(
|
|
||||||
object_ptr<Ui::BoxContent> content,
|
|
||||||
Ui::LayerOptions options = Ui::LayerOption::KeepOther) override;
|
|
||||||
void peerListHideLayer() override;
|
|
||||||
std::shared_ptr<Main::SessionShow> peerListUiShow() override;
|
std::shared_ptr<Main::SessionShow> peerListUiShow() override;
|
||||||
|
|
||||||
//void peerListAppendRow(
|
//void peerListAppendRow(
|
||||||
|
|
Loading…
Add table
Reference in a new issue