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

Skip to content
Commit 359ac14d authored by Alex Chau's avatar Alex Chau
Browse files

Fix various animation issues when total width of grid tasks < screen width

Bug fixes:
- Unusual long scroll when only focus task left after split select
- Animation jump when tasks cannot fit screen width after dismiss or split select

To fix the above issue, generified calculations when total grid task width < screen width:
- Removed some special case handling when only focus task left (getSnapToFocusedTaskScrollDiff), and instead replace with generic logic that calculation that extra scroll position (shortTotalCompensation) needed when long row width is smaller than the grid size
- Fixed snapped task grid translation calculation to account for shortTotalCompensation
- Last task scroll calculation should account for shortTotalCompensation too
- Calculate the expected shortTotalCompensation after dismiss, and use that to adjust the close gap between clearAll distance

splitScrollOffset that we applied during split screen does not work well when shortTotalCompensation != 0. splitScrollOffset is not a good solution to handle split placeholder, as it allow tasks to scroll to weird position. I removed splitScrollOffset completely, and only apply split translation when split placeholder covers the tasks:
- Removed splitScrollOffset on TaskView/ClearAll, so scroll position of TaskView will not change while in split to splify things.
- When split placehodler will cover task's natural position (taskSize) in overview grid, apply split translation on all tasks similar to handheld
- Removed isSplitPlaceholderFirstInGrid/isSplitPlaceholderLastInGrid adjustments

Bug: 257952455
Test: Enter overview from home
Test: Enter overview from app, with variations that quick switch and enter
Test: Dismiss task from different position
Test: Split select task from different position
Test: Repeat with/without GRID_ONLY_OVERVIEW flag
Test: Repeat with handheld
Change-Id: I7689b5384845f03491041b6d910835c9ac4fab08
parent 92c93bdd
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment