mirror of
https://github.com/signalapp/Signal-Android.git
synced 2026-04-21 09:20:19 +01:00
Fix camera-first qr scans.
This commit is contained in:
@@ -88,7 +88,7 @@ class LinkDeviceFragment : ComposeFragment() {
|
||||
|
||||
Scaffolds.Settings(
|
||||
title = stringResource(id = R.string.preferences__linked_devices),
|
||||
onNavigationClick = { navController.popBackStack() },
|
||||
onNavigationClick = { findNavController().popOrFinish() },
|
||||
navigationIconPainter = painterResource(id = R.drawable.ic_arrow_left_24),
|
||||
navigationContentDescription = stringResource(id = R.string.Material3SearchToolbar__close)
|
||||
) { contentPadding: PaddingValues ->
|
||||
@@ -103,6 +103,12 @@ class LinkDeviceFragment : ComposeFragment() {
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
private fun NavController.popOrFinish() {
|
||||
if (!popBackStack()) {
|
||||
requireActivity().finishAfterTransition()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Composable
|
||||
@@ -117,7 +123,7 @@ fun DeviceDescriptionScreen(
|
||||
) {
|
||||
if (state.progressDialogMessage != -1) {
|
||||
if (navController?.currentDestination?.id == R.id.linkDeviceFinishedSheet) {
|
||||
navController?.popBackStack()
|
||||
navController.popBackStack()
|
||||
}
|
||||
Dialogs.IndeterminateProgressDialog(stringResource(id = state.progressDialogMessage))
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user