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

Commit 6300632a authored by Lucas Silva's avatar Lucas Silva
Browse files

Increase breakpoint for 3 columns on glanceable hub

This ensures we only use 2 columns on foldable form factors.

Fixes: 394489402
Test: flashed and verified locally
Flag: EXEMPT bugfix
Change-Id: I1a94ed9104e2d0bc551c555b6af2a41a42364af4
parent b1d4e2ef
Loading
Loading
Loading
Loading
+1 −3
Original line number Diff line number Diff line
@@ -50,7 +50,6 @@ import androidx.compose.ui.unit.times
import androidx.window.layout.WindowMetricsCalculator
import com.android.systemui.communal.util.WindowSizeUtils.COMPACT_HEIGHT
import com.android.systemui.communal.util.WindowSizeUtils.COMPACT_WIDTH
import com.android.systemui.communal.util.WindowSizeUtils.MEDIUM_WIDTH

/**
 * Renders a responsive [LazyHorizontalGrid] with dynamic columns and rows. Each cell will maintain
@@ -267,9 +266,8 @@ fun calculateWindowSize(): DpSize {
}

private fun calculateNumCellsWidth(width: Dp) =
    // See https://developer.android.com/develop/ui/views/layout/use-window-size-classes
    when {
        width >= MEDIUM_WIDTH -> 3
        width >= 900.dp -> 3
        width >= COMPACT_WIDTH -> 2
        else -> 1
    }