Build a way to decide card width
Slice cards in contextual homepage are shown as half card or full card. We will use Category field of ContextualCard to decide card width. In this CL, also fixed the problem of not showing full card after a consecutive suggestion card dismissal. Bug: 119655434 Bug: 121315057 Test: visual, robotest Change-Id: I3243b9db21b8f288cab88238b20d7d50a2a20d46
This commit is contained in:
@@ -107,12 +107,12 @@ public class ContextualCardLoader extends AsyncLoaderCompat<List<ContextualCard>
|
||||
}
|
||||
}
|
||||
}
|
||||
return getFinalDisplayableCards(result);
|
||||
return getDisplayableCards(result);
|
||||
}
|
||||
|
||||
// Get final displayed cards and log what cards will be displayed/hidden
|
||||
@VisibleForTesting
|
||||
List<ContextualCard> getFinalDisplayableCards(List<ContextualCard> candidates) {
|
||||
List<ContextualCard> getDisplayableCards(List<ContextualCard> candidates) {
|
||||
final List<ContextualCard> eligibleCards = filterEligibleCards(candidates);
|
||||
final List<ContextualCard> visibleCards = new ArrayList<>();
|
||||
final List<ContextualCard> hiddenCards = new ArrayList<>();
|
||||
|
Reference in New Issue
Block a user