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

Commit ba850b5a authored by Caitlin Shkuratov's avatar Caitlin Shkuratov
Browse files

[SB][Chips] Refactor OngoingActivityChipModel to be less nested.

Instead of having OngoingActivityChipModel.Active have 5 different
sub-classes for the 5 different types of chips, we can have every chip
be an instance of OngoingActivityChipModel.Active. Then we add a new
field to `Active` called `content`, and this `content` field has the 5
different sub-types.

Advantages:
 - Don't need to remember to re-fill in each parameter depending on the
   type of content you want to show (see simplification in
   NotifChipsViewModel and the removal of the TODO in
   OngoingActivityChipsViewModel)

 - In a future CL: The `ChipContent` Composable can just take in the
   `content` parameter instead of the full model.

Bug: 406754016
Bug: 364653005
Flag: EXEMPT refactor
Test: smoke test of all types of chips with ui_rich_ongoing, root_mod,
and chips_mod all enabled
Test: smoke test of all types of chip with ui_rich_ongoing, root_mod,
and chips_mod all disabled
Test: atest everything in statusbar.chips directory
Change-Id: If9c0fb451c8da6867ed240a27b14e0c89435cf1a

Change-Id: Ic4027ea2b705f221b6431c0d72705b625f7559e5
parent c05a93cb
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment