mirror of
https://github.com/LawnchairLauncher/lawnchair.git
synced 2026-02-20 19:38:21 +00:00
Tighten up loading of visible task data
- Certain animations can run after the launcher state has changed, triggering loading of task data even when the overview state is not visible. Only allow re/loading of this data when we are in the overview state. Bug: 76162466 Change-Id: Ie1f492ef712ea4aa2db6f2e1bc7ba4390742875b
This commit is contained in:
@@ -582,6 +582,11 @@ public abstract class RecentsView<T extends BaseActivity> extends PagedView impl
|
||||
* and unloads the associated task data for tasks that are no longer visible.
|
||||
*/
|
||||
public void loadVisibleTaskData() {
|
||||
if (!mOverviewStateEnabled) {
|
||||
// Skip loading visible task data if we've already left the overview state
|
||||
return;
|
||||
}
|
||||
|
||||
RecentsTaskLoader loader = mModel.getRecentsTaskLoader();
|
||||
int centerPageIndex = getPageNearestToCenterOfScreen();
|
||||
int lower = Math.max(0, centerPageIndex - 2);
|
||||
|
||||
Reference in New Issue
Block a user