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

Automatically clear notifications #1

Open
finnp opened this issue Jul 19, 2016 · 3 comments
Open

Automatically clear notifications #1

finnp opened this issue Jul 19, 2016 · 3 comments

Comments

@finnp
Copy link
Owner

finnp commented Jul 19, 2016

@drschwabe
Copy link

A little late here - and I'm not sure how to do this in your current version - but I just forked v1.1.1 and made a one line commit to accommodate for this functionality:

drschwabe@373a980

so to use it, you can do:

  notifications.add('Something cool happened.')
  //get reference to this notification: 
  let notification = notifications.state[notifications.state.length - 1]
  //allow notification to appear for a few seconds, set as closed...
  setTimeout( () => {
    notification.closed = true
    notifications.update()
    // (notification 'animates' out in the same way as if user closed it with 'x' button ) 
  }, 3500)

@finnp
Copy link
Owner Author

finnp commented Apr 25, 2019

Are you interested in taking over this project? I'm currently not using it anywhere. This project is using semantic-release, so if i add you on github you're free to publish your changes as a new feature release.

@drschwabe
Copy link

Well this feature is based on your v1.1.1 commit so my fork may be fine in this way your changes since that point are preserved.

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

No branches or pull requests

2 participants