mirror of
https://github.com/signalapp/Signal-Android.git
synced 2025-12-20 19:18:37 +00:00
Add fixes for primary choice when returning to chats.
This commit is contained in:
committed by
Greyson Parrelli
parent
53a6b0c719
commit
23b7ea90a1
@@ -184,6 +184,11 @@ class MainNavigationViewModel(
|
|||||||
navigatorScope?.launch {
|
navigatorScope?.launch {
|
||||||
val currentPane = navigator?.currentDestination?.pane ?: return@launch
|
val currentPane = navigator?.currentDestination?.pane ?: return@launch
|
||||||
if (currentPane == ThreePaneScaffoldRole.Secondary) {
|
if (currentPane == ThreePaneScaffoldRole.Secondary) {
|
||||||
|
val multiPane = navigator?.scaffoldDirective?.maxHorizontalPartitions == 2
|
||||||
|
if (multiPane && location == MainNavigationListLocation.CHATS && latestConversationLocation != null) {
|
||||||
|
navigator?.navigateTo(ThreePaneScaffoldRole.Primary)
|
||||||
|
}
|
||||||
|
|
||||||
return@launch
|
return@launch
|
||||||
} else {
|
} else {
|
||||||
navigator?.navigateBack()
|
navigator?.navigateBack()
|
||||||
|
|||||||
Reference in New Issue
Block a user