Save entered URI in dialer when navigating away & restore it when coming back
This commit is contained in:
parent
8c6ff54e67
commit
7e74970302
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…
Reference in a new issue