Commit Graph

5 Commits

Author SHA1 Message Date
Emily Chuang
18a99faaf1 Add DiffCallback to handle Contextual Cards update.
Use DiffCallback in ContextualCardsAdapter to only update items that
are changed instead of touching those unchanged ones.

Also fix a bug where ConditionContexualCardCard#onStart is incorrectly
skipped.

Fixes: 112245748
Bug: 118165942
Test: robotests
Change-Id: I7989d621764fe40a3fceb8c9f40baced840818ba
2018-10-22 15:38:30 -07:00
Fan Zhang
5d7ebbf963 Refresh conditions only when it changes.
- Instead of force refresh when user tap action button, we not wait
  until state changes for each conditional cards.

Test: robotests
Change-Id: I2eca59a06b8cb332b7b99f017baefb3d5b53234b
2018-08-24 09:25:57 -07:00
Fan Zhang
a4b14bd9f1 Remove condition manager v1 code.
Change-Id: I866c1f7c493c6080ccf766ecfc8e6b00dafeecd9
Fixes: 112485407
Test: robotests
2018-08-21 13:21:14 -07:00
Fan Zhang
48ef7e5b6f Move ConditionListener to a top level class.
So we can use it later for furture refactoring.

Bug: 112485407
Test: rebuild
Change-Id: Ic3994464cfaff67a56f2d383490860a81f436fbd
2018-08-13 17:31:08 -07:00
Fan Zhang
ce1b61a146 Move conditional stuff from dashboard/ to homepage package.
dashboard package is not a real place for homepage stuff. Putting
Conditionals here makes it easier to refactor it for new homepage in the
future

Bug: 110405144
Bug: 112485407
Test: robotests
Change-Id: If433aeac8766124f0f4f6e5786b93ac1372bb745
2018-08-11 00:28:31 +00:00