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

Commit cecf6cd6 authored by Kshitij's avatar Kshitij Committed by Mohammed Althaf T
Browse files

fix!: Use iconSizePx to render part of widget, to determine real height



- Fixes widgets not laid out on mobile

Signed-off-by: default avatarSaalim Quadri <danascape@gmail.com>
parent 023c295d
Loading
Loading
Loading
Loading
+5 −1
Original line number Diff line number Diff line
@@ -615,7 +615,11 @@ class WidgetContainer(context: Context, attrs: AttributeSet?) :

                    for (i in 0 until adapter.itemCount) {
                        if (layoutManager.spanCount == 1) {
                            totalHeight[0] += adapter.getWidgets()[i].measuredHeight
                            totalHeight[0] +=
                                adapter
                                    .getWidgets()[i]
                                    .measuredHeight
                                    .coerceAtLeast(launcher.deviceProfile.iconSizePx)
                            continue
                        }
                        val viewHolder = recyclerView.findViewHolderForAdapterPosition(i)