Fixed typo

This commit is contained in:
Ilya Laktyushin
2019-09-09 11:33:53 +03:00
parent 97eca304f8
commit 610f3ffbe7
2 changed files with 2 additions and 2 deletions

View File

@@ -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)

View File

@@ -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