Combo update

This commit is contained in:
Ali
2021-05-25 19:00:50 +04:00
parent af59d15412
commit ef99bb604f
29 changed files with 408 additions and 154 deletions

View File

@@ -258,12 +258,12 @@ func openChatWallpaper(context: AccountContext, message: Message, present: @esca
if case let .wallpaper(parameter) = resolvedUrl {
let source: WallpaperListSource
switch parameter {
case let .slug(slug, options, firstColor, secondColor, intensity, rotation):
source = .slug(slug, content.file, options, firstColor, secondColor, intensity, rotation, message)
case let .slug(slug, options, colors, intensity, rotation):
source = .slug(slug, content.file, options, colors, intensity, rotation, message)
case let .color(color):
source = .wallpaper(.color(color.argb), nil, nil, nil, nil, nil, message)
case let .gradient(topColor, bottomColor, rotation):
source = .wallpaper(.gradient([topColor.argb, bottomColor.argb], WallpaperSettings(rotation: rotation)), nil, nil, nil, nil, rotation, message)
source = .wallpaper(.color(color.argb), nil, [], nil, nil, message)
case let .gradient(colors, rotation):
source = .wallpaper(.gradient(colors, WallpaperSettings(rotation: rotation)), nil, [], nil, rotation, message)
}
let controller = WallpaperGalleryController(context: context, source: source)