2
0
mirror of https://github.com/telegramdesktop/tdesktop synced 2025-08-31 22:46:10 +00:00

Save themes, apply and close editor on save.

This commit is contained in:
John Preston
2019-09-06 14:33:51 +03:00
parent 910f16312c
commit 9c86f0e0a5
9 changed files with 122 additions and 53 deletions

View File

@@ -568,6 +568,17 @@ void DocumentData::validateLottieSticker() {
}
}
void DocumentData::setDataAndCache(const QByteArray &data) {
setData(data);
if (saveToCache() && data.size() <= Storage::kMaxFileInMemory) {
session().data().cache().put(
cacheKey(),
Storage::Cache::Database::TaggedValue(
base::duplicate(data),
cacheTag()));
}
}
bool DocumentData::checkWallPaperProperties() {
if (type == WallPaperDocument) {
return true;