2017-08-01 15:55:51 +00:00
|
|
|
/*
|
|
|
|
This file is part of Telegram Desktop,
|
2018-01-03 10:23:14 +00:00
|
|
|
the official desktop application for the Telegram messaging service.
|
2017-08-01 15:55:51 +00:00
|
|
|
|
2018-01-03 10:23:14 +00:00
|
|
|
For license and copyright information please follow this link:
|
|
|
|
https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
|
2017-08-01 15:55:51 +00:00
|
|
|
*/
|
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include "boxes/peer_list_box.h"
|
2019-01-10 06:26:08 +00:00
|
|
|
#include "boxes/peers/edit_participants_box.h"
|
2017-08-01 15:55:51 +00:00
|
|
|
|
|
|
|
namespace Dialogs {
|
|
|
|
|
2017-10-03 13:05:58 +00:00
|
|
|
void ShowSearchFromBox(
|
2017-12-04 07:33:33 +00:00
|
|
|
not_null<Window::Navigation*> navigation,
|
2017-10-03 13:05:58 +00:00
|
|
|
not_null<PeerData*> peer,
|
2018-06-04 15:35:11 +00:00
|
|
|
Fn<void(not_null<UserData*>)> callback,
|
|
|
|
Fn<void()> closedCallback);
|
2017-08-06 20:07:51 +00:00
|
|
|
|
2019-01-13 13:28:05 +00:00
|
|
|
class SearchFromController : public ParticipantsBoxController {
|
2017-08-01 15:55:51 +00:00
|
|
|
public:
|
2019-01-13 13:28:05 +00:00
|
|
|
SearchFromController(
|
2017-12-04 07:33:33 +00:00
|
|
|
not_null<Window::Navigation*> navigation,
|
2019-01-13 13:28:05 +00:00
|
|
|
not_null<PeerData*> peer,
|
2018-06-04 15:35:11 +00:00
|
|
|
Fn<void(not_null<UserData*>)> callback);
|
2017-08-01 15:55:51 +00:00
|
|
|
|
|
|
|
void prepare() override;
|
2017-08-17 08:31:24 +00:00
|
|
|
void rowClicked(not_null<PeerListRow*> row) override;
|
2017-08-01 15:55:51 +00:00
|
|
|
|
|
|
|
protected:
|
2017-08-17 08:31:24 +00:00
|
|
|
std::unique_ptr<PeerListRow> createRow(not_null<UserData*> user) const override;
|
2017-08-01 15:55:51 +00:00
|
|
|
|
|
|
|
private:
|
2018-06-04 15:35:11 +00:00
|
|
|
Fn<void(not_null<UserData*>)> _callback;
|
2017-08-01 15:55:51 +00:00
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
} // namespace Dialogs
|