2
0
mirror of https://github.com/kotatogram/kotatogram-desktop synced 2025-08-29 05:37:45 +00:00

Revert "Expanding total size and media limits"

This reverts commits 77ae87add7d3174939434d31a2ce3270f47f436a and ffaae36d2519aada6fd26696166204d22e9de6be.

Reverted feature because it adds only crashes for now.
This commit is contained in:
RadRussianRus 2020-07-03 12:40:14 +03:00
parent ffaae36d25
commit 2b1907b414

View File

@ -28,9 +28,9 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
namespace {
constexpr auto kMegabyte = int64(1024 * 1024);
constexpr auto kTotalSizeLimitsCount = 27;
constexpr auto kMediaSizeLimitsCount = 27;
constexpr auto kMinimalSizeLimit = 20 * kMegabyte;
constexpr auto kTotalSizeLimitsCount = 18;
constexpr auto kMediaSizeLimitsCount = 18;
constexpr auto kMinimalSizeLimit = 100 * kMegabyte;
constexpr auto kTimeLimitsCount = 22;
constexpr auto kMaxTimeLimitValue = std::numeric_limits<size_type>::max();
constexpr auto kFakeMediaCacheTag = uint16(0xFFFF);
@ -42,15 +42,8 @@ int64 TotalSizeLimitInMB(int index) {
return int64(index - 7) * 1024;
}
int64 TotalSizeLimitInMBKotato(int index) {
if (index < 9) {
return int64(index + 2) * 10;
}
return TotalSizeLimitInMB(index - 9);
}
int64 TotalSizeLimit(int index) {
return TotalSizeLimitInMBKotato(index) * kMegabyte;
return TotalSizeLimitInMB(index) * kMegabyte;
}
int64 MediaSizeLimitInMB(int index) {
@ -60,15 +53,8 @@ int64 MediaSizeLimitInMB(int index) {
return int64(index - 8) * 1024;
}
int64 MediaSizeLimitInMBKotato(int index) {
if (index < 9) {
return int64(index + 1) * 10;
}
return MediaSizeLimitInMB(index - 9);
}
int64 MediaSizeLimit(int index) {
return MediaSizeLimitInMBKotato(index) * kMegabyte;
return MediaSizeLimitInMB(index) * kMegabyte;
}
QString SizeLimitText(int64 limit) {