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

Commit 0edebbed authored by Anton Potapov's avatar Anton Potapov
Browse files

Remove animation to prevent message from jumping

Flag: aconfig new_volume_panel TEAMFOOD
Test: manual on the phone
Bug: 329627343
Change-Id: Ie880b995fe7dd5ec86b92c1d81fe82218e00bf07
parent 77476dd8
Loading
Loading
Loading
Loading
+3 −11
Original line number Diff line number Diff line
@@ -16,11 +16,7 @@

package com.android.systemui.volume.panel.component.volume.ui.composable

import androidx.compose.animation.AnimatedVisibility
import androidx.compose.animation.animateContentSize
import androidx.compose.animation.core.animateFloatAsState
import androidx.compose.animation.slideInVertically
import androidx.compose.animation.slideOutVertically
import androidx.compose.foundation.basicMarquee
import androidx.compose.foundation.layout.Column
import androidx.compose.foundation.layout.size
@@ -107,7 +103,7 @@ fun VolumeSlider(
        },
        colors = sliderColors,
        label = {
            Column(modifier = Modifier.animateContentSize()) {
            Column(modifier = Modifier) {
                Text(
                    modifier = Modifier.basicMarquee(),
                    text = state.label,
@@ -116,12 +112,8 @@ fun VolumeSlider(
                    maxLines = 1,
                )

                if (!state.isEnabled) {
                    state.disabledMessage?.let { message ->
                    AnimatedVisibility(
                        !state.isEnabled,
                        enter = slideInVertically { it },
                        exit = slideOutVertically { it },
                    ) {
                        Text(
                            modifier = Modifier.basicMarquee(),
                            text = message,