Skip to content

Commit

Permalink
wip deps use my forked flutter_local_notifications, with collision fix
Browse files Browse the repository at this point in the history
(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.
  • Loading branch information
gnprice committed Oct 19, 2023
1 parent d5b64c6 commit 64d24eb
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 8 deletions.
4 changes: 0 additions & 4 deletions lib/notifications.dart
Original file line number Diff line number Diff line change
Expand Up @@ -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
)));
}

Expand Down
8 changes: 5 additions & 3 deletions pubspec.lock
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
6 changes: 5 additions & 1 deletion pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit 64d24eb

Please sign in to comment.