mirror of
https://github.com/signalapp/Signal-Android.git
synced 2026-06-29 02:26:05 +01:00
Fix empty detail screen showing after exiting a conversation in single pane mode.
Resolves https://github.com/signalapp/Signal-Android/issues/14850
This commit is contained in:
committed by
jeffrey-signal
parent
18b8e387ce
commit
b652e2d5f9
@@ -337,7 +337,7 @@ class MainNavigationViewModel(
|
||||
chatsBackStack.pop()
|
||||
if (chatsBackStack.isEmpty) {
|
||||
lockPaneToSecondary = true
|
||||
setFocusedPane(ThreePaneScaffoldRole.Secondary)
|
||||
popDetailPane()
|
||||
}
|
||||
}
|
||||
|
||||
@@ -345,7 +345,21 @@ class MainNavigationViewModel(
|
||||
backStack.reset()
|
||||
if (!isSplitPane) {
|
||||
lockPaneToSecondary = true
|
||||
setFocusedPane(ThreePaneScaffoldRole.Secondary)
|
||||
popDetailPane()
|
||||
}
|
||||
}
|
||||
|
||||
private fun popDetailPane() {
|
||||
navigatorScope?.launch {
|
||||
navigator?.let { scaffoldNavigator ->
|
||||
if (scaffoldNavigator.canNavigateBack()) {
|
||||
scaffoldNavigator.navigateBack()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
viewModelScope.launch {
|
||||
internalPaneFocusRequests.emit(ThreePaneScaffoldRole.Secondary)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user