perf: isolate focus and media rebuilds

This commit is contained in:
edde746
2026-07-12 19:00:11 +02:00
parent a561777456
commit 2101f1d7f0
28 changed files with 771 additions and 499 deletions
+3 -3
View File
@@ -103,9 +103,9 @@ class _ProfileSessionScreenState extends State<ProfileSessionScreen> {
@override
Widget build(BuildContext context) {
return Consumer<ActiveProfileProvider>(
builder: (context, activeProfile, _) {
final activeId = activeProfile.activeId;
return Selector<ActiveProfileProvider, String?>(
selector: (_, activeProfile) => activeProfile.activeId,
builder: (context, activeId, _) {
_onSessionProfileChanged(activeId);
final initialPromptHandled = widget.initialPromptHandled || _hasBuiltSession;
return KeyedSubtree(