diff --git a/ios/Podfile.lock b/ios/Podfile.lock index b07c28de..c4c386c2 100644 --- a/ios/Podfile.lock +++ b/ios/Podfile.lock @@ -136,6 +136,8 @@ PODS: - OrderedSet (~> 6.0.3) - flutter_keyboard_visibility (0.0.1): - Flutter + - flutter_local_notifications (0.0.1): + - Flutter - flutter_native_splash (2.4.3): - Flutter - flutter_platform_alert (0.0.1): @@ -314,6 +316,7 @@ DEPENDENCIES: - flutter_app_update (from `.symlinks/plugins/flutter_app_update/ios`) - flutter_inappwebview_ios (from `.symlinks/plugins/flutter_inappwebview_ios/ios`) - flutter_keyboard_visibility (from `.symlinks/plugins/flutter_keyboard_visibility/ios`) + - flutter_local_notifications (from `.symlinks/plugins/flutter_local_notifications/ios`) - flutter_native_splash (from `.symlinks/plugins/flutter_native_splash/ios`) - flutter_platform_alert (from `.symlinks/plugins/flutter_platform_alert/ios`) - flutter_secure_storage (from `.symlinks/plugins/flutter_secure_storage/ios`) @@ -402,6 +405,8 @@ EXTERNAL SOURCES: :path: ".symlinks/plugins/flutter_inappwebview_ios/ios" flutter_keyboard_visibility: :path: ".symlinks/plugins/flutter_keyboard_visibility/ios" + flutter_local_notifications: + :path: ".symlinks/plugins/flutter_local_notifications/ios" flutter_native_splash: :path: ".symlinks/plugins/flutter_native_splash/ios" flutter_platform_alert: @@ -488,6 +493,7 @@ SPEC CHECKSUMS: flutter_app_update: 816fdb2e30e4832a7c45e3f108d391c42ef040a9 flutter_inappwebview_ios: b89ba3482b96fb25e00c967aae065701b66e9b99 flutter_keyboard_visibility: 4625131e43015dbbe759d9b20daaf77e0e3f6619 + flutter_local_notifications: a5a732f069baa862e728d839dd2ebb904737effb flutter_native_splash: c32d145d68aeda5502d5f543ee38c192065986cf flutter_platform_alert: bf3b5fcd4ac14bd637e20527e9c471633071afd3 flutter_secure_storage: 1ed9476fba7e7a782b22888f956cce43e2c62f13 diff --git a/lib/screens/tray_manager.dart b/lib/screens/tray_manager.dart index a9191b1e..ef38de5f 100644 --- a/lib/screens/tray_manager.dart +++ b/lib/screens/tray_manager.dart @@ -48,7 +48,11 @@ class TrayService { void handleAction(MenuItem item) { switch (item.key) { case 'show_window': - appWindow.show(); + if (appWindow.isVisible) { + appWindow.restore(); + } else { + appWindow.show(); + } break; case 'exit_app': appWindow.close(); diff --git a/lib/widgets/app_wrapper.dart b/lib/widgets/app_wrapper.dart index 5a8b84e4..9bc0d390 100644 --- a/lib/widgets/app_wrapper.dart +++ b/lib/widgets/app_wrapper.dart @@ -63,7 +63,11 @@ class AppWrapper extends HookConsumerWidget with TrayListener { } void _trayIconPrimaryAction() { - appWindow.show(); + if (appWindow.isVisible) { + appWindow.restore(); + } else { + appWindow.show(); + } } void _trayIconSecondaryAction() { diff --git a/pubspec.yaml b/pubspec.yaml index dbdf4ac8..2bcb0377 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -16,7 +16,7 @@ publish_to: "none" # Remove this line if you wish to publish to pub.dev # https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html # In Windows, build-name is used as the major, minor, and patch parts # of the product and file versions while build-number is used as the build suffix. -version: 3.2.0+129 +version: 3.2.0+130 environment: sdk: ^3.7.2