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

Commit ce7fb3a8 authored by Sebastián Franco's avatar Sebastián Franco Committed by Automerger Merge Worker
Browse files

Merge "Fix IndexOutOfBoundsException in grid span lookup" into tm-qpr-dev am: b2acb965

parents f8ab32a8 b2acb965
Loading
Loading
Loading
Loading
+5 −1
Original line number Diff line number Diff line
@@ -203,8 +203,12 @@ public class AllAppsGridAdapter<T extends Context & ActivityContext> extends

        @Override
        public int getSpanSize(int position) {
            int viewType = mApps.getAdapterItems().get(position).viewType;
            int totalSpans = mGridLayoutMgr.getSpanCount();
            List<AdapterItem> items = mApps.getAdapterItems();
            if (position >= items.size()) {
                return totalSpans;
            }
            int viewType = items.get(position).viewType;
            if (isIconViewType(viewType)) {
                return totalSpans / mAppsPerRow;
            } else {