dialogs_search_from_controllers.h 821 B

12345678910111213141516171819202122232425262728293031323334
  1. /*
  2. This file is part of Telegram Desktop,
  3. the official desktop application for the Telegram messaging service.
  4. For license and copyright information please follow this link:
  5. https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
  6. */
  7. #pragma once
  8. #include "boxes/peer_list_box.h"
  9. #include "boxes/peers/add_participants_box.h"
  10. namespace Dialogs {
  11. object_ptr<Ui::BoxContent> SearchFromBox(
  12. not_null<PeerData*> peer,
  13. Fn<void(not_null<PeerData*>)> callback,
  14. Fn<void()> closedCallback);
  15. class SearchFromController : public AddSpecialBoxController {
  16. public:
  17. SearchFromController(
  18. not_null<PeerData*> peer,
  19. Fn<void(not_null<PeerData*>)> callback);
  20. void prepare() override;
  21. void rowClicked(not_null<PeerListRow*> row) override;
  22. private:
  23. Fn<void(not_null<PeerData*>)> _callback;
  24. };
  25. } // namespace Dialogs