mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-11-29 11:25:38 +00:00
Fix poll results update
This commit is contained in:
parent
fd52c04fc2
commit
6a4224e67c
@ -229,6 +229,8 @@ public final class TelegramMediaPoll: Media, Equatable {
|
|||||||
updatedResults = TelegramMediaPollResults(voters: updatedVoters.map({ voters in
|
updatedResults = TelegramMediaPollResults(voters: updatedVoters.map({ voters in
|
||||||
return TelegramMediaPollOptionVoters(selected: selectedOpaqueIdentifiers.contains(voters.opaqueIdentifier), opaqueIdentifier: voters.opaqueIdentifier, count: voters.count, isCorrect: correctOpaqueIdentifiers.contains(voters.opaqueIdentifier))
|
return TelegramMediaPollOptionVoters(selected: selectedOpaqueIdentifiers.contains(voters.opaqueIdentifier), opaqueIdentifier: voters.opaqueIdentifier, count: voters.count, isCorrect: correctOpaqueIdentifiers.contains(voters.opaqueIdentifier))
|
||||||
}), totalVoters: results.totalVoters, recentVoters: results.recentVoters)
|
}), totalVoters: results.totalVoters, recentVoters: results.recentVoters)
|
||||||
|
} else if let updatedVoters = results.voters {
|
||||||
|
updatedResults = TelegramMediaPollResults(voters: updatedVoters, totalVoters: results.totalVoters, recentVoters: results.recentVoters)
|
||||||
} else {
|
} else {
|
||||||
updatedResults = TelegramMediaPollResults(voters: self.results.voters, totalVoters: results.totalVoters, recentVoters: results.recentVoters)
|
updatedResults = TelegramMediaPollResults(voters: self.results.voters, totalVoters: results.totalVoters, recentVoters: results.recentVoters)
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user