2
0
mirror of https://github.com/telegramdesktop/tdesktop synced 2025-08-31 06:26:18 +00:00

Added new setting for automatic dictionaries download.

This commit is contained in:
23rd
2020-02-20 22:27:21 +03:00
parent bb8aead078
commit bc6e1e7a0d
5 changed files with 54 additions and 16 deletions

View File

@@ -253,6 +253,19 @@ public:
return _variables.dictionariesEnabled.changes();
}
void setAutoDownloadDictionaries(bool value) {
_variables.autoDownloadDictionaries = value;
}
bool autoDownloadDictionaries() const {
return _variables.autoDownloadDictionaries.current();
}
rpl::producer<bool> autoDownloadDictionariesValue() const {
return _variables.autoDownloadDictionaries.value();
}
rpl::producer<bool> autoDownloadDictionariesChanges() const {
return _variables.autoDownloadDictionaries.changes();
}
[[nodiscard]] float64 videoPlaybackSpeed() const {
return _variables.videoPlaybackSpeed.current();
}
@@ -311,6 +324,7 @@ private:
rpl::variable<float64> videoPlaybackSpeed = 1.;
QByteArray videoPipGeometry;
rpl::variable<std::vector<int>> dictionariesEnabled;
rpl::variable<bool> autoDownloadDictionaries = true;
static constexpr auto kDefaultSupportChatsLimitSlice
= 7 * 24 * 60 * 60;