Fix issue in disconnect identity server confirmation dialog content

This commit is contained in:
Benoit Marty 2021-12-08 16:30:45 +01:00 committed by Benoit Marty
parent 8fefee9b02
commit f340a19c8e

View File

@ -167,10 +167,11 @@ class DiscoverySettingsFragment @Inject constructor(
val pidList = state.emailList().orEmpty() + state.phoneNumbersList().orEmpty() val pidList = state.emailList().orEmpty() + state.phoneNumbersList().orEmpty()
val hasBoundIds = pidList.any { it.isShared() == SharedState.SHARED } val hasBoundIds = pidList.any { it.isShared() == SharedState.SHARED }
val serverUrl = state.identityServer()?.serverUrl.orEmpty()
val message = if (hasBoundIds) { val message = if (hasBoundIds) {
getString(R.string.settings_discovery_disconnect_with_bound_pid, state.identityServer(), state.identityServer()) getString(R.string.settings_discovery_disconnect_with_bound_pid, serverUrl, serverUrl)
} else { } else {
getString(R.string.disconnect_identity_server_dialog_content, state.identityServer()) getString(R.string.disconnect_identity_server_dialog_content, serverUrl)
} }
MaterialAlertDialogBuilder(requireActivity()) MaterialAlertDialogBuilder(requireActivity())