2
0
mirror of https://github.com/kotatogram/kotatogram-desktop synced 2025-08-31 14:45:14 +00:00

Support different location types for thumbnails.

This commit is contained in:
John Preston
2020-04-16 16:37:26 +04:00
parent 37aabc0da9
commit 3797753d16
19 changed files with 491 additions and 148 deletions

View File

@@ -10,6 +10,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
#include "main/main_session.h"
#include "data/data_session.h"
#include "data/data_document.h"
#include "ui/image/image_location_factory.h"
#include "storage/localimageloader.h"
#include "base/unixtime.h"
#include "apiwrap.h"
@@ -112,7 +113,7 @@ void DicePack::tryGenerateLocalZero() {
Assert(result != nullptr);
const auto document = _session->data().processDocument(
result->document,
std::move(result->thumb));
Images::FromImageInMemory(result->thumb, "PNG"));
document->setLocation(FileLocation(path));
_map.emplace(0, document);