mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2025-06-05 06:33:57 +02:00
Fix possible crash with large UI scale values.
This commit is contained in:
parent
863313531d
commit
f8e8155452
2 changed files with 7 additions and 2 deletions
|
@ -344,7 +344,12 @@ void CustomEmojiLoader::check() {
|
||||||
sizeOverride);
|
sizeOverride);
|
||||||
};
|
};
|
||||||
auto put = [=, key = cacheKey(document)](QByteArray value) {
|
auto put = [=, key = cacheKey(document)](QByteArray value) {
|
||||||
document->owner().cacheBigFile().put(key, std::move(value));
|
const auto size = value.size();
|
||||||
|
if (size <= Storage::Cache::Database::Settings().maxDataSize) {
|
||||||
|
document->owner().cacheBigFile().put(key, std::move(value));
|
||||||
|
} else {
|
||||||
|
LOG(("Data Error: Cached emoji size too big: %1.").arg(size));
|
||||||
|
}
|
||||||
};
|
};
|
||||||
const auto type = document->sticker()->type;
|
const auto type = document->sticker()->type;
|
||||||
auto generator = [=, bytes = Lottie::ReadContent(data, filepath)]()
|
auto generator = [=, bytes = Lottie::ReadContent(data, filepath)]()
|
||||||
|
|
|
@ -1 +1 @@
|
||||||
Subproject commit 288bec7157bf654d121ebfd2828801b49beb34ec
|
Subproject commit 39d440f774b5b0986200299c4893e3f6a4678c85
|
Loading…
Add table
Reference in a new issue