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

Commit aee7f264 authored by Danny Burakov's avatar Danny Burakov Committed by Android (Google) Code Review
Browse files

Merge "[flexiglass] Remove unnecessary with(LocalDensity.current) block." into main

parents 6125441d afddbf5c
Loading
Loading
Loading
Loading
+1 −8
Original line number Diff line number Diff line
@@ -20,7 +20,6 @@ import androidx.compose.foundation.basicMarquee
import androidx.compose.foundation.layout.Arrangement
import androidx.compose.foundation.layout.Row
import androidx.compose.foundation.layout.height
import androidx.compose.material3.ExperimentalMaterial3ExpressiveApi
import androidx.compose.material3.Text
import androidx.compose.runtime.Composable
import androidx.compose.ui.Alignment
@@ -33,7 +32,6 @@ import com.android.systemui.lifecycle.rememberViewModel
import com.android.systemui.statusbar.phone.domain.interactor.IsAreaDark
import com.android.systemui.statusbar.pipeline.battery.ui.viewmodel.BatteryViewModel

@OptIn(ExperimentalMaterial3ExpressiveApi::class)
@Composable
fun BatteryWithEstimate(
    viewModelFactory: BatteryViewModel.Factory,
@@ -51,11 +49,6 @@ fun BatteryWithEstimate(
            BatteryViewModel.getStatusBarBatteryHeight(LocalContext.current).toDp()
        }

    val textStyle =
        with(LocalDensity.current) {
            BatteryViewModel.getStatusBarBatteryTextStyle(LocalContext.current)
        }

    Row(
        modifier = modifier,
        horizontalArrangement = Arrangement.spacedBy(4.dp),
@@ -73,7 +66,7 @@ fun BatteryWithEstimate(
                Text(
                    text = it,
                    color = textColor,
                    style = textStyle,
                    style = BatteryViewModel.getStatusBarBatteryTextStyle(LocalContext.current),
                    maxLines = 1,
                    modifier = Modifier.basicMarquee(iterations = 1),
                )