Fix a bug where custom cards are not refresh when removed
When the last custom card for a specific type is removed, onContextualCardUpdated should receive the cardtype info so we can remove it from main data set. - Reverted onContextualCardUpdated method signature back to before - Force ConditionContextualCardController to send an empty list if everything is removed. * Note: the update logic is pretty complicated to handle add/update/remove all together. In the future we should consider spliting the removal logic to simplify this area. Change-Id: Ied688deb693ec33e0017be02cf5c743a754a6e61 Fixes: 115572494 Test: visual
This commit is contained in:
@@ -82,7 +82,7 @@ public class ConditionContextualCardControllerTest {
|
||||
|
||||
mController.onConditionsChanged();
|
||||
|
||||
verify(mController).onDataUpdated(any());
|
||||
verify(mListener).onContextualCardUpdated(any());
|
||||
}
|
||||
|
||||
@Test
|
||||
@@ -94,7 +94,7 @@ public class ConditionContextualCardControllerTest {
|
||||
|
||||
mController.onConditionsChanged();
|
||||
|
||||
verify(mController, never()).onDataUpdated(any());
|
||||
verify(mListener, never()).onContextualCardUpdated(any());
|
||||
}
|
||||
|
||||
private class FakeConditionalCard implements ConditionalCard {
|
||||
|
Reference in New Issue
Block a user