Loading packages/SystemUI/src/com/android/systemui/qs/composefragment/QSFragmentCompose.kt +19 −5 Original line number Diff line number Diff line Loading @@ -348,12 +348,26 @@ constructor( ) LaunchedEffect(Unit) { launch { synchronizeQsState( sceneState, viewModel.containerViewModel.editModeViewModel.isEditing, snapshotFlow { viewModel.expansionState }.map { it.progress }, ) } if (alwaysCompose) { // Normally, the Edit mode will stop if the composable leaves, but if the shade // is closed, because we are always composed, we don't stop edit mode. launch { snapshotFlow { viewModel.isQsVisibleAndAnyShadeExpanded } .collect { if (!it) { viewModel.containerViewModel.editModeViewModel.stopEditing() } } } } } SceneTransitionLayout(state = sceneState, modifier = Modifier.fillMaxSize()) { scene(QuickSettings, alwaysCompose = alwaysCompose) { Loading Loading
packages/SystemUI/src/com/android/systemui/qs/composefragment/QSFragmentCompose.kt +19 −5 Original line number Diff line number Diff line Loading @@ -348,12 +348,26 @@ constructor( ) LaunchedEffect(Unit) { launch { synchronizeQsState( sceneState, viewModel.containerViewModel.editModeViewModel.isEditing, snapshotFlow { viewModel.expansionState }.map { it.progress }, ) } if (alwaysCompose) { // Normally, the Edit mode will stop if the composable leaves, but if the shade // is closed, because we are always composed, we don't stop edit mode. launch { snapshotFlow { viewModel.isQsVisibleAndAnyShadeExpanded } .collect { if (!it) { viewModel.containerViewModel.editModeViewModel.stopEditing() } } } } } SceneTransitionLayout(state = sceneState, modifier = Modifier.fillMaxSize()) { scene(QuickSettings, alwaysCompose = alwaysCompose) { Loading