/* 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 namespace Main { class Session; class SessionShow; } // namespace Main namespace Iv { class Data; class Shown; class Instance final { public: Instance(); ~Instance(); void show( std::shared_ptr show, not_null data, QString hash); [[nodiscard]] bool hasActiveWindow( not_null session) const; bool closeActive(); bool minimizeActive(); void closeAll(); [[nodiscard]] rpl::lifetime &lifetime(); private: void processOpenChannel(const QString &context); void processJoinChannel(const QString &context); std::unique_ptr _shown; Main::Session *_shownSession = nullptr; base::flat_set> _tracking; base::flat_set> _joining; rpl::lifetime _lifetime; }; } // namespace Iv