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

[PushNotificationIOS] Added badge icon number and alert action #2931

Closed
wants to merge 1 commit into from

Conversation

alvaromb
Copy link
Contributor

Added support for setting an optional badge icon number and alert action when using local notifications.

@facebook-github-bot facebook-github-bot added GH Review: review-needed CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. labels Sep 22, 2015
@christopherdro
Copy link
Contributor

@alvaromb Any chance you can rebase this against master?
@nicklockwood Do you see anything holding this back from getting merged in?

@alvaromb
Copy link
Contributor Author

alvaromb commented Feb 5, 2016

I don't know if this got merged, completely forgot 😆

I can update the PR or send another one.

@chirag04
Copy link
Contributor

chirag04 commented Mar 6, 2016

@alvaromb alertAction is already added in master. Do you want to rebase and add support for applicationIconBadgeNumber?

@alvaromb
Copy link
Contributor Author

alvaromb commented Mar 7, 2016

Ok, I'll try to do a rebase today.

@ghost
Copy link

ghost commented Mar 12, 2016

@vjeux would you mind taking a look at this pull request? It's been a while since the last commit was reviewed.

@vjeux
Copy link
Contributor

vjeux commented Mar 12, 2016

I have 0 context on this but the other reviewers might

@facebook-github-bot
Copy link
Contributor

@alvaromb updated the pull request.

@mkonicek
Copy link
Contributor

I'll try assigning this to @majak as all the iOS pull requests are assigned to Nick and this doesn't scale :)

@alvaromb
Copy link
Contributor Author

Sorry folks, I'm currently having a gargantuan amount of work right now, didn't have time to look at this. Do you want me to rebase anything?

@mkonicek
Copy link
Contributor

@alvaromb That's understandable :) Let's wait for @majak first (please reassign to someone else than Nick if you're too busy) to see how we should proceed with this PR.

@joshuapinter
Copy link
Contributor

Hey Guys, I'd love to have this in here. Is there anything I can do to help, like a rebase against Master since alertAction has already been added? Let me know.

@joshuapinter
Copy link
Contributor

As a means of getting this into master as quick as possible (I need this for our next release) I created a new PR with the same changes on the master branch.

The new PR is #6894.

Thanks for your effort on this @alvaromb! 👍

@alvaromb
Copy link
Contributor Author

Thanks Joshua! :)

Enviado desde mi iPhone

El 10 abr 2016, a las 4:37, Joshua Pinter notifications@github.com escribió:

As a means of getting this into master as quick as possible (I need this for our next release) I created a new PR with the same changes on the master branch.

The new PR is #6894.

Thanks for your effort @alvaromb on this!


You are receiving this because you were mentioned.
Reply to this email directly or view it on GitHub

@mkonicek
Copy link
Contributor

mkonicek commented Apr 22, 2016

I'd like at least one person with Obj-C knowledge to take a look but everyone seems too busy. Maybe I'll have to learn Obj-C :)

This one seems simple enough for me to review.

@facebook-github-bot shipit

@alvaromb
Copy link
Contributor Author

Please ping me if you need some info about the PR @mkonicek 😃

@facebook-github-bot facebook-github-bot added GH Review: accepted Import Started This pull request has been imported. This does not imply the PR has been approved. and removed GH Review: review-needed labels Apr 22, 2016
@facebook-github-bot
Copy link
Contributor

Thanks for importing. If you are an FB employee go to Phabricator to review.

@joshuapinter
Copy link
Contributor

Thanks for taking a look @mkonicek. Because this PR took so long to get merged there was a bunch of code changes to master so I ended up creating a new PR with @alvaromb's changes except based off the latest master branch: #6894.

I don't know if this one or #6894 is easier for you to merge in, but they accomplish the same thing.

Over to you! :)

@@ -35,6 +35,8 @@ + (UILocalNotification *)UILocalNotification:(id)json
UILocalNotification *notification = [UILocalNotification new];
notification.fireDate = [RCTConvert NSDate:details[@"fireDate"]] ?: [NSDate date];
notification.alertBody = [RCTConvert NSString:details[@"alertBody"]];
notification.alertAction = [RCTConvert NSString:details[@"alertAction"]] ?: nil;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not a biggie, but I’m unsure what the point is of the extra ternary. Right now it reads to me like: if the result of converting is nil return nil instead.

@alloy
Copy link
Contributor

alloy commented Apr 22, 2016

@mkonicek I left some comments, hope it helps.

@alvaromb
Copy link
Contributor Author

Thanks for the feedback @alloy. Definitely not the best code ever, I'll update the PR.

@facebook-github-bot
Copy link
Contributor

@alvaromb updated the pull request.

@alvaromb
Copy link
Contributor Author

I've added @alloy suggestions (thanks!) and updated the PR. /cc @joshuapinter

@joshuapinter
Copy link
Contributor

@alvaromb Beauty! I'll go close my PR.

@alloy
Copy link
Contributor

alloy commented Apr 22, 2016

@alvaromb @mkonicek Yup, this looks good to me 👍

@mkonicek
Copy link
Contributor

OK merging the updated code.

@facebook-github-bot shipit

@facebook-github-bot
Copy link
Contributor

Thanks for importing. If you are an FB employee go to Phabricator to review.

@facebook-github-bot facebook-github-bot added Import Failed and removed Import Started This pull request has been imported. This does not imply the PR has been approved. labels Apr 23, 2016
@mkonicek
Copy link
Contributor

@alvaromb Can you please rebase? There's a merge conflict with master, sorry about that.

…ations

Improved applicationIconBadgeNumber handling and updated docs
@ghost
Copy link

ghost commented Apr 29, 2016

@alvaromb updated the pull request.

@alvaromb
Copy link
Contributor Author

There you go @mkonicek! Please let me know if you need anything else 😃

@mkonicek
Copy link
Contributor

Thanks @alvaromb!

@facebook-github-bot shipit

@ghost ghost added the Import Started This pull request has been imported. This does not imply the PR has been approved. label Apr 29, 2016
@ghost
Copy link

ghost commented Apr 29, 2016

Thanks for importing. If you are an FB employee go to Phabricator to review.

@ghost ghost closed this in 84e6968 Apr 29, 2016
ptmt pushed a commit to ptmt/react-native that referenced this pull request May 9, 2016
Summary:
Added support for setting an optional badge icon number and alert action when using local notifications.
Closes facebook#2931

Differential Revision: D3212448

Pulled By: mkonicek

fb-gh-sync-id: 063efcdd259b2a43f39812f57a71e8489ab33653
fbshipit-source-id: 063efcdd259b2a43f39812f57a71e8489ab33653
zebulgar pushed a commit to nightingale/react-native that referenced this pull request Jun 18, 2016
Summary:
Added support for setting an optional badge icon number and alert action when using local notifications.
Closes facebook#2931

Differential Revision: D3212448

Pulled By: mkonicek

fb-gh-sync-id: 063efcdd259b2a43f39812f57a71e8489ab33653
fbshipit-source-id: 063efcdd259b2a43f39812f57a71e8489ab33653
samerce pushed a commit to iodine/react-native that referenced this pull request Aug 23, 2016
Summary:
Added support for setting an optional badge icon number and alert action when using local notifications.
Closes facebook#2931

Differential Revision: D3212448

Pulled By: mkonicek

fb-gh-sync-id: 063efcdd259b2a43f39812f57a71e8489ab33653
fbshipit-source-id: 063efcdd259b2a43f39812f57a71e8489ab33653
This pull request was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. Import Started This pull request has been imported. This does not imply the PR has been approved.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

9 participants