From 6b9ca15dff82a6292d2cc3a9dae10cf0b08bc411 Mon Sep 17 00:00:00 2001 From: Sylvain Berfini Date: Mon, 18 Mar 2024 14:14:27 +0100 Subject: [PATCH] Fixed dialplan prefix issue in account creator --- .../ui/assistant/viewmodel/AccountCreationViewModel.kt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/src/main/java/org/linphone/ui/assistant/viewmodel/AccountCreationViewModel.kt b/app/src/main/java/org/linphone/ui/assistant/viewmodel/AccountCreationViewModel.kt index 91c943b3a..856b33fc6 100644 --- a/app/src/main/java/org/linphone/ui/assistant/viewmodel/AccountCreationViewModel.kt +++ b/app/src/main/java/org/linphone/ui/assistant/viewmodel/AccountCreationViewModel.kt @@ -331,7 +331,7 @@ class AccountCreationViewModel @UiThread constructor() : ViewModel() { coreContext.postOnCoreThread { if (::accountCreator.isInitialized) { val dialPlan = selectedDialPlan.value - val prefix = dialPlan?.internationalCallPrefix.orEmpty() + val prefix = dialPlan?.countryCallingCode.orEmpty() val digitsPrefix = if (prefix.startsWith("+")) { prefix.substring(1) } else { @@ -429,7 +429,7 @@ class AccountCreationViewModel @UiThread constructor() : ViewModel() { @UiThread private fun isCreateButtonEnabled(): Boolean { - return username.value.orEmpty().isNotEmpty() && password.value.orEmpty().isNotEmpty() && phoneNumber.value.orEmpty().isNotEmpty() && selectedDialPlan.value?.internationalCallPrefix.orEmpty().isNotEmpty() + return username.value.orEmpty().isNotEmpty() && password.value.orEmpty().isNotEmpty() && phoneNumber.value.orEmpty().isNotEmpty() && selectedDialPlan.value?.countryCallingCode.orEmpty().isNotEmpty() } @UiThread