Update outdated client banner message

This commit is contained in:
charles 2022-12-08 10:53:47 +11:00
parent 8c002247d6
commit b06ef713c2
4 changed files with 7 additions and 5 deletions

View File

@ -571,7 +571,8 @@ class ConversationActivityV2 : PassphraseRequiredActionBarActivity(), InputBarDe
private fun setUpOutdatedClientBanner() { private fun setUpOutdatedClientBanner() {
val recipient = viewModel.recipient ?: return val recipient = viewModel.recipient ?: return
if (recipient.expireMessages == 0) { return } if (recipient.expireMessages == 0) { return }
binding?.outdatedBannerTextView?.text = resources.getString(R.string.activity_conversation_outdated_client_banner_text) binding?.outdatedBannerTextView?.text =
resources.getString(R.string.activity_conversation_outdated_client_banner_text, recipient.name)
binding?.outdatedBanner?.isVisible = true binding?.outdatedBanner?.isVisible = true
} }

View File

@ -212,10 +212,10 @@
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_centerInParent="true" android:layout_centerInParent="true"
android:layout_margin="@dimen/medium_spacing" android:layout_marginVertical="@dimen/very_small_spacing"
android:layout_marginHorizontal="@dimen/medium_spacing"
android:textColor="@color/black" android:textColor="@color/black"
android:textSize="@dimen/small_font_size" android:textSize="@dimen/tiny_font_size"
android:textStyle="bold"
tools:text="This user's client is outdated, things may not work as expected" /> tools:text="This user's client is outdated, things may not work as expected" />
</RelativeLayout> </RelativeLayout>

View File

@ -2,6 +2,7 @@
<resources> <resources>
<!-- Font Sizes --> <!-- Font Sizes -->
<dimen name="tiny_font_size">9sp</dimen>
<dimen name="very_small_font_size">12sp</dimen> <dimen name="very_small_font_size">12sp</dimen>
<dimen name="small_font_size">15sp</dimen> <dimen name="small_font_size">15sp</dimen>
<dimen name="medium_font_size">17sp</dimen> <dimen name="medium_font_size">17sp</dimen>

View File

@ -884,5 +884,5 @@
<string name="activity_expiration_settings_delete_type">Delete Type</string> <string name="activity_expiration_settings_delete_type">Delete Type</string>
<string name="activity_expiration_settings_timer">Timer</string> <string name="activity_expiration_settings_timer">Timer</string>
<string name="activity_expiration_settings_group_footer"><![CDATA[This setting applies to everyone in this conversation.<br/>Only group admins can change this setting.]]></string> <string name="activity_expiration_settings_group_footer"><![CDATA[This setting applies to everyone in this conversation.<br/>Only group admins can change this setting.]]></string>
<string name="activity_conversation_outdated_client_banner_text">This user\'s client is outdated.</string> <string name="activity_conversation_outdated_client_banner_text">%s is using an outdated client. Disappearing messages may not work as expected.</string>
</resources> </resources>