/* This file is part of Telegram Desktop, the official desktop application for the Telegram messaging service. For license and copyright information please follow this link: https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL */ #pragma once #include "boxes/peer_list_controllers.h" class AddBotToGroupBoxController : public ChatsListBoxController , public base::has_weak_ptr { public: static void Start(not_null bot); explicit AddBotToGroupBoxController(not_null bot); Main::Session &session() const override; void rowClicked(not_null row) override; protected: std::unique_ptr createRow(not_null history) override; void prepareViewHook() override; QString emptyBoxText() const override; private: static bool SharingBotGame(not_null bot); object_ptr prepareAdminnedChats(); bool needToCreateRow(not_null peer) const; bool sharingBotGame() const; QString noResultsText() const; void updateLabels(); void shareBotGame(not_null chat); void addBotToGroup(not_null chat); const not_null _bot; rpl::event_stream> _groups; rpl::event_stream> _channels; bool _adminToGroup = false; bool _adminToChannel = false; }; void AddBotToGroup(not_null bot, not_null chat);