mirror of
https://gitlab.linphone.org/BC/public/linphone-android.git
synced 2026-01-17 11:28:06 +00:00
Fixes
This commit is contained in:
parent
b0a1ac3ee4
commit
4b6ab58048
4 changed files with 11 additions and 5 deletions
|
|
@ -132,7 +132,9 @@ class LoginFragment : Fragment() {
|
|||
|
||||
coreContext.postOnCoreThread {
|
||||
val prefix = PhoneNumberUtils.getDeviceInternationalPrefix(requireContext())
|
||||
viewModel.internationalPrefix.postValue(prefix)
|
||||
if (!prefix.isNullOrEmpty()) {
|
||||
viewModel.internationalPrefix.postValue(prefix)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -135,7 +135,9 @@ class RegisterFragment : Fragment() {
|
|||
|
||||
coreContext.postOnCoreThread {
|
||||
val prefix = PhoneNumberUtils.getDeviceInternationalPrefix(requireContext())
|
||||
viewModel.internationalPrefix.postValue("+$prefix")
|
||||
if (!prefix.isNullOrEmpty()) {
|
||||
viewModel.internationalPrefix.postValue("+$prefix")
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -121,7 +121,9 @@ class ThirdPartySipAccountLoginFragment : Fragment() {
|
|||
|
||||
coreContext.postOnCoreThread {
|
||||
val prefix = PhoneNumberUtils.getDeviceInternationalPrefix(requireContext())
|
||||
viewModel.internationalPrefix.postValue(prefix)
|
||||
if (!prefix.isNullOrEmpty()) {
|
||||
viewModel.internationalPrefix.postValue(prefix)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -40,11 +40,11 @@ import org.linphone.core.tools.Log
|
|||
|
||||
class LinphoneUtils {
|
||||
companion object {
|
||||
private const val TAG = "[App Utils]"
|
||||
private const val TAG = "[Linphone Utils]"
|
||||
|
||||
@WorkerThread
|
||||
fun getDefaultAccount(): Account? {
|
||||
return coreContext.core.defaultAccount ?: coreContext.core.accountList.first()
|
||||
return coreContext.core.defaultAccount ?: coreContext.core.accountList.firstOrNull()
|
||||
}
|
||||
|
||||
@AnyThread
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue