Skip to content

Commit

Permalink
Merge pull request #385 from jpush/dev
Browse files Browse the repository at this point in the history
Dev
  • Loading branch information
KenChoi1992 authored Oct 20, 2017
2 parents 40d91a2 + 3cde6fe commit 9cbe3ec
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
import com.facebook.react.bridge.ReactMethod;
import com.facebook.react.bridge.ReadableArray;
import com.facebook.react.bridge.ReadableMap;
import com.facebook.react.bridge.ReadableMapKeySetIterator;
import com.facebook.react.bridge.WritableArray;
import com.facebook.react.bridge.WritableMap;
import com.facebook.react.modules.core.DeviceEventManagerModule;
Expand All @@ -27,6 +28,7 @@
import java.util.Date;
import java.util.HashMap;
import java.util.HashSet;
import java.util.Iterator;
import java.util.LinkedHashSet;
import java.util.List;
import java.util.Set;
Expand Down Expand Up @@ -463,8 +465,9 @@ public void sendLocalNotification(ReadableMap map) {
ln.setContent(map.getString("content"));
ReadableMap extra = map.getMap("extra");
JSONObject json = new JSONObject();
while (extra.keySetIterator().hasNextKey()) {
String key = extra.keySetIterator().nextKey();
ReadableMapKeySetIterator iterator = extra.keySetIterator();
while (iterator.hasNextKey()) {
String key = iterator.nextKey();
json.put(key, extra.getString(key));
}
ln.setExtras(json.toString());
Expand Down
2 changes: 1 addition & 1 deletion example/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
},
"dependencies": {
"jcore-react-native": "^1.1.7",
"jpush-react-native": "^2.0.6",
"jpush-react-native": "^2.1.1",
"react": "^16.0.0-alpha.12",
"react-native": "^0.47.1",
"react-native-onesignal": "^3.0.4",
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "jpush-react-native",
"version": "2.1.0",
"version": "2.1.1",
"description": "a jpush plugin for react native application",
"main": "index.js",
"scripts": {
Expand Down

0 comments on commit 9cbe3ec

Please sign in to comment.