Skip to content

Commit

Permalink
fix: fix exceptions thrown from windowManager (#719)
Browse files Browse the repository at this point in the history
* fix windowManager unimplemented error

* fix scaffold messenger throwing exception

* Revert "fix scaffold messenger throwing exception"

This reverts commit 1c19762.
  • Loading branch information
ErBWs authored Feb 15, 2025
1 parent b4325e0 commit 37fb949
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
6 changes: 4 additions & 2 deletions lib/app_widget.dart
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,10 @@ class _AppWidgetState extends State<AppWidget>
}

void setPreventClose() async {
await windowManager.setPreventClose(true);
setState(() {});
if (Utils.isDesktop()) {
await windowManager.setPreventClose(true);
setState(() {});
}
}

@override
Expand Down
4 changes: 3 additions & 1 deletion lib/pages/video/video_controller.dart
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,9 @@ abstract class _VideoPageController with Store {
}

void isDesktopFullscreen() async {
isFullscreen = await windowManager.isFullScreen();
if (Utils.isDesktop()) {
isFullscreen = await windowManager.isFullScreen();
}
}

void handleOnEnterFullScreen() async {
Expand Down

0 comments on commit 37fb949

Please sign in to comment.