mirror of
https://github.com/SchildiChat/SchildiChat-android.git
synced 2025-02-17 04:20:00 +03:00
handling empty policy list by showing empty copy
This commit is contained in:
parent
cccda9b699
commit
d00858f83b
2 changed files with 14 additions and 6 deletions
|
@ -133,12 +133,19 @@ class DiscoverySettingsController @Inject constructor(
|
|||
listener { host.listener?.onPolicyUrlsExpandedStateToggled(!data.isIdentityPolicyUrlsExpanded) }
|
||||
}
|
||||
if (data.isIdentityPolicyUrlsExpanded) {
|
||||
policies.forEach { policy ->
|
||||
discoveryPolicyItem {
|
||||
id(policy.url)
|
||||
name(policy.name)
|
||||
url(policy.url)
|
||||
clickListener { host.listener?.onPolicyTapped(policy) }
|
||||
if (policies.isEmpty()) {
|
||||
settingsInfoItem {
|
||||
id("emptyPolicy")
|
||||
helperText(host.stringProvider.getString(R.string.settings_discovery_no_policy_provided))
|
||||
}
|
||||
} else {
|
||||
policies.forEach { policy ->
|
||||
discoveryPolicyItem {
|
||||
id(policy.url)
|
||||
name(policy.name)
|
||||
url(policy.url)
|
||||
clickListener { host.listener?.onPolicyTapped(policy) }
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -2351,6 +2351,7 @@
|
|||
<string name="change_identity_server">Change identity server</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_no_policy_provided">No policy provided by the identity server</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