From 204e0986d175da87feefdb21c56533cbd8040a10 Mon Sep 17 00:00:00 2001 From: Stefan Ceriu Date: Thu, 9 Dec 2021 09:17:43 +0200 Subject: [PATCH] Update RiotSwiftUI/Modules/Room/PollTimeline/PollTimelineViewModel.swift Co-authored-by: SBiOSoftWhare --- .../Modules/Room/PollTimeline/PollTimelineViewModel.swift | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/RiotSwiftUI/Modules/Room/PollTimeline/PollTimelineViewModel.swift b/RiotSwiftUI/Modules/Room/PollTimeline/PollTimelineViewModel.swift index 684cdc10d9..ddc6622496 100644 --- a/RiotSwiftUI/Modules/Room/PollTimeline/PollTimelineViewModel.swift +++ b/RiotSwiftUI/Modules/Room/PollTimeline/PollTimelineViewModel.swift @@ -107,8 +107,7 @@ class PollTimelineViewModel: PollTimelineViewModelType { return } - for answerOption in state.poll.answerOptions { - if answerOption.id == selectedAnswerIdentifier { + for answerOption in state.poll.answerOptions where answerOption.id == selectedAnswerIdentifier { if answerOption.selected { answerOption.selected = false answerOption.count -= 1