From 3e4c7a1133311d45bff28a3ff0a6aa75ce984b50 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 f2eec8b3505..3609ca8f4f8 100644 --- a/lib/notifications.dart +++ b/lib/notifications.dart @@ -170,10 +170,6 @@ class NotificationDisplayManager { color: kZulipBrandColor, icon: 'zulip_notification', // TODO vary for debug // TODO 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 6146e9b80d9..86441b62e71 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 a9d3f8836b8..8144ec2214a 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -63,7 +63,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: