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

Commit 7b8c0830 authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Automerger Merge Worker
Browse files

Merge "Fix calculation of empty spaces" into rvc-dev am: 6813206e am: 2248146d

Change-Id: Ie1e521c05d2367409a6fcf28f995d701b7ec8227
parents 65631026 2248146d
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -429,7 +429,8 @@ class ControlsUiControllerImpl @Inject constructor (
        }

        // add spacers if necessary to keep control size consistent
        var spacersToAdd = maxColumns - (selectedStructure.controls.size % maxColumns)
        val mod = selectedStructure.controls.size % maxColumns
        var spacersToAdd = if (mod == 0) 0 else maxColumns - mod
        while (spacersToAdd > 0) {
            lastRow.addView(Space(context), LinearLayout.LayoutParams(0, 0, 1f))
            spacersToAdd--