mirror of
https://github.com/Novaloop-AG/element-x-ios.git
synced 2026-11-05 11:58:32 +00:00
Only show a badge in the composer if the room is unencrypted. (#3866)
* Partially revert the message composer encryption badges and only show it for unencrypted rooms. * Update preview test snapshots. * Update UI test snapshots.
This commit is contained in:
@@ -850,6 +850,8 @@ internal enum L10n {
|
||||
internal static var richTextEditorComposerEncryptedPlaceholder: String { return L10n.tr("Localizable", "rich_text_editor_composer_encrypted_placeholder") }
|
||||
/// Message…
|
||||
internal static var richTextEditorComposerPlaceholder: String { return L10n.tr("Localizable", "rich_text_editor_composer_placeholder") }
|
||||
/// Unencrypted message…
|
||||
internal static var richTextEditorComposerUnencryptedPlaceholder: String { return L10n.tr("Localizable", "rich_text_editor_composer_unencrypted_placeholder") }
|
||||
/// Create a link
|
||||
internal static var richTextEditorCreateLink: String { return L10n.tr("Localizable", "rich_text_editor_create_link") }
|
||||
/// Edit link
|
||||
@@ -2242,8 +2244,6 @@ internal enum L10n {
|
||||
internal static var screenRoomlistMarkAsRead: String { return L10n.tr("Localizable", "screen_roomlist_mark_as_read") }
|
||||
/// Mark as unread
|
||||
internal static var screenRoomlistMarkAsUnread: String { return L10n.tr("Localizable", "screen_roomlist_mark_as_unread") }
|
||||
/// Browse all rooms
|
||||
internal static var screenRoomlistRoomDirectoryButtonTitle: String { return L10n.tr("Localizable", "screen_roomlist_room_directory_button_title") }
|
||||
/// Add room address
|
||||
internal static var screenSecurityAndPrivacyAddRoomAddressAction: String { return L10n.tr("Localizable", "screen_security_and_privacy_add_room_address_action") }
|
||||
/// Anyone can ask to join the room but an administrator or moderator will have to accept the request.
|
||||
|
||||
@@ -232,9 +232,9 @@ struct ComposerToolbar: View {
|
||||
|
||||
private var composerPlaceholder: String {
|
||||
if context.viewState.isRoomEncrypted {
|
||||
return L10n.richTextEditorComposerEncryptedPlaceholder
|
||||
} else {
|
||||
return L10n.richTextEditorComposerPlaceholder
|
||||
} else {
|
||||
return L10n.richTextEditorComposerUnencryptedPlaceholder
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -238,12 +238,9 @@ private struct MessageComposerStyleModifier<Header: View>: ViewModifier {
|
||||
|
||||
@ViewBuilder
|
||||
private var icon: some View {
|
||||
if isEncrypted {
|
||||
CompoundIcon(\.lockSolid, size: .xSmall, relativeTo: .compound.bodyMD)
|
||||
.foregroundStyle(.compound.iconSuccessPrimary)
|
||||
} else {
|
||||
if !isEncrypted {
|
||||
CompoundIcon(\.lockOff, size: .xSmall, relativeTo: .compound.bodyMD)
|
||||
.foregroundStyle(.compound.iconTertiary)
|
||||
.foregroundStyle(.compound.iconInfoPrimary)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user