2
0
mirror of https://github.com/telegramdesktop/tdesktop synced 2025-08-31 06:26:18 +00:00

Correctly show custom themes in list.

This commit is contained in:
John Preston
2019-09-05 10:42:06 +03:00
parent 7485f0c960
commit 79106e0c01
9 changed files with 49 additions and 39 deletions

View File

@@ -909,9 +909,11 @@ void Generator::restoreTextPalette() {
} // namespace
std::unique_ptr<Preview> PreviewFromFile(
const QString &filepath,
const QByteArray &bytes,
const QString &filepath,
const Data::CloudTheme &cloud) {
Expects(!filepath.isEmpty()); // Use
auto result = std::make_unique<Preview>();
auto &object = result->object;
object.cloud = cloud;
@@ -935,11 +937,11 @@ std::unique_ptr<Preview> PreviewFromFile(
}
std::unique_ptr<Preview> GeneratePreview(
const QString &filepath,
const QByteArray &bytes,
const QString &filepath,
const Data::CloudTheme &cloud,
CurrentData &&data) {
auto result = PreviewFromFile(filepath, bytes, cloud);
auto result = PreviewFromFile(bytes, filepath, cloud);
if (!result) {
return nullptr;
}