Fix xml pattern preview

This commit is contained in:
Ali
2019-12-28 02:23:48 +04:00
parent d8b72fbac8
commit b75233878f
2 changed files with 4 additions and 4 deletions

View File

@@ -106,7 +106,7 @@ private func updatedFileWallpaper(wallpaper: TelegramWallpaper, firstColor: UICo
}
private func updatedFileWallpaper(id: Int64? = nil, accessHash: Int64? = nil, slug: String, file: TelegramMediaFile, firstColor: UIColor?, secondColor: UIColor?, intensity: Int32?, rotation: Int32?) -> TelegramWallpaper {
var isPattern = ["image/png", "image/svg+xml"].contains(file.mimeType)
var isPattern = ["image/png", "image/svg+xml", "application/x-tgwallpattern"].contains(file.mimeType)
if let fileName = file.fileName, fileName.hasSuffix(".svgbg") {
isPattern = true
}