mirror of
https://github.com/Novaloop-AG/element-x-ios.git
synced 2026-11-05 20:09:04 +00:00
Show room encryption state in the composer (#3841)
* Fixes #3835 - Show room encryption state in the composer * Update the preview test snapshots * Update the UI test snapshots.
This commit is contained in:
@@ -157,9 +157,11 @@ struct ComposerToolbar: View {
|
||||
selectedRange: $context.selectedRange,
|
||||
composerView: composerView,
|
||||
mode: context.viewState.composerMode,
|
||||
placeholder: placeholder,
|
||||
composerFormattingEnabled: context.composerFormattingEnabled,
|
||||
showResizeGrabber: context.composerFormattingEnabled,
|
||||
isExpanded: $context.composerExpanded) {
|
||||
isExpanded: $context.composerExpanded,
|
||||
isEncrypted: context.viewState.isRoomEncrypted) {
|
||||
sendMessage()
|
||||
} editAction: {
|
||||
context.send(viewAction: .editLastMessage)
|
||||
@@ -222,8 +224,16 @@ struct ComposerToolbar: View {
|
||||
private var placeholder: String {
|
||||
switch context.viewState.composerMode {
|
||||
case .reply(_, _, let isThread):
|
||||
return isThread ? L10n.actionReplyInThread : L10n.richTextEditorComposerPlaceholder
|
||||
return isThread ? L10n.actionReplyInThread : composerPlaceholder
|
||||
default:
|
||||
return composerPlaceholder
|
||||
}
|
||||
}
|
||||
|
||||
private var composerPlaceholder: String {
|
||||
if context.viewState.isRoomEncrypted {
|
||||
return L10n.richTextEditorComposerEncryptedPlaceholder
|
||||
} else {
|
||||
return L10n.richTextEditorComposerPlaceholder
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user