mirror of
https://github.com/signalapp/Signal-Android.git
synced 2026-04-20 08:39:22 +01:00
Display back button when the conversation pane is expanded.
This commit is contained in:
committed by
Greyson Parrelli
parent
f38262c0ab
commit
43bb32e64b
@@ -415,6 +415,26 @@ class MainActivity : PassphraseRequiredActivity(), VoiceNoteMediaControllerOwner
|
||||
}
|
||||
}
|
||||
|
||||
val scope = rememberCoroutineScope()
|
||||
BackHandler(paneExpansionState.currentAnchor == detailOnlyAnchor) {
|
||||
scope.launch {
|
||||
paneExpansionState.animateTo(listOnlyAnchor)
|
||||
}
|
||||
}
|
||||
|
||||
LaunchedEffect(paneExpansionState.currentAnchor, detailOnlyAnchor, listOnlyAnchor, detailAndListAnchor) {
|
||||
val isFullScreenPane = when (paneExpansionState.currentAnchor) {
|
||||
listOnlyAnchor, detailOnlyAnchor -> {
|
||||
true
|
||||
}
|
||||
else -> {
|
||||
false
|
||||
}
|
||||
}
|
||||
|
||||
mainNavigationViewModel.onPaneAnchorChanged(isFullScreenPane)
|
||||
}
|
||||
|
||||
LaunchedEffect(paneExpansionState, detailOnlyAnchor, listOnlyAnchor, wrappedNavigator) {
|
||||
mainNavigationViewModel.detailLocation.collect {
|
||||
if (paneExpansionState.currentAnchor == listOnlyAnchor) {
|
||||
|
||||
Reference in New Issue
Block a user