mirror of
https://github.com/oxen-io/session-android.git
synced 2025-08-23 00:17:45 +00:00
Add legacy and pre-release ui updates
This commit is contained in:
@@ -75,7 +75,12 @@ class ExpirationSettingsActivity: PassphraseRequiredActionBarActivity() {
|
||||
}
|
||||
|
||||
val deleteTypeOptions = listOf(
|
||||
RadioOption("off", getString(R.string.expiration_off)),
|
||||
RadioOption(value = "-1", title = getString(R.string.expiration_off)),
|
||||
RadioOption(
|
||||
value = "0",
|
||||
title = getString(R.string.expiration_type_disappear_legacy),
|
||||
subtitle = getString(R.string.expiration_type_disappear_legacy_description)
|
||||
),
|
||||
RadioOption(
|
||||
value = ExpirationType.DELETE_AFTER_READ_VALUE.toString(),
|
||||
title = getString(R.string.expiration_type_disappear_after_read),
|
||||
|
@@ -362,6 +362,7 @@ class ConversationActivityV2 : PassphraseRequiredActionBarActivity(), InputBarDe
|
||||
setUpRecipientObserver()
|
||||
getLatestOpenGroupInfoIfNeeded()
|
||||
setUpBlockedBanner()
|
||||
setUpOutdatedClientBanner();
|
||||
binding!!.searchBottomBar.setEventListener(this)
|
||||
setUpSearchResultObserver()
|
||||
scrollToFirstUnreadMessageIfNeeded()
|
||||
@@ -567,6 +568,13 @@ class ConversationActivityV2 : PassphraseRequiredActionBarActivity(), InputBarDe
|
||||
binding?.blockedBanner?.setOnClickListener { viewModel.unblock() }
|
||||
}
|
||||
|
||||
private fun setUpOutdatedClientBanner() {
|
||||
val recipient = viewModel.recipient ?: return
|
||||
if (recipient.expireMessages == 0) { return }
|
||||
binding?.outdatedBannerTextView?.text = resources.getString(R.string.activity_conversation_outdated_client_banner_text)
|
||||
binding?.outdatedBanner?.isVisible = true
|
||||
}
|
||||
|
||||
private fun setUpLinkPreviewObserver() {
|
||||
if (!textSecurePreferences.isLinkPreviewsEnabled()) {
|
||||
linkPreviewViewModel.onUserCancel(); return
|
||||
|
@@ -198,6 +198,28 @@
|
||||
|
||||
</RelativeLayout>
|
||||
|
||||
<RelativeLayout
|
||||
android:id="@+id/outdatedBanner"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_below="@+id/blockedBanner"
|
||||
android:background="@color/outdated_client_banner_background_color"
|
||||
android:visibility="gone"
|
||||
tools:visibility="visible">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/outdatedBannerTextView"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_centerInParent="true"
|
||||
android:layout_margin="@dimen/medium_spacing"
|
||||
android:textColor="@color/black"
|
||||
android:textSize="@dimen/small_font_size"
|
||||
android:textStyle="bold"
|
||||
tools:text="This user's client is outdated, things may not work as expected" />
|
||||
|
||||
</RelativeLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/messageRequestBar"
|
||||
android:layout_width="match_parent"
|
||||
|
@@ -159,4 +159,6 @@
|
||||
|
||||
<color name="danger">#EA5545</color>
|
||||
|
||||
<color name="outdated_client_banner_background_color">#00F782</color>
|
||||
|
||||
</resources>
|
||||
|
@@ -873,6 +873,8 @@
|
||||
<string name="new_conversation_dialog_close_button_content_description">Close Dialog</string>
|
||||
<string name="activity_expiration_settings_title">Disappearing Messages</string>
|
||||
<string name="activity_expiration_settings_subtitle">This setting applies to everyone in this conversation.</string>
|
||||
<string name="expiration_type_disappear_legacy_description">Use the original version of disappearing messages.</string>
|
||||
<string name="expiration_type_disappear_legacy">Legacy</string>
|
||||
<string name="activity_expiration_settings_subtitle_sent">Messages disappear after they have been sent.</string>
|
||||
<string name="expiration_type_disappear_after_read">Disappear After Read</string>
|
||||
<string name="expiration_type_disappear_after_read_description">Messages delete after they have been read.</string>
|
||||
@@ -882,4 +884,5 @@
|
||||
<string name="activity_expiration_settings_delete_type">Delete Type</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_conversation_outdated_client_banner_text">This user\'s client is outdated.</string>
|
||||
</resources>
|
||||
|
Reference in New Issue
Block a user