fix: suspend hero animation when not visible

This commit is contained in:
edde746
2026-02-05 10:57:29 +01:00
parent 5873914baa
commit 3d3c8641ed
3 changed files with 49 additions and 3 deletions
+8
View File
@@ -0,0 +1,8 @@
/// Mixin for screens that need to react to tab visibility changes.
///
/// Used by MainScreen to pause expensive work (e.g. animation tickers)
/// when the screen's tab is no longer visible, and resume it when shown again.
mixin TabVisibilityAware {
void onTabShown();
void onTabHidden();
}