-
-
Notifications
You must be signed in to change notification settings - Fork 7
Add method to change notification sound #33
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 method to change notification sound #33
Conversation
simonhamp
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You'll need to bring the changes from NativePHP/electron#257 into this repository now, as they've been combined
|
I have moved the changes made in NativePHP/electron#257 to the electron folder in this repository, i have also tested my changes in a demo app and they seem to work for me. |
|
@gwleuverink what do you think we should do with this |
resources/electron/electron-plugin/src/server/api/notification.ts
Outdated
Show resolved
Hide resolved
simonhamp
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've spotted the docs PR - awesome.
I like this and the fact that it will bring cross-platform notification sound customisation, but I have some notes on the implementation.
resources/electron/electron-plugin/src/server/api/notification.ts
Outdated
Show resolved
Hide resolved
resources/electron/electron-plugin/src/server/api/notification.ts
Outdated
Show resolved
Hide resolved
resources/electron/electron-plugin/src/server/api/notification.ts
Outdated
Show resolved
Hide resolved
Can we merge main back to this branch & run |
gwleuverink
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is a great addition 👍🏻 Thanks @Jianbe-03! Could clarify a few questions in the comments?
resources/electron/electron-plugin/src/server/api/notification.ts
Outdated
Show resolved
Hide resolved
resources/electron/electron-plugin/src/server/api/notification.ts
Outdated
Show resolved
Hide resolved
resources/electron/electron-plugin/src/server/api/notification.ts
Outdated
Show resolved
Hide resolved
…orm specific afplay command since playSoundLib already does this
|
Every requested change should be implemented now, can this be verified so the branch can be merged? @simonhamp @gwleuverink |
gwleuverink
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is great! Looking at the entire PR now I have one more recommendation. Are you up to adding that?
This might be the direction you were going before using that custom event. I def think it's helpful to show the dev why it's erroring
gwleuverink
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good! Thanks @Jianbe-03 !
simonhamp
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice work!
|
codestyle workflow is failing (due to outside branch) all is green when running locally. will skip that check |
This pull request adds support for sound notifications and silent mode to the
Notificationclass. These changes allow notifications to specify a custom sound and to be marked as silent, providing more flexibility in how notifications are delivered and displayed.New notification features:
soundandsilentproperties to theNotificationclass, allowing notifications to specify a sound and whether they should be silent.sound()andsilent()methods in theNotificationclass to set these new properties.show()method to includesoundandsilentin the notification payload.This addition does require an update to the electron repository, i made the changes for this pull request in here: NativePHP/electron#257