Merging update and modify model callbacks

Instead of the dispatcher specifying the type, the UI checks th diff. This
ensures that the UI is updated correctly in all paths

Bug: 390572144
Flag: EXEMPT refactor
Test: Manually verified folder edit path where these callbacks were getting dispatched

Change-Id: Ib73eed5da87a847753a78453a48ab4fc495c1199
This commit is contained in:
Sunny Goyal committed 2025-04-21 12:31:23 -07:00
1 parent c562b3ce4e
commit 007cfecf5e
14 files changed
+211 -87

No files matched your search

@@ -25,6 +25,7 @@ import android.annotation.SuppressLint;
import android.content.Context;
import android.graphics.Canvas;
import android.graphics.Path;
import android.graphics.Point;
import android.util.ArrayMap;
import android.util.AttributeSet;
import android.util.Log;
@@ -262,12 +263,11 @@ public class FolderPagedView extends PagedView<PageIndicatorDots> implements Cli
icon.setOnFocusChangeListener(mFocusIndicatorHelper);
CellLayoutLayoutParams lp = (CellLayoutLayoutParams) icon.getLayoutParams();
Point pos = mOrganizer.getPosForRank(item.rank);
if (lp == null) {
icon.setLayoutParams(new CellLayoutLayoutParams(
item.cellX, item.cellY, item.spanX, item.spanY));
icon.setLayoutParams(new CellLayoutLayoutParams(pos.x, pos.y, 1, 1));
} else {
lp.setCellX(item.cellX);
lp.setCellY(item.cellY);
lp.setCellXY(pos);
lp.cellHSpan = lp.cellVSpan = 1;
}