diff --git a/lib/main.dart b/lib/main.dart index b2c9e897..0eb5c049 100644 --- a/lib/main.dart +++ b/lib/main.dart @@ -241,6 +241,9 @@ class FlwtchState extends State with WindowListener { transitionDuration: Duration(milliseconds: 200), ), ); + // On Gnome follows up a clicked notification with a "Cwtch is ready" notification that takes you to the app. AFAICT just because Gnome is bad + // https://askubuntu.com/questions/1286206/how-to-skip-the-is-ready-notification-and-directly-open-apps-in-ubuntu-20-4 + windowManager.focus(); } // using windowManager flutter plugin until proper lifecycle management lands in desktop diff --git a/lib/notification_manager.dart b/lib/notification_manager.dart index 248b3012..56d78250 100644 --- a/lib/notification_manager.dart +++ b/lib/notification_manager.dart @@ -75,7 +75,8 @@ class NotificationPayload { }; } -// FlutterLocalNotificationsPlugin based NotificationManager that handles MacOS and Linux +// FlutterLocalNotificationsPlugin based NotificationManager that handles MacOS and Linux +// TODO: Upgrade from 9.6 to 12.x but there are breaking changes (including for mac) // TODO: Windows support is being worked on, check back and migrate to that too when it lands class NixNotificationManager implements NotificationsManager { late FlutterLocalNotificationsPlugin flutterLocalNotificationsPlugin; diff --git a/pubspec.lock b/pubspec.lock index 26b57056..dcc0d135 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -630,7 +630,7 @@ packages: name: screen_retriever url: "https://pub.dartlang.org" source: hosted - version: "0.1.2" + version: "0.1.4" scrollable_positioned_list: dependency: "direct main" description: @@ -859,7 +859,7 @@ packages: name: window_manager url: "https://pub.dartlang.org" source: hosted - version: "0.2.5" + version: "0.2.8" xdg_directories: dependency: transitive description: diff --git a/pubspec.yaml b/pubspec.yaml index 74981ecc..f026b451 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -41,7 +41,7 @@ dependencies: file_picker: ^4.3.2 file_picker_desktop: ^1.1.1 url_launcher: ^6.0.18 - window_manager: ^0.2.5 + window_manager: ^0.2.8 # notification plugins win_toast: ^0.0.2 flutter_local_notifications: ^9.6.1