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

Commit 43e93f0a authored by Johannes Gallmann's avatar Johannes Gallmann
Browse files

Fix notification expand-collapse crossfade issue

Since the user can drag back and forth, the fadeOut function should not return early, when the view's alpha is already 0. It should allow going away from 0 again. This check was introduced by ag/21061907.

Bug: 272263243
Test: Manual: i.e. expanding and collapsing notifications by dragging manually
Change-Id: If36327c6db4e440e0d95f51c18035a78226796a0
parent a55730c9
Loading
Loading
Loading
Loading
+0 −6
Original line number Diff line number Diff line
@@ -77,12 +77,6 @@ public class CrossFadeHelper {
     */
    public static void fadeOut(View view, float fadeOutAmount, boolean remap) {
        view.animate().cancel();

        // Don't fade out if already not visible.
        if (view.getAlpha() == 0.0f) {
            return;
        }

        if (fadeOutAmount == 1.0f && view.getVisibility() != View.GONE) {
            view.setVisibility(View.INVISIBLE);
        } else if (view.getVisibility() == View.INVISIBLE) {