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

Commit 38d429f4 authored by Selim Cinek's avatar Selim Cinek
Browse files

Handled expandability and swiping while guts are exposed

Also fixed a bug where the wrong guts were selected with groups.

Change-Id: I3677ce549b2a90e2dc225470cff4e2548ddca81a
Fixes: 29046865
parent ddf1b399
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -868,7 +868,8 @@ public class NotificationStackScrollLayout extends ViewGroup
            ExpandableNotificationRow row = (ExpandableNotificationRow) child;
            ExpandableNotificationRow parent = row.getNotificationParent();
            if (parent != null && parent.areChildrenExpanded()
                    && (mGearExposedView == parent
                    && (parent.areGutsExposed()
                        || mGearExposedView == parent
                        || (parent.getNotificationChildren().size() == 1
                                && parent.isClearable()))) {
                // In this case the group is expanded and showing the gear for the
@@ -956,6 +957,7 @@ public class NotificationStackScrollLayout extends ViewGroup
    public boolean canChildBeExpanded(View v) {
        return v instanceof ExpandableNotificationRow
                && ((ExpandableNotificationRow) v).isExpandable()
                && !((ExpandableNotificationRow) v).areGutsExposed()
                && (mIsExpanded || !((ExpandableNotificationRow) v).isPinned());
    }

+6 −0
Original line number Diff line number Diff line
@@ -171,6 +171,12 @@ public class StackScrollAlgorithm {
    }

    public static boolean canChildBeDismissed(View v) {
        if (v instanceof ExpandableNotificationRow) {
            ExpandableNotificationRow row = (ExpandableNotificationRow) v;
            if (row.areGutsExposed()) {
                return false;
            }
        }
        final View veto = v.findViewById(R.id.veto);
        return (veto != null && veto.getVisibility() != View.GONE);
    }