mirror of
https://github.com/SchildiChat/SchildiChat-android.git
synced 2025-03-17 11:48:51 +03:00
updating policy title to include show/hide
This commit is contained in:
parent
7e8ca29ca7
commit
2f732affa5
2 changed files with 8 additions and 5 deletions
|
@ -32,7 +32,6 @@ import im.vector.app.core.extensions.getFormattedValue
|
|||
import im.vector.app.core.resources.ColorProvider
|
||||
import im.vector.app.core.resources.StringProvider
|
||||
import im.vector.app.features.form.formAdvancedToggleItem
|
||||
import im.vector.app.features.terms.termItem
|
||||
import org.matrix.android.sdk.api.failure.Failure
|
||||
import org.matrix.android.sdk.api.session.identity.SharedState
|
||||
import org.matrix.android.sdk.api.session.identity.ThreePid
|
||||
|
@ -107,7 +106,7 @@ class DiscoverySettingsController @Inject constructor(
|
|||
}
|
||||
}
|
||||
|
||||
private fun buildIdentityServerSection(data: DiscoverySettingsState, ) {
|
||||
private fun buildIdentityServerSection(data: DiscoverySettingsState) {
|
||||
val identityServer = data.identityServer()
|
||||
val identityServerUrl = identityServer?.serverUrl ?: stringProvider.getString(R.string.none)
|
||||
val host = this
|
||||
|
@ -126,7 +125,10 @@ class DiscoverySettingsController @Inject constructor(
|
|||
if (terms != null) {
|
||||
formAdvancedToggleItem {
|
||||
id("policy-urls")
|
||||
title(host.stringProvider.getString(R.string.settings_discovery_identity_server_policies_title))
|
||||
val titleRes = if (data.isIdentityPolicyUrlsExpanded) {
|
||||
R.string.settings_discovery_hide_identity_server_policies_title
|
||||
} else R.string.settings_discovery_show_identity_server_policies_title
|
||||
title(host.stringProvider.getString(titleRes))
|
||||
expanded(data.isIdentityPolicyUrlsExpanded)
|
||||
listener { host.listener?.onPolicyUrlsExpandedStateToggled() }
|
||||
}
|
||||
|
@ -136,7 +138,7 @@ class DiscoverySettingsController @Inject constructor(
|
|||
id(term.url)
|
||||
name(term.name)
|
||||
url(term.url)
|
||||
clickListener {
|
||||
clickListener {
|
||||
// TODO
|
||||
}
|
||||
}
|
||||
|
|
|
@ -2349,7 +2349,8 @@
|
|||
<string name="add_identity_server">Configure identity server</string>
|
||||
<string name="open_discovery_settings">Open Discovery Settings</string>
|
||||
<string name="change_identity_server">Change identity server</string>
|
||||
<string name="settings_discovery_identity_server_policies_title">Identity server policy</string>
|
||||
<string name="settings_discovery_show_identity_server_policies_title">Show identity server policy</string>
|
||||
<string name="settings_discovery_hide_identity_server_policies_title">Hide identity server policy</string>
|
||||
<string name="settings_discovery_identity_server_info">You are currently using %1$s to discover and be discoverable by existing contacts you know.</string>
|
||||
<string name="settings_discovery_identity_server_info_none">You are not currently using an identity server. To discover and be discoverable by existing contacts you know, configure one below.</string>
|
||||
<string name="settings_discovery_emails_title">Discoverable email addresses</string>
|
||||
|
|
Loading…
Add table
Reference in a new issue