mirror of
https://hubproxy.babadafafafafa.cn/https://github.com/telegramdesktop/tdesktop
synced 2026-09-21 00:23:56 +08:00
Allow searching for messages by a user who has left a chat (#6417)
Fixes #5667
This commit is contained in:
committed by
John Preston
parent
eebcdb842d
commit
f979df3dfe
@@ -19,18 +19,15 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
|
||||
namespace Dialogs {
|
||||
|
||||
void ShowSearchFromBox(
|
||||
not_null<Window::SessionNavigation*> navigation,
|
||||
not_null<PeerData*> peer,
|
||||
Fn<void(not_null<UserData*>)> callback,
|
||||
Fn<void()> closedCallback) {
|
||||
auto createController = [
|
||||
navigation,
|
||||
peer,
|
||||
callback = std::move(callback)
|
||||
]() -> std::unique_ptr<PeerListController> {
|
||||
if (peer && (peer->isChat() || peer->isMegagroup())) {
|
||||
return std::make_unique<Dialogs::SearchFromController>(
|
||||
navigation,
|
||||
peer,
|
||||
std::move(callback));
|
||||
}
|
||||
@@ -50,18 +47,20 @@ void ShowSearchFromBox(
|
||||
}
|
||||
|
||||
SearchFromController::SearchFromController(
|
||||
not_null<Window::SessionNavigation*> navigation,
|
||||
not_null<PeerData*> peer,
|
||||
Fn<void(not_null<UserData*>)> callback)
|
||||
: ParticipantsBoxController(
|
||||
navigation,
|
||||
: AddSpecialBoxController(
|
||||
peer,
|
||||
ParticipantsBoxController::Role::Members)
|
||||
, _callback(std::move(callback)) {
|
||||
ParticipantsBoxController::Role::Members,
|
||||
AdminDoneCallback(),
|
||||
BannedDoneCallback())
|
||||
, _callback(std::move(callback))
|
||||
{
|
||||
_excludeSelf = false;
|
||||
}
|
||||
|
||||
void SearchFromController::prepare() {
|
||||
ParticipantsBoxController::prepare();
|
||||
AddSpecialBoxController::prepare();
|
||||
delegate()->peerListSetTitle(tr::lng_search_messages_from());
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user