Add "end poll" confirmation dialog (#1799)

* Add poll end confirmation dialog

* Fix button role in CreatePollScreenViewModel
This commit is contained in:
Alfonso Grillo
2023-09-26 14:57:40 +02:00
committed by GitHub
parent dad6560ed4
commit 423604b18c
6 changed files with 19 additions and 2 deletions
@@ -155,7 +155,11 @@ class RoomScreenViewModel: RoomScreenViewModelType, RoomScreenViewModelProtocol
case .disableLongPress(let itemID):
state.longPressDisabledItemID = itemID
case let .endPoll(pollStartID):
endPoll(pollStartID: pollStartID)
state.bindings.confirmationAlertInfo = .init(id: .init(),
title: L10n.actionEndPoll,
message: L10n.commonPollEndConfirmation,
primaryButton: .init(title: L10n.actionCancel, role: .cancel, action: nil),
secondaryButton: .init(title: L10n.actionOk, action: { self.endPoll(pollStartID: pollStartID) }))
}
}