Skip to content

Add the option to clear multiple notifications wit the same tag pattern#13

Open
shiloSaadon wants to merge 4 commits intoWes1324:mainfrom
shiloSaadon:main
Open

Add the option to clear multiple notifications wit the same tag pattern#13
shiloSaadon wants to merge 4 commits intoWes1324:mainfrom
shiloSaadon:main

Conversation

@shiloSaadon
Copy link
Copy Markdown

In apps like "WhatsApp" when you enter specific chat they clear all the notifications from that specific chat, now you can achieve this using the package by creating tag that contains the group id + uuid and simply clear all the notifications that contains the group id

Copy link
Copy Markdown
Owner

@Wes1324 Wes1324 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks a lot for taking the time to make this PR @shiloSaadon. I really appreciate it.

I've just made a few minor suggestions, mainly to make the documentation slightly clearer.

Also, have you managed to test this on both iOS and Android?

Comment thread CHANGELOG.md
@@ -1,33 +1,39 @@
## 3.0.1

Add the option to clear multiple notifications that their tag contains given pattern
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Minor but I think this needs a hyphen at the start too

Comment thread README.md
That option allows you to create grouped notifications by sending notification with `tag` / `apns-collapse-id` that contains specific pattern and than clean all of them at once

```javascript
const notificationTag: string = someGroupId + "_" + messageUUid;
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
const notificationTag: string = someGroupId + "_" + messageUUid;
const notificationTag: string = someGroupId + "_" + messageUuid;

Comment thread README.md

## Clear by pattern

In case you want to clear "group" of notifications you can use `clearAppNotificationsByTagThatContains`
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
In case you want to clear "group" of notifications you can use `clearAppNotificationsByTagThatContains`
If you want to clear a "group" of notifications you can use `clearAppNotificationsByTagThatContains`

Comment thread README.md
Eraser.clearAppNotificationsByTagThatContains(idGroup);
```

That option allows you to create grouped notifications by sending notification with `tag` / `apns-collapse-id` that contains specific pattern and than clean all of them at once
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
That option allows you to create grouped notifications by sending notification with `tag` / `apns-collapse-id` that contains specific pattern and than clean all of them at once
This feature lets you group notifications by using a `tag` (on Android) or `apns-collapse-id` (on iOS) with a specific pattern. Later, you can use that same pattern to clear all notifications in the group at once.

Comment thread lib/eraser.dart
}
}

/// Clears all push notifications that have been received by your Flutter app that container the specified pattern in their [tag].
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
/// Clears all push notifications that have been received by your Flutter app that container the specified pattern in their [tag].
/// Clears all push notifications that have been received by your Flutter app that contain the specified pattern in their [tag].

Comment thread pubspec.yaml
name: eraser
description: A flutter plugin that allows remote push notifications to be dismissed and the iOS badge count to be reset.
version: 3.0.0
version: 3.0.1
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this should be 3.1.0, and the version in the CHANELOG updated too.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants