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

Commit 7bb541b6 authored by Daniel Nishi's avatar Daniel Nishi
Browse files

Fix a bug where storage settings flickers.

The bug resulted from the fact that turning off loading while loading is
turned off causes the loading finishing animation to flicker. By only
turning it off when it is on, we ensure it works.

Change-Id: Ia31bf3e9aa90726e39b6bc7189d175c38fb51e5a
Fixes: 38045492
Test: Manual
parent 154824f1
Loading
Loading
Loading
Loading
+5 −1
Original line number Diff line number Diff line
@@ -133,8 +133,12 @@ public class StorageDashboardFragment extends DashboardFragment

        mPreferenceController.onLoadFinished(mAppsResult.get(UserHandle.myUserId()));
        updateSecondaryUserControllers(mSecondaryUsers, mAppsResult);

        // setLoading always causes a flicker, so let's avoid doing it.
        if (getView().findViewById(R.id.loading_container).getVisibility() == View.VISIBLE) {
            setLoading(false, true);
        }
    }

    @Override
    public int getMetricsCategory() {