Skip to content

Commit

Permalink
fix(Last Push Payload): when you open the app, reload the latest data…
Browse files Browse the repository at this point in the history
… from the push notification (#42)

* Removing checkRecentNotification on setNotificationOpenedHandler

* Check RecentNotificationt test fix
>
>
Co-authored-by: Gabriel Azevedo <[email protected]>
  • Loading branch information
Santi92 authored May 2, 2022
1 parent 59c0275 commit 00b488d
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 2 deletions.
1 change: 0 additions & 1 deletion lib/iterable_flutter.dart
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,6 @@ class IterableFlutter {
// ignore: use_setters_to_change_properties
static void setNotificationOpenedHandler(OpenedNotificationHandler handler) {
_onOpenedNotification = handler;
checkRecentNotification();
}

static Future<dynamic> nativeMethodCallHandler(MethodCall methodCall) async {
Expand Down
2 changes: 1 addition & 1 deletion test/iterable_flutter_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ void main() {
});

test('checkRecentNotification', () async {
IterableFlutter.setNotificationOpenedHandler((openedResultMap) {});
await IterableFlutter.checkRecentNotification();
expect(calledMethod, <Matcher>[
isMethodCall('checkRecentNotification', arguments: null),
]);
Expand Down

0 comments on commit 00b488d

Please sign in to comment.