Merge branch 'master' into postbox-refactoring-1

This commit is contained in:
Ali 2021-09-09 23:27:18 +04:00
commit 46b9ccda11

View File

@ -260,7 +260,7 @@ private class AdMessagesHistoryContextImpl {
self.state.set(CachedState.getCached(postbox: account.postbox, peerId: peerId) self.state.set(CachedState.getCached(postbox: account.postbox, peerId: peerId)
|> mapToSignal { cachedState -> Signal<State, NoError> in |> mapToSignal { cachedState -> Signal<State, NoError> in
if false, let cachedState = cachedState, cachedState.timestamp >= Int32(Date().timeIntervalSince1970) - 5 * 60 { if let cachedState = cachedState, cachedState.timestamp >= Int32(Date().timeIntervalSince1970) - 5 * 60 {
return account.postbox.transaction { transaction -> State in return account.postbox.transaction { transaction -> State in
return State(messages: cachedState.messages.map { message in return State(messages: cachedState.messages.map { message in
return message.toMessage(peerId: peerId, transaction: transaction) return message.toMessage(peerId: peerId, transaction: transaction)