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

Listen to browser notifications #3

Open
JStruk opened this issue Feb 24, 2021 · 0 comments
Open

Listen to browser notifications #3

JStruk opened this issue Feb 24, 2021 · 0 comments

Comments

@JStruk
Copy link
Collaborator

JStruk commented Feb 24, 2021

The "timer up" notification is being displayed based on what feels like a really hacky solution. Right now, the code constantly responds to the webpage title changing, and assesses the state of the app. If it's the first time we've changed from "Mob Timer" to "4:59 - mobtimer", we know the timer has started. Consequently, when the title switches from "0:00 - mobtime" to "mobtime", we can assume the timer has ended, and send the notification here. There are many many downfalls to this logic, the biggest complaint being if the functionality of the app ever changes and the titles are updated differently, this stands to break. This could be fixed by listening for the actual notifications being sent by the app and passing them along to the IDE.

AC:

  • Using some sort of listener to handle the actual browser notifications being sent, relay these notifications to the user through the IDE notification system

Notes:

  • The code listens to the title through a CefDisplayHandler, which requires an onTitleChange handler. I wasn't able to find a handler within the Java-wrapped chromium framework that listens for notification events. If this exists somewhere, it would be perfect for what we need to do.
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

1 participant