mirror of
https://gitlab.linphone.org/BC/public/linphone-android.git
synced 2026-04-22 23:08:26 +00:00
Save entered URI in dialer when navigating away & restore it when coming back
This commit is contained in:
parent
0fcf3608c4
commit
5884929e25
2 changed files with 12 additions and 0 deletions
|
|
@ -144,15 +144,23 @@ class DialerFragment : SecureFragment<DialerFragmentBinding>() {
|
||||||
checkForUpdate()
|
checkForUpdate()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
override fun onPause() {
|
||||||
|
sharedViewModel.dialerUri = viewModel.enteredUri.value ?: ""
|
||||||
|
super.onPause()
|
||||||
|
}
|
||||||
|
|
||||||
override fun onResume() {
|
override fun onResume() {
|
||||||
super.onResume()
|
super.onResume()
|
||||||
|
|
||||||
if (resources.getBoolean(R.bool.isTablet)) {
|
if (resources.getBoolean(R.bool.isTablet)) {
|
||||||
coreContext.core.nativePreviewWindowId = binding.videoPreviewWindow
|
coreContext.core.nativePreviewWindowId = binding.videoPreviewWindow
|
||||||
}
|
}
|
||||||
|
|
||||||
viewModel.updateShowVideoPreview()
|
viewModel.updateShowVideoPreview()
|
||||||
viewModel.autoInitiateVideoCalls.value = coreContext.core.videoActivationPolicy.automaticallyInitiate
|
viewModel.autoInitiateVideoCalls.value = coreContext.core.videoActivationPolicy.automaticallyInitiate
|
||||||
uploadLogsInitiatedByUs = false
|
uploadLogsInitiatedByUs = false
|
||||||
|
|
||||||
|
viewModel.enteredUri.value = sharedViewModel.dialerUri
|
||||||
}
|
}
|
||||||
|
|
||||||
private fun displayDebugPopup() {
|
private fun displayDebugPopup() {
|
||||||
|
|
|
||||||
|
|
@ -60,4 +60,8 @@ class SharedMainViewModel : ViewModel() {
|
||||||
/* Call */
|
/* Call */
|
||||||
|
|
||||||
var pendingCallTransfer: Boolean = false
|
var pendingCallTransfer: Boolean = false
|
||||||
|
|
||||||
|
/* Dialer */
|
||||||
|
|
||||||
|
var dialerUri: String = ""
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue