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

Commit 58abc8b0 authored by minch's avatar minch Committed by Min Chen
Browse files

Introduce `mTaskViewCount` inside the RecentsView

Add a member property `mTaskViewCount` inside the RecentsView to track
the number of TaskView inside it. Its value will be increased
`onViewAdded` and decreased `onViewRemoved`.
- Then `getTaskViewCount()` can just return this variable directly.
- Invalidate the `PagedView.mPageScrolls` on a view addition and
  removal util they have been updated on next `onLayout`. This is done
  to guarantee that `mOnPageScrollsInitializedCallbacks` is run with
  up to date `mPageScrolls`.

Flag: EXEMPT as no functionality changes
Bug: 379942019
Test: Tested on Tangor, ensure `mTaskViewCount` is correct in the
      following scenarios:
      1. Adding more tasks and enter overview
      2. Dismissing one and more tasks
      3. Dismissing all tasks
Change-Id: I32407e77dd2a9b3d8200efc334c1eadea1336b31
parent b0ce1503
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