mirror of
https://gitlab.linphone.org/BC/public/linphone-android.git
synced 2026-01-17 11:28:06 +00:00
Fixed back stack when sharing logs using conversation
This commit is contained in:
parent
c927a83aa5
commit
133f533b87
1 changed files with 13 additions and 8 deletions
|
|
@ -53,6 +53,7 @@ import org.linphone.ui.GenericActivity
|
|||
import org.linphone.ui.assistant.AssistantActivity
|
||||
import org.linphone.ui.main.chat.fragment.ConversationsListFragmentDirections
|
||||
import org.linphone.ui.main.fragment.AuthRequestedDialogModel
|
||||
import org.linphone.ui.main.help.fragment.DebugFragmentDirections
|
||||
import org.linphone.ui.main.sso.fragment.SingleSignOnFragmentDirections
|
||||
import org.linphone.ui.main.viewmodel.MainViewModel
|
||||
import org.linphone.ui.main.viewmodel.SharedMainViewModel
|
||||
|
|
@ -559,6 +560,9 @@ class MainActivity : GenericActivity() {
|
|||
)
|
||||
sharedViewModel.showConversationEvent.value = Event(pair)
|
||||
}
|
||||
|
||||
val action = DebugFragmentDirections.actionDebugFragmentToConversationsListFragment()
|
||||
findNavController().navigate(action)
|
||||
} else {
|
||||
val pair = parseShortcutIfAny(intent)
|
||||
if (pair != null) {
|
||||
|
|
@ -569,14 +573,15 @@ class MainActivity : GenericActivity() {
|
|||
)
|
||||
sharedViewModel.showConversationEvent.value = Event(pair)
|
||||
}
|
||||
}
|
||||
|
||||
if (findNavController().currentDestination?.id == R.id.conversationsListFragment) {
|
||||
Log.w("$TAG Current destination is already conversations list, skipping navigation")
|
||||
} else {
|
||||
val action =
|
||||
ConversationsListFragmentDirections.actionGlobalConversationsListFragment()
|
||||
findNavController().navigate(action)
|
||||
if (findNavController().currentDestination?.id == R.id.conversationsListFragment) {
|
||||
Log.w(
|
||||
"$TAG Current destination is already conversations list, skipping navigation"
|
||||
)
|
||||
} else {
|
||||
val action = ConversationsListFragmentDirections.actionGlobalConversationsListFragment()
|
||||
findNavController().navigate(action)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -587,7 +592,7 @@ class MainActivity : GenericActivity() {
|
|||
Log.i("$TAG Found shortcut ID [$shortcutId]")
|
||||
return LinphoneUtils.getLocalAndPeerSipUrisFromChatRoomId(shortcutId)
|
||||
} else {
|
||||
Log.i("$TAG No shortcut ID as found")
|
||||
Log.i("$TAG No shortcut ID was found")
|
||||
}
|
||||
return null
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue