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

Add ability to change refresh rate #195

Closed
Michael-Ziluck opened this issue Oct 16, 2019 · 6 comments
Closed

Add ability to change refresh rate #195

Michael-Ziluck opened this issue Oct 16, 2019 · 6 comments

Comments

@Michael-Ziluck
Copy link

Some people might want the notifications to update more or less frequently. Currently this is not possible.

@notlmn
Copy link
Collaborator

notlmn commented Oct 17, 2019

The current implementation uses the alarms API, which according to Chrome docs limits scheduling alarms to at most 1 alarm per minute. So there's no option for going more frequently (FYI, the extension automatically updates count, regardless of the alarm, for every potential notification open: #182).

And I don't see why you want it to update less frequently, any use-cases you could mention for me?

@Michael-Ziluck
Copy link
Author

As for how often it updates, why not have a separate value for how often it sends the alarm and for how often it updates? I personally have the noise and push notifications turned off, but would love it if the icons updated every 5 seconds or so rather than every 60.

As for more frequently, I'm not really sure someone's motivation but if it isn't much work I don't see the harm.

@notlmn
Copy link
Collaborator

notlmn commented Oct 21, 2019

As for how often it updates, why not have a separate value for how often it sends the alarm and for how often it updates? I personally have the noise and push notifications turned off, but would love it if the icons updated every 5 seconds or so rather than every 60.

We cannot have an alarm that can be triggered multiple times over a single minute. Refer to my comment above on why.


As for more frequently, I'm not really sure someone's motivation but if it isn't much work I don't see the harm.

I was referring why people would make it update less frequent, not on why they would like it to upgrade more frequent.

@Michael-Ziluck
Copy link
Author

@notlmn I want it to query GitHub for notifications more often than 60 seconds but NOT send an alarm. This would be useful to see the icon update regularly even if the notification does not go off.

For the second part, I meant to say less frequently.

@dirathea
Copy link
Contributor

dirathea commented Nov 3, 2019

CMIIW, But I think @ZiluckMichael might missed this one, alarms means the interval of an extension to do something, not necessary for sending notifications, or alerting, but maybe doing action in interval manner. Think this alarm like setInterval or setTimeout but for browser extension.

there are 2 limitations of your request to do Github request more often than 60 seconds.

  1. Clear limitation of browser extension to handle alarm stated here
  2. Github API also asks developer to respect their Poll Interval

Hope this information helps!

@Michael-Ziluck
Copy link
Author

@dirathea That actually clears things up a lot. I understand that limitation now. Sorry for the confusion! Thanks!

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

3 participants