Prevent usage of bottom row for widgets

This commit is contained in:
Ensar Sarajčić 2023-07-17 11:59:56 +02:00
parent 5d642eefe2
commit 822b373a72

View file

@ -239,7 +239,7 @@ class WidgetsFragment(context: Context, attributeSet: AttributeSet) : MyFragment
}
override fun onWidgetLongPressed(appWidget: AppWidget) {
if (appWidget.heightCells > context.config.homeRowCount || appWidget.widthCells > context.config.homeColumnCount) {
if (appWidget.heightCells > context.config.homeRowCount - 1 || appWidget.widthCells > context.config.homeColumnCount) {
context.toast("Widget is too big for current home screen size")
return
}