Remove dividers when expanding groups.

The logic needed a tweak because the HideDividersDuringExpand config wasn't being applied to the user-locked-expansion.

Fixes: 191187506
Test: expand and collapse groups a bunch
Change-Id: Ifc111233a041c14f58f921db55fd06f2040e1316
This commit is contained in:
Jeff DeCew
2021-06-17 12:04:08 -04:00
parent 3ab0caf4c8
commit a2f705e191
2 changed files with 9 additions and 9 deletions

View File

@@ -430,7 +430,7 @@
<!-- Whether or not the dividing lines should be shown when the container is expanding and
collapsing. If this value is true, then the lines will only show when the container has
been completely expanded. -->
<bool name="config_hideDividersDuringExpand">false</bool>
<bool name="config_hideDividersDuringExpand">true</bool>
<!-- Whether or not child notifications that are part of a group will have shadows. -->
<bool name="config_enableShadowOnChildNotifications">true</bool>

View File

@@ -710,10 +710,10 @@ public class NotificationChildrenContainer extends ViewGroup {
if (mUserLocked) {
expandFraction = getGroupExpandFraction();
}
final boolean dividersVisible = mUserLocked && !showingAsLowPriority()
|| (mChildrenExpanded && mShowDividersWhenExpanded)
|| (mContainingNotification.isGroupExpansionChanging()
&& !mHideDividersDuringExpand);
final boolean isExpanding = !showingAsLowPriority()
&& (mUserLocked || mContainingNotification.isGroupExpansionChanging());
final boolean dividersVisible = (mChildrenExpanded && mShowDividersWhenExpanded)
|| (isExpanding && !mHideDividersDuringExpand);
for (int i = 0; i < childCount; i++) {
ExpandableNotificationRow child = mAttachedChildren.get(i);
ExpandableViewState viewState = child.getViewState();
@@ -789,10 +789,10 @@ public class NotificationChildrenContainer extends ViewGroup {
int childCount = mAttachedChildren.size();
ViewState tmpState = new ViewState();
float expandFraction = getGroupExpandFraction();
final boolean dividersVisible = mUserLocked && !showingAsLowPriority()
|| (mChildrenExpanded && mShowDividersWhenExpanded)
|| (mContainingNotification.isGroupExpansionChanging()
&& !mHideDividersDuringExpand);
final boolean isExpanding = !showingAsLowPriority()
&& (mUserLocked || mContainingNotification.isGroupExpansionChanging());
final boolean dividersVisible = (mChildrenExpanded && mShowDividersWhenExpanded)
|| (isExpanding && !mHideDividersDuringExpand);
for (int i = childCount - 1; i >= 0; i--) {
ExpandableNotificationRow child = mAttachedChildren.get(i);
ExpandableViewState viewState = child.getViewState();