mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-06-16 05:55:20 +00:00
Fix excessive looping in mark all unseen code
This commit is contained in:
parent
146b458f8a
commit
4b7e4ac2c7
@ -181,8 +181,12 @@ private func synchronizeMarkAllUnseen(transaction: Transaction, postbox: Postbox
|
||||
)
|
||||
|> mapToSignal { resultId -> Signal<Void, GetUnseenIdsError> in
|
||||
if let resultId = resultId {
|
||||
let _ = currentMaxId.swap(resultId)
|
||||
return .complete()
|
||||
let previous = currentMaxId.swap(resultId)
|
||||
if previous == resultId {
|
||||
return .fail(.done)
|
||||
} else {
|
||||
return .complete()
|
||||
}
|
||||
} else {
|
||||
return .fail(.done)
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user