mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-12-30 01:40:27 +00:00
Pattern wallpaper improvements and bug fixes
This commit is contained in:
@@ -102,9 +102,9 @@ func chatControllerBackgroundImage(wallpaper: TelegramWallpaper, mode: Wallpaper
|
||||
}
|
||||
}
|
||||
case let .file(file):
|
||||
if file.isPattern, let color = file.settings.color {
|
||||
if file.isPattern, let color = file.settings.color, let intensity = file.settings.intensity {
|
||||
var image: UIImage?
|
||||
let _ = postbox.mediaBox.cachedResourceRepresentation(file.file.resource, representation: CachedPatternWallpaperRepresentation(color: color), complete: true, fetch: true, attemptSynchronously: true).start(next: { data in
|
||||
let _ = postbox.mediaBox.cachedResourceRepresentation(file.file.resource, representation: CachedPatternWallpaperRepresentation(color: color, intensity: intensity), complete: true, fetch: true, attemptSynchronously: true).start(next: { data in
|
||||
if data.complete {
|
||||
image = UIImage(contentsOfFile: data.path)?.precomposed()
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user