Skip to content

Commit

Permalink
don't call _initWindowManager in addPostFrameCallback
Browse files Browse the repository at this point in the history
  • Loading branch information
atavism committed Oct 3, 2024
1 parent 4ceb6cc commit 8b00421
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions lib/features/home/home.dart
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,9 @@ class _HomePageState extends State<HomePage> with TrayListener, WindowListener {
@override
void initState() {
super.initState();
if (isDesktop()) {
_initWindowManager();
}
WidgetsBinding.instance.addPostFrameCallback((timeStamp) {
_startupSequence();
});
Expand All @@ -47,7 +50,6 @@ class _HomePageState extends State<HomePage> with TrayListener, WindowListener {
}
// This is a desktop device
_setupTrayManager();
_initWindowManager();
}

void channelListener() {
Expand Down Expand Up @@ -172,7 +174,6 @@ class _HomePageState extends State<HomePage> with TrayListener, WindowListener {
await windowManager.show();
await windowManager.focus();
});
setState(() {});
}

@override
Expand Down

0 comments on commit 8b00421

Please sign in to comment.