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

Commit 692d2109 authored by Samuel Fufa's avatar Samuel Fufa
Browse files

invalidate itemDecoration on predictedRow focus draw

Change-Id: I66c731f00ae1c1292c51ff281957f05fd2d70dfa
parent 8d5b1180
Loading
Loading
Loading
Loading
+2 −5
Original line number Diff line number Diff line
@@ -148,10 +148,6 @@ public class PredictionRowView extends LinearLayout implements

    private void updateVisibility() {
        setVisibility(mPredictionsEnabled ? VISIBLE : GONE);
        if (FeatureFlags.ENABLE_DEVICE_SEARCH.get() && mLauncher.getAppsView() != null
                && mLauncher.getAppsView().getActiveRecyclerView() != null) {
            mLauncher.getAppsView().invalidate();
        }
    }

    @Override
@@ -170,6 +166,7 @@ public class PredictionRowView extends LinearLayout implements
            }
            mDecorationHandler.onDraw(canvas);
            mDecorationHandler.onFocusDraw(canvas, getFocusedChild());
            mLauncher.getAppsView().getActiveRecyclerView().invalidateItemDecorations();
        }
        mFocusHelper.draw(canvas);
        super.dispatchDraw(canvas);
@@ -184,7 +181,7 @@ public class PredictionRowView extends LinearLayout implements

    @Override
    public boolean shouldDraw() {
        return getVisibility() != GONE;
        return getVisibility() == VISIBLE;
    }

    @Override
+1 −1
Original line number Diff line number Diff line
@@ -200,7 +200,7 @@ public class FloatingHeaderView extends LinearLayout implements
    public View getFocusedChild() {
        if (FeatureFlags.ENABLE_DEVICE_SEARCH.get()) {
            for (FloatingHeaderRow row : mAllRows) {
                if (row.hasVisibleContent()) {
                if (row.hasVisibleContent() && row.shouldDraw()) {
                    return row.getFocusedChild();
                }
            }