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

Save original bytes of a photo on "Save to disk".

This commit is contained in:
John Preston
2022-02-21 17:23:49 +03:00
parent c39f15bd71
commit 7718764294
8 changed files with 80 additions and 29 deletions

View File

@@ -480,7 +480,7 @@ void DocumentData::updateThumbnails(
owner().cache(),
Data::kImageCacheTag,
[&](Data::FileOrigin origin) { loadThumbnail(origin); },
[&](QImage preloaded) {
[&](QImage preloaded, QByteArray) {
if (const auto media = activeMediaView()) {
media->setThumbnail(std::move(preloaded));
}
@@ -530,7 +530,7 @@ void DocumentData::loadThumbnail(Data::FileOrigin origin) {
}
return true;
};
const auto done = [=](QImage result) {
const auto done = [=](QImage result, QByteArray) {
if (const auto active = activeMediaView()) {
active->setThumbnail(std::move(result));
}