menu_ttl_validator.h 747 B

1234567891011121314151617181920212223242526272829303132333435363738
  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 "menu/menu_ttl.h"
  9. class PeerData;
  10. namespace Ui {
  11. class Show;
  12. } // namespace Ui
  13. namespace TTLMenu {
  14. class TTLValidator final {
  15. public:
  16. TTLValidator(
  17. std::shared_ptr<Ui::Show> show,
  18. not_null<PeerData*> peer);
  19. void showBox() const;
  20. [[nodiscard]] bool can() const;
  21. [[nodiscard]] Args createArgs() const;
  22. void showToast() const;
  23. const style::icon *icon() const;
  24. private:
  25. const not_null<PeerData*> _peer;
  26. const std::shared_ptr<Ui::Show> _show;
  27. };
  28. } // namespace TTLMenu