/* 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 AppConfig final { public: explicit AppConfig(not_null session); template Type get(const QString &key, Type fallback) const { if constexpr (std::is_same_v) { return getDouble(key, fallback); } } private: void refresh(); void refreshDelayed(); double getDouble(const QString &key, double fallback) const; not_null _session; mtpRequestId _requestId = 0; base::flat_map _data; }; } // namespace Main