Code review / added new key for message hint

This commit is contained in:
Valere 2020-04-15 15:11:59 +02:00
parent 1deacfbb34
commit 81012746c4
3 changed files with 5 additions and 5 deletions

View File

@ -165,7 +165,7 @@ class TextComposerView @JvmOverloads constructor(context: Context, attrs: Attrib
fun setRoomEncrypted(isEncrypted: Boolean, roomEncryptionTrustLevel: RoomEncryptionTrustLevel?) { fun setRoomEncrypted(isEncrypted: Boolean, roomEncryptionTrustLevel: RoomEncryptionTrustLevel?) {
if (isEncrypted) { if (isEncrypted) {
composerEditText.setHint(R.string.room_message_placeholder_encrypted) composerEditText.setHint(R.string.room_message_placeholder)
composerShieldImageView.isVisible = true composerShieldImageView.isVisible = true
val shieldRes = when (roomEncryptionTrustLevel) { val shieldRes = when (roomEncryptionTrustLevel) {
RoomEncryptionTrustLevel.Trusted -> R.drawable.ic_shield_trusted RoomEncryptionTrustLevel.Trusted -> R.drawable.ic_shield_trusted
@ -174,7 +174,7 @@ class TextComposerView @JvmOverloads constructor(context: Context, attrs: Attrib
} }
composerShieldImageView.setImageDrawable(ContextCompat.getDrawable(context, shieldRes)) composerShieldImageView.setImageDrawable(ContextCompat.getDrawable(context, shieldRes))
} else { } else {
composerEditText.setHint(R.string.room_message_placeholder_not_encrypted) composerEditText.setHint(R.string.room_message_placeholder)
composerShieldImageView.isVisible = false composerShieldImageView.isVisible = false
} }
} }

View File

@ -515,8 +515,8 @@
<string name="room_one_user_is_typing">%s is typing…</string> <string name="room_one_user_is_typing">%s is typing…</string>
<string name="room_two_users_are_typing">%1$s &#038; %2$s are typing…</string> <string name="room_two_users_are_typing">%1$s &#038; %2$s are typing…</string>
<string name="room_many_users_are_typing">%1$s &#038; %2$s &#038; others are typing…</string> <string name="room_many_users_are_typing">%1$s &#038; %2$s &#038; others are typing…</string>
<string name="room_message_placeholder_encrypted">Message…</string> <string name="room_message_placeholder_encrypted">Send an encrypted message…</string>
<string name="room_message_placeholder_not_encrypted">Message</string> <string name="room_message_placeholder_not_encrypted">Send a message (unencrypted)</string>
<string name="room_message_placeholder_reply_to_encrypted">Send an encrypted reply…</string> <string name="room_message_placeholder_reply_to_encrypted">Send an encrypted reply…</string>
<string name="room_message_placeholder_reply_to_not_encrypted">Send a reply (unencrypted)…</string> <string name="room_message_placeholder_reply_to_not_encrypted">Send a reply (unencrypted)…</string>
<string name="room_offline_notification">Connectivity to the server has been lost.</string> <string name="room_offline_notification">Connectivity to the server has been lost.</string>

View File

@ -6,7 +6,7 @@
<!-- Sections has been created to avoid merge conflict. Let's see if it's better --> <!-- Sections has been created to avoid merge conflict. Let's see if it's better -->
<!-- BEGIN Strings added by Valere --> <!-- BEGIN Strings added by Valere -->
<string name="room_message_placeholder">Message…</string>
<!-- END Strings added by Valere --> <!-- END Strings added by Valere -->