From 8b00421532bca76e81a87bcf88ab0c7828fc93a3 Mon Sep 17 00:00:00 2001 From: atavism Date: Thu, 3 Oct 2024 13:00:11 -0700 Subject: [PATCH] don't call _initWindowManager in addPostFrameCallback --- lib/features/home/home.dart | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lib/features/home/home.dart b/lib/features/home/home.dart index 26ed3da90..fadcdd375 100644 --- a/lib/features/home/home.dart +++ b/lib/features/home/home.dart @@ -35,6 +35,9 @@ class _HomePageState extends State with TrayListener, WindowListener { @override void initState() { super.initState(); + if (isDesktop()) { + _initWindowManager(); + } WidgetsBinding.instance.addPostFrameCallback((timeStamp) { _startupSequence(); }); @@ -47,7 +50,6 @@ class _HomePageState extends State with TrayListener, WindowListener { } // This is a desktop device _setupTrayManager(); - _initWindowManager(); } void channelListener() { @@ -172,7 +174,6 @@ class _HomePageState extends State with TrayListener, WindowListener { await windowManager.show(); await windowManager.focus(); }); - setState(() {}); } @override