From d51d399567d2c0f012565a7e2bee66f577ae17f0 Mon Sep 17 00:00:00 2001 From: Greg Price Date: Mon, 10 Jul 2023 17:54:13 -0700 Subject: [PATCH] wip deps use my forked flutter_local_notifications, with collision fix (The alternative workaround would be to pass distinct notif "id" integers. These could be a hash of the tag... but if it's merely hashCode, there'd be risk of collisions.) I feel like the right answer here is that the plugin should be a much thinner layer, much closer to just exposing the underlying API. (Also it can use Pigeon to simplify the transport boilerplate.) Then our Dart code can express what we want. --- lib/notifications.dart | 4 ---- pubspec.lock | 8 +++++--- pubspec.yaml | 6 +++++- 3 files changed, 10 insertions(+), 8 deletions(-) diff --git a/lib/notifications.dart b/lib/notifications.dart index da52d70b3d..e987ced1d4 100644 --- a/lib/notifications.dart +++ b/lib/notifications.dart @@ -203,10 +203,6 @@ class NotificationDisplayManager { color: kZulipBrandColor, icon: 'zulip_notification', // TODO vary for debug // TODO(#128) inbox-style - - // TODO plugin sets PendingIntent.FLAG_UPDATE_CURRENT; is that OK? - // TODO plugin's setContentIntent doesn't set our Intent flags; is that OK? - // TODO all notifs lead to convo of latest notif, because plugin's setContentIntent doesn't avoid dupe URLs ))); } diff --git a/pubspec.lock b/pubspec.lock index de6f02c882..fabb9ea4bd 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -425,9 +425,11 @@ packages: flutter_local_notifications: dependency: "direct main" description: - path: "../local-notifications/flutter_local_notifications" - relative: true - source: path + path: flutter_local_notifications + ref: "5a0239b36" + resolved-ref: "5a0239b36c1f4e6a89d079bfbf96bb533a8179d9" + url: "https://github.com/gnprice/flutter_local_notifications" + source: git version: "15.1.0+1" flutter_local_notifications_linux: dependency: transitive diff --git a/pubspec.yaml b/pubspec.yaml index f737e0d034..27e767ecf4 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -64,7 +64,11 @@ dependencies: firebase_core: ^2.14.0 flutter_local_notifications_platform_interface: ^7.0.0+1 flutter_local_notifications: - path: ../local-notifications/flutter_local_notifications + # path: ../local-notifications/flutter_local_notifications + git: + url: https://github.com/gnprice/flutter_local_notifications + ref: 5a0239b36 + path: flutter_local_notifications/ dev_dependencies: flutter_test: