mirror of
https://github.com/telegramdesktop/tdesktop
synced 2025-08-30 22:16:14 +00:00
Change default autodownload settings.
This commit is contained in:
@@ -17,8 +17,7 @@ namespace Data {
|
||||
namespace AutoDownload {
|
||||
namespace {
|
||||
|
||||
constexpr auto kDefaultMaxSize = 10 * 1024 * 1024;
|
||||
constexpr auto kNonCacheMaxSize = 2 * 1024 * 1024;
|
||||
constexpr auto kDefaultMaxSize = 2 * 1024 * 1024;
|
||||
constexpr auto kVersion = char(1);
|
||||
|
||||
template <typename Enum>
|
||||
@@ -39,9 +38,12 @@ void SetDefaultsForSource(Full &data, Source source) {
|
||||
data.setBytesLimit(source, Type::VoiceMessage, kDefaultMaxSize);
|
||||
data.setBytesLimit(source, Type::VideoMessage, kDefaultMaxSize);
|
||||
data.setBytesLimit(source, Type::GIF, kDefaultMaxSize);
|
||||
data.setBytesLimit(source, Type::File, kNonCacheMaxSize);
|
||||
data.setBytesLimit(source, Type::Video, kNonCacheMaxSize);
|
||||
data.setBytesLimit(source, Type::Music, kNonCacheMaxSize);
|
||||
const auto channelsFileLimit = (source == Source::Channel)
|
||||
? 0
|
||||
: kDefaultMaxSize;
|
||||
data.setBytesLimit(source, Type::File, channelsFileLimit);
|
||||
data.setBytesLimit(source, Type::Video, channelsFileLimit);
|
||||
data.setBytesLimit(source, Type::Music, channelsFileLimit);
|
||||
}
|
||||
|
||||
const Full &Defaults() {
|
||||
|
Reference in New Issue
Block a user