mirror of
https://gitlab.linphone.org/BC/public/linphone-android.git
synced 2026-01-17 11:28:06 +00:00
Added a setting to have the dialpad automatically showing up (disabled by default)
This commit is contained in:
parent
c8d9248e0c
commit
455db9b9eb
2 changed files with 15 additions and 0 deletions
|
|
@ -220,6 +220,10 @@ class CorePreferences @UiThread constructor(private val context: Context) {
|
|||
val useUsernameAsSingleSignOnLoginHint: Boolean
|
||||
get() = config.getBool("ui", "use_username_as_sso_login_hint", true)
|
||||
|
||||
@get:WorkerThread
|
||||
val automaticallyShowDialpad: Boolean
|
||||
get() = config.getBool("ui", "automatically_show_dialpad", false)
|
||||
|
||||
/* Paths */
|
||||
|
||||
@get:WorkerThread
|
||||
|
|
|
|||
|
|
@ -29,6 +29,7 @@ import androidx.core.view.doOnPreDraw
|
|||
import androidx.lifecycle.ViewModelProvider
|
||||
import com.google.android.material.bottomsheet.BottomSheetBehavior
|
||||
import org.linphone.LinphoneApplication.Companion.coreContext
|
||||
import org.linphone.LinphoneApplication.Companion.corePreferences
|
||||
import org.linphone.R
|
||||
import org.linphone.core.Address
|
||||
import org.linphone.core.Friend
|
||||
|
|
@ -169,6 +170,16 @@ class StartCallFragment : GenericAddressPickerFragment() {
|
|||
viewModel.leaveFragmentEvent.postValue(Event(true))
|
||||
}
|
||||
|
||||
override fun onResume() {
|
||||
super.onResume()
|
||||
|
||||
coreContext.postOnCoreThread {
|
||||
if (corePreferences.automaticallyShowDialpad) {
|
||||
viewModel.isNumpadVisible.postValue(true)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
override fun onPause() {
|
||||
super.onPause()
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue