inbasic / ignotifier

Multiple account Gmail notifier (without storing passwords)
https://webextension.org/listing/gmail-notifier.html
Other
396 stars 116 forks source link

Opening inbox should reset the counter on the button #37

Closed Drugoy closed 11 years ago

Drugoy commented 11 years ago

I think that opening inbox and especially opening it via clicking the extension's button/popup should reset the counter on that button to zero.

inbasic commented 11 years ago

One idea is to reset the counter badge, but what if a user opens the inbox and just keeps new emails unread? In this case if you reset the badge, user will receive a new desktop notification for emails that have been already notified for.

Instead I thought about firing email event to check all account just after opening inbox, but it doesn't make that much sense either. Usually it takes more than 5 sec for a normal user to check a single email. That suggests to delay the new check for 5ish which is very close to the normal check period (15sec)

Drugoy commented 11 years ago

I think that's fine for such a person that doesn't like to keep 'incoming' folder clean to get re-alerted.

inbasic commented 11 years ago

That was just one issue. We also need to consider users with low internet connection speed. If the badge is reset locally and the next email check period is close then user gets a new notification even before getting a chance to open the inbox! (GMN only request a tinny text file from Google server which is fast even for those users.)

I would say a delay of about 10 secs is necessary to avoid all of these confusions. Which is pretty much the normal check period.

Drugoy commented 11 years ago

Yeah, I also wanted to report (but forgot) that. Your timer is currently unaffected by any events, and that's wrong. If the user manually opens gmail - while that tab is open (and not unloaded, btw!) - the timer should get frozen at max. timer time until the user closes/unloads that tab.

inbasic commented 11 years ago

Why a frozen timer? There are many user who have their Gmail account open all the time and they still use a notifier to get notifications when there is a new email.

I think it would be better if the 'timer' gets reset when the gmail tab is being open. In this case the counter will be updated based on the counts reported by Google server.

inbasic commented 11 years ago

Will be continued on #38