Display info dialogs when we prevent the user from starting a new voice broadcast

- Update the existing implementation used to start/stop a voice broadcast in order to handle the different cases where voice broadcast is denied
- Add the optional Voice broadcast action to the new wysiwyg composer
This commit is contained in:
Giom Foret
2022-10-20 00:38:42 +02:00
parent 24f0671a73
commit 16f57eaf3e
5 changed files with 98 additions and 24 deletions
@@ -42,6 +42,8 @@ struct ComposerCreateActionListViewState: BindableState {
case stickers
/// Upload an attachment
case attachments
/// Voice broadcast
case voiceBroadcast
/// Create a Poll
case polls
/// Add a location
@@ -63,6 +65,8 @@ extension ComposerCreateAction {
return VectorL10n.wysiwygComposerStartActionStickers
case .attachments:
return VectorL10n.wysiwygComposerStartActionAttachments
case .voiceBroadcast:
return VectorL10n.wysiwygComposerStartActionVoiceBroadcast
case .polls:
return VectorL10n.wysiwygComposerStartActionPolls
case .location:
@@ -80,6 +84,8 @@ extension ComposerCreateAction {
return "stickersAction"
case .attachments:
return "attachmentsAction"
case .voiceBroadcast:
return "voiceBroadcastAction"
case .polls:
return "pollsAction"
case .location:
@@ -97,6 +103,8 @@ extension ComposerCreateAction {
return Asset.Images.actionSticker.name
case .attachments:
return Asset.Images.actionFile.name
case .voiceBroadcast:
return Asset.Images.actionLive.name
case .polls:
return Asset.Images.actionPoll.name
case .location: