mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-12-23 14:45:21 +00:00
Fixed typo
This commit is contained in:
@@ -224,7 +224,7 @@ public final class ThemePreviewController: ViewController {
|
|||||||
return telegramThemes(postbox: context.account.postbox, network: context.account.network, accountManager: context.sharedContext.accountManager)
|
return telegramThemes(postbox: context.account.postbox, network: context.account.network, accountManager: context.sharedContext.accountManager)
|
||||||
|> take(1)
|
|> take(1)
|
||||||
|> mapToSignal { themes -> Signal<PresentationThemeReference, NoError> in
|
|> mapToSignal { themes -> Signal<PresentationThemeReference, NoError> in
|
||||||
let similarTheme = themes.filter { $0.isCreator && $0.title == info.title }.first
|
let similarTheme = themes.first(where: { $0.isCreator && $0.title == info.title })
|
||||||
if let similarTheme = similarTheme {
|
if let similarTheme = similarTheme {
|
||||||
return updateTheme(account: context.account, accountManager: context.sharedContext.accountManager, theme: similarTheme, title: nil, slug: nil, resource: info.resource, thumbnailData: themeThumbnailData)
|
return updateTheme(account: context.account, accountManager: context.sharedContext.accountManager, theme: similarTheme, title: nil, slug: nil, resource: info.resource, thumbnailData: themeThumbnailData)
|
||||||
|> map(Optional.init)
|
|> map(Optional.init)
|
||||||
|
|||||||
@@ -576,7 +576,7 @@ public func actualizedTheme(account: Account, accountManager: AccountManager, th
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|> map { themes -> TelegramTheme in
|
|> map { themes -> TelegramTheme in
|
||||||
let updatedTheme = themes.filter { $0.id == theme.id }.first
|
let updatedTheme = themes.first(where: { $0.id == theme.id })
|
||||||
if let updatedTheme = updatedTheme {
|
if let updatedTheme = updatedTheme {
|
||||||
if !areThemesEqual(updatedTheme, currentTheme) {
|
if !areThemesEqual(updatedTheme, currentTheme) {
|
||||||
currentTheme = updatedTheme
|
currentTheme = updatedTheme
|
||||||
|
|||||||
Reference in New Issue
Block a user