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 new 'appearance' optional block, constructors to enable proper syncing of sound/vibration with queued notifications. #94
Conversation
…efore the notification is actually shown. Useful for synchronizing audio / vibration when multiple notifications are queued.
Great work Andy. Thanks. |
This is great but I don't think
rather than
Thoughts? |
@cruffenach -- great feedback -- agreed completely. Lemme spin up a change.... |
…I, reorder parameters to reduce dissonance.
@cruffenach, all fixed -- lemme know if you have any additional feedback / concerns -- thanks again for taking a look at this! Andy |
@@ -1344,6 +1358,7 @@ - (void)addNotification:(CRToast*)notification { | |||
} | |||
|
|||
- (void)displayNotification:(CRToast*)notification { | |||
notification.appearance(); |
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.
Should be if (notification.appearance) notification.appearance();
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.
indeed -- will fix -- sorry I missed this
I wonder if |
I hear you @Ashton-W, don't think its too big a deal myself. Other suggestions? |
Nah, looks great |
woot |
Can we get this resolved? |
@cruffenach -- wow can't belive I missed that -- thanks. Fixed |
Add new 'appearance' optional block, constructors to enable proper syncing of sound/vibration with queued notifications.
You guys rock -- thank you so much! |
CRToast automatically handles notification queuing, which is great -- it's essentially fire-and-forget. Currently, there is an optional block that you can provide to be called after a notification shows. Unfortunately, there isn't a way to get notified when a notification is actually being shown.
The scenario here is that several notifications are queued to show, and you want to play a sound / vibration each time a notification is dequeued/shown.
This change simply adds an additional block property to CRToast, and a new constructor that lets the caller provide it. The block is called immediately before the notification is shown.
I did my best to emulate the project formatting / conventions -- if you have feedback, I'm happy to do an iteration or two. Thanks for providing this library -- it's really great.
Thanks,
Andy