Fix first time pattern background loading

This commit is contained in:
Ali
2021-06-13 02:14:44 +04:00
parent 6aa79050b0
commit 4b19b57a86
6 changed files with 116 additions and 52 deletions

View File

@@ -251,6 +251,13 @@ final class ThemePreviewControllerNode: ASDisplayNode, UIScrollViewDelegate {
let fileReference = FileMediaReference.standalone(media: file.file)
if wallpaper.isPattern {
signal = patternWallpaperImage(account: context.account, accountManager: context.sharedContext.accountManager, representations: convertedRepresentations, mode: .screen, autoFetchFullSize: false)
|> mapToSignal { value -> Signal<(TransformImageArguments) -> DrawingContext?, NoError> in
if let value = value {
return .single(value)
} else {
return .complete()
}
}
} else {
signal = .complete()
}