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

Commit db7b9016 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

Change-Id: Id99ebe11bd8e4ff83a0e310dfcc9a251ec831352
parents 04bfe8f9 6813206e
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--