Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 644944c2 authored by Jordan Demeulenaere's avatar Jordan Demeulenaere
Browse files

Prevent extensive recompositions of CollapsableQuickSettingsSTL

Bug: 389985793
Test: Manual, recorded traces with fix and noticed that we would not
 recompose CollapsableQuickSettingsSTL every frame anymore.
Flag: com.android.systemui.qs_ui_refactor_compose_fragment
Change-Id: Ie3624363b31b3fe35402f469447d87400a32e397
parent 2acac35d
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -53,6 +53,7 @@ import androidx.compose.runtime.LaunchedEffect
import androidx.compose.runtime.getValue
import androidx.compose.runtime.mutableFloatStateOf
import androidx.compose.runtime.mutableStateOf
import androidx.compose.runtime.remember
import androidx.compose.runtime.setValue
import androidx.compose.runtime.snapshotFlow
import androidx.compose.ui.Alignment
@@ -287,7 +288,7 @@ constructor(
    private fun CollapsableQuickSettingsSTL() {
        val sceneState =
            rememberMutableSceneTransitionLayoutState(
                viewModel.expansionState.toIdleSceneKey(),
                initialScene = remember { viewModel.expansionState.toIdleSceneKey() },
                transitions =
                    transitions {
                        from(QuickQuickSettings, QuickSettings) {