Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to get notification count when using notification threshold #1449

Open
RationalityFrontline opened this issue Jun 28, 2022 · 3 comments · May be fixed by #1450
Open

Unable to get notification count when using notification threshold #1449

RationalityFrontline opened this issue Jun 28, 2022 · 3 comments · May be fixed by #1450
Labels
enhancement New feature or request

Comments

@RationalityFrontline
Copy link
Contributor

When using Notifications with threshold, I can't get current notification count (I want to display it on the threshold notification) :

Notifications.create()
    .title("Title")
    .text("Content")
    .threshold(5, Notifications.create()
        .title("Title (9 more)")  // I want to get the current notification count so I can display something like "9 more"
        .text("Content")
    );
@abhinayagarwal
Copy link
Member

I am trying to understand what is the use-case of this. Can you throw an example?

@abhinayagarwal abhinayagarwal added the enhancement New feature or request label Sep 19, 2022
@RationalityFrontline
Copy link
Contributor Author

@abhinayagarwal When setting threshold on Notifications, after reaching the threshold, I want to inform the user about how many notifications are currently folded, which offers better user experience than just telling user there are some notifications folded. Here is a working example:
image
I set threshold to 3, and when 5 notifications came in rapid sequence, the folded notification should show text like "5+" to inform the user that there are currently 5 notifications folded. To achieve this, I need a Notifications.getNotificationCount method.

@Siedlerchr
Copy link
Collaborator

I really liked the idea!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants