mirror of
https://github.com/telegramdesktop/tdesktop
synced 2025-08-31 06:26:18 +00:00
Open theme editor for existing themes.
This commit is contained in:
@@ -915,17 +915,12 @@ std::unique_ptr<Preview> PreviewFromFile(
|
||||
auto result = std::make_unique<Preview>();
|
||||
auto &object = result->object;
|
||||
object.cloud = cloud;
|
||||
if (cloud.documentId || filepath.isEmpty()) {
|
||||
object.pathRelative = QString();
|
||||
object.pathAbsolute = QString(kThemePathAbsoluteCloud);
|
||||
} else {
|
||||
object.pathRelative = filepath.isEmpty()
|
||||
? QString()
|
||||
: QDir().relativeFilePath(filepath);
|
||||
object.pathAbsolute = filepath.isEmpty()
|
||||
? QString()
|
||||
: QFileInfo(filepath).absoluteFilePath();
|
||||
}
|
||||
object.pathRelative = filepath.isEmpty()
|
||||
? QString()
|
||||
: QDir().relativeFilePath(filepath);
|
||||
object.pathAbsolute = filepath.isEmpty()
|
||||
? QString()
|
||||
: QFileInfo(filepath).absoluteFilePath();
|
||||
if (bytes.isEmpty()) {
|
||||
if (!LoadFromFile(filepath, &result->instance, &object.content)) {
|
||||
return nullptr;
|
||||
|
Reference in New Issue
Block a user