mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-12-24 07:05:35 +00:00
Merge branch 'master' into postbox-refactoring-1
This commit is contained in:
@@ -104,7 +104,7 @@ func _internal_getChatThemes(accountManager: AccountManager<TelegramAccountManag
|
||||
}
|
||||
}
|
||||
|> mapToSignal { current, hash -> Signal<[ChatTheme], NoError> in
|
||||
if onlyCached {
|
||||
if onlyCached && !current.isEmpty {
|
||||
return .single(current)
|
||||
} else {
|
||||
return .single(current)
|
||||
@@ -154,3 +154,11 @@ extension ChatTheme {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
func managedChatThemesUpdates(accountManager: AccountManager<TelegramAccountManagerTypes>, network: Network) -> Signal<Void, NoError> {
|
||||
let poll = _internal_getChatThemes(accountManager: accountManager, network: network)
|
||||
|> mapToSignal { _ -> Signal<Void, NoError> in
|
||||
return .complete()
|
||||
}
|
||||
return (poll |> then(.complete() |> suspendAwareDelay(1.0 * 60.0 * 60.0, queue: Queue.concurrentDefaultQueue()))) |> restart
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user