Poll creators see the "edit poll" button in the timeline when no one voted yet
Alternatively users can use the timeline menu to edit a poll
If someone voted, the "Edit poll" button becomes "End poll" an the edit isn't allowed anymore
In this case the timeline menu should't show the "Edit poll" option anymore
After the edit starts, the apps shows a similar form as for the creation of a poll but with all the fields filled with the data from the editing poll (design).
To complete the edit, the poll should pass all the preconditions we check for poll's creation (max 20 options, no empty options, no empty poll's question)
After the tap on "Done", the new event (the edited poll) is sent in the timeline.
The editor is allowed to complete the edit even if votes arrive during the edit. Votes sent during the edit should be considered "lost" and the edited poll must not take them into account.
Tap on "Cancel" shows this alert just if at least a change has been made in the form.
The same alert should be shown in the "create new poll" flow (copies need to updated).
Tap on "Delete a Poll" will show a confirmation alert. If the action is confirmed, the poll is deleted from the timeline.
Display the "(edited)" mark next to edited polls in the timeline
Can room's administrators (people having enough power levels) edit the poll as poll creators?
~What happens if votes are received while an a poll edit is in progress?~
~Legacy clients ignore the problem and allow the edit anyway. In this case the votes preceding the edit are not rendered in the timeline.~
~@VolkerJunginger suggests to disable the edit/raise an error when this happens~
Is local echo working for edited event? What happens on the timeline if the edit fails?
Subtasks
### Android
- [x] Allow editing a poll https://github.com/vector-im/element-x-android/pull/1869
- [x] Add confirmation dialog for canceling an edit https://github.com/vector-im/element-x-android/pull/1886
- [x] Add delete button to edit poll screen https://github.com/vector-im/element-x-android/pull/1895
- [x] Display the "(edited)" mark next to edited polls in the timeline https://github.com/vector-im/element-x-android/pull/1897
### iOS
### Other
- [ ] https://github.com/ruma/ruma/pull/1638
- [x] Clean up unused strings in Localazy (particularly for common dialogs which now differ between the platforms)
Description
Acceptance criteria
Size estimate
M
Dependencies
Preconditions
Sign-off
Android
iOS
Out of scope
Open questions
Subtasks