mirror of
https://gitlab.linphone.org/BC/public/linphone-android.git
synced 2026-01-17 03:18:06 +00:00
Added back apply prefix to phone numbers for calls & chat setting
This commit is contained in:
parent
2eb376fd2d
commit
a0d74c8036
4 changed files with 35 additions and 1 deletions
|
|
@ -90,6 +90,7 @@ class AccountSettingsViewModel
|
|||
val mwiUri = MutableLiveData<String>()
|
||||
val voicemailUri = MutableLiveData<String>()
|
||||
|
||||
val applyPrefix = MutableLiveData<Boolean>()
|
||||
val replacePlusBy00 = MutableLiveData<Boolean>()
|
||||
|
||||
val cpimInBasicChatRooms = MutableLiveData<Boolean>()
|
||||
|
|
@ -167,6 +168,8 @@ class AccountSettingsViewModel
|
|||
|
||||
mwiUri.postValue(params.mwiServerAddress?.asStringUriOnly().orEmpty())
|
||||
voicemailUri.postValue(params.voicemailAddress?.asStringUriOnly().orEmpty())
|
||||
|
||||
applyPrefix.postValue(params.useInternationalPrefixForCallsAndChats)
|
||||
replacePlusBy00.postValue(params.isDialEscapePlusEnabled)
|
||||
|
||||
expire.postValue(params.expires.toString())
|
||||
|
|
@ -301,6 +304,8 @@ class AccountSettingsViewModel
|
|||
|
||||
newParams.ccmpServerUrl = ccmpServerUrl.value
|
||||
newParams.limeServerUrl = limeServerUrl.value
|
||||
|
||||
newParams.useInternationalPrefixForCallsAndChats = applyPrefix.value == true
|
||||
newParams.isDialEscapePlusEnabled = replacePlusBy00.value == true
|
||||
|
||||
account.params = newParams
|
||||
|
|
|
|||
|
|
@ -193,6 +193,33 @@
|
|||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/mwi_uri_title"
|
||||
app:layout_constraintBottom_toTopOf="@id/apply_international_switch"/>
|
||||
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
style="@style/settings_title_style"
|
||||
android:id="@+id/apply_international_prefix_title"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="16dp"
|
||||
android:layout_marginEnd="10dp"
|
||||
android:text="@string/account_settings_apply_international_prefix_title"
|
||||
android:maxLines="2"
|
||||
android:ellipsize="end"
|
||||
app:layout_constraintTop_toTopOf="@id/apply_international_switch"
|
||||
app:layout_constraintBottom_toBottomOf="@id/apply_international_switch"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintEnd_toStartOf="@id/apply_international_switch"/>
|
||||
|
||||
<com.google.android.material.materialswitch.MaterialSwitch
|
||||
style="@style/material_switch_style"
|
||||
android:id="@+id/apply_international_switch"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="16dp"
|
||||
android:layout_marginEnd="16dp"
|
||||
android:checked="@={viewModel.applyPrefix}"
|
||||
app:layout_constraintTop_toBottomOf="@id/mwi_uri"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintBottom_toTopOf="@id/replace_plus_by_00_switch"/>
|
||||
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
|
|
@ -219,7 +246,7 @@
|
|||
android:layout_marginEnd="16dp"
|
||||
android:layout_marginBottom="20dp"
|
||||
android:checked="@={viewModel.replacePlusBy00}"
|
||||
app:layout_constraintTop_toBottomOf="@id/mwi_uri"
|
||||
app:layout_constraintTop_toBottomOf="@id/apply_international_switch"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintBottom_toBottomOf="parent"/>
|
||||
|
||||
|
|
|
|||
|
|
@ -334,6 +334,7 @@
|
|||
<string name="account_settings_cpim_in_basic_conversations_title">Utiliser CPIM dans les conversations \"basiques\"</string>
|
||||
<string name="account_settings_voicemail_uri_title">URI de la messagerie vocale</string>
|
||||
<string name="account_settings_mwi_uri_title">URI du serveur MWI (Message Waiting Indicator)</string>
|
||||
<string name="account_settings_apply_international_prefix_title">Formatter les numéros en utilisant l\'indicatif international</string>
|
||||
<string name="account_settings_replace_plus_by_00_title">Remplacer + par 00 lors du formattage des numéros de téléphone</string>
|
||||
<string name="account_settings_update_password_title">Mettre à jour le mot de passe</string>
|
||||
|
||||
|
|
|
|||
|
|
@ -374,6 +374,7 @@
|
|||
<string name="account_settings_cpim_in_basic_conversations_title">Use CPIM in \"basic\" conversations</string>
|
||||
<string name="account_settings_voicemail_uri_title">Voicemail URI</string>
|
||||
<string name="account_settings_mwi_uri_title"> MWI server URI (Message Waiting Indicator)</string>
|
||||
<string name="account_settings_apply_international_prefix_title">Format phone numbers using international prefix</string>
|
||||
<string name="account_settings_replace_plus_by_00_title">Replace + by 00 when formatting phone numbers</string>
|
||||
<string name="account_settings_update_password_title">Update password</string>
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue