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

Support multiple Gmail accounts #5

Open
aertmann opened this issue Jan 27, 2021 · 5 comments
Open

Support multiple Gmail accounts #5

aertmann opened this issue Jan 27, 2021 · 5 comments
Labels
enhancement New feature or request good first issue Good for newcomers help wanted Extra attention is needed

Comments

@aertmann
Copy link

Currently the extension only works for the primary Gmail account since the endpoint URL is hardcoded. I'd like use the extension for a secondary account (https://mail.google.com/mail/u/1/feed/atom). Not sure how this should be configured, but a flexible solution would be ideal.

@aberonni aberonni added enhancement New feature or request good first issue Good for newcomers help wanted Extra attention is needed labels Jan 27, 2021
@binarylogic
Copy link

@aberonni do you have any pointers on how to implement this? I can give it a shot.

@aberonni
Copy link
Owner

@binarylogic that would be great!

You need to give the user the option to configure the URL that is used here: https://github.com/aberonni/gmail-app-badge-notification/blob/master/src/content.js#L22

I don't know how that should be configured, as I don't use multiple accounts and I don't fully understand the use case.

What I can tell you is that the default should not change, and that you can easily add an options page where users can configure options. I've done something similar with another extension here: https://github.com/aberonni/open-in-vscode/blob/master/src/manifest.json#L20

@hjrrockies
Copy link

@binarylogic @aberonni I'm not a JS developer, so I'm not surprised that I'm having issues. I just did a quick edit on a fork to change the URL to 'https://mail.google.com/mail/u/1/feed/atom?_='. What breaks then is that the badges show up on the app icon for the first gmail account, not the second.

@aberonni
Copy link
Owner

aberonni commented Mar 8, 2021

I've tried a different approach now that I've understood how the different URLs are built. You might want to give this branch a try and let me know whether it works: #7

I haven't tested it at all so there might by typos, breaking changes, etc...

@hjrrockies
Copy link

hjrrockies commented Mar 8, 2021

@aberonni The badge for the second inbox is still displaying on the first inbox's app icon. See the attached screenshot. My guess is that it's an issue with the call to navigator.setAppBadge?

EDIT: I should clarify that the badge displays the unread count for whichever of the two inboxes updated the count most recently.
gmail-badge-extension-issue

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers help wanted Extra attention is needed
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants