mirror of
https://gitlab.linphone.org/BC/public/linphone-android.git
synced 2026-04-25 05:28:32 +00:00
Fixed dialplan prefix issue in account creator
This commit is contained in:
parent
2ca3d152d1
commit
6b9ca15dff
1 changed files with 2 additions and 2 deletions
|
|
@ -331,7 +331,7 @@ class AccountCreationViewModel @UiThread constructor() : ViewModel() {
|
||||||
coreContext.postOnCoreThread {
|
coreContext.postOnCoreThread {
|
||||||
if (::accountCreator.isInitialized) {
|
if (::accountCreator.isInitialized) {
|
||||||
val dialPlan = selectedDialPlan.value
|
val dialPlan = selectedDialPlan.value
|
||||||
val prefix = dialPlan?.internationalCallPrefix.orEmpty()
|
val prefix = dialPlan?.countryCallingCode.orEmpty()
|
||||||
val digitsPrefix = if (prefix.startsWith("+")) {
|
val digitsPrefix = if (prefix.startsWith("+")) {
|
||||||
prefix.substring(1)
|
prefix.substring(1)
|
||||||
} else {
|
} else {
|
||||||
|
|
@ -429,7 +429,7 @@ class AccountCreationViewModel @UiThread constructor() : ViewModel() {
|
||||||
|
|
||||||
@UiThread
|
@UiThread
|
||||||
private fun isCreateButtonEnabled(): Boolean {
|
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
|
@UiThread
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue