Skip to content

Commit

Permalink
Fixes example JS code for RN 30 compatibility
Browse files Browse the repository at this point in the history
Also bump to RN to 30-rc
  • Loading branch information
felipecsl authored and Adel Grimm committed Dec 1, 2016
1 parent 130ef65 commit b23ca3d
Show file tree
Hide file tree
Showing 6 changed files with 19 additions and 16 deletions.
6 changes: 3 additions & 3 deletions android/lib/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ android {
}

dependencies {
compile 'com.facebook.react:react-native:0.29.0'
compile "com.google.android.gms:play-services-base:8.4.0"
compile 'com.google.android.gms:play-services-maps:8.4.0'
compile 'com.facebook.react:react-native:0.30.0-rc.0'
compile "com.google.android.gms:play-services-base:9.2.0"
compile 'com.google.android.gms:play-services-maps:9.2.0'
}
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ public class AirMapMarker extends AirMapFeature {

private boolean hasCustomMarkerView = false;

private final DraweeHolder mLogoHolder;
private final DraweeHolder<?> logoHolder;
private DataSource<CloseableReference<CloseableImage>> dataSource;
private final ControllerListener<ImageInfo> mLogoControllerListener =
new BaseControllerListener<ImageInfo>() {
Expand Down Expand Up @@ -104,8 +104,8 @@ public void onFinalImageSet(
public AirMapMarker(Context context) {
super(context);
this.context = context;
mLogoHolder = DraweeHolder.create(createDraweeHierarchy(), context);
mLogoHolder.onAttach();
logoHolder = DraweeHolder.create(createDraweeHierarchy(), context);
logoHolder.onAttach();
}

private GenericDraweeHierarchy createDraweeHierarchy() {
Expand Down Expand Up @@ -203,9 +203,9 @@ public void setImage(String uri) {
DraweeController controller = Fresco.newDraweeControllerBuilder()
.setImageRequest(imageRequest)
.setControllerListener(mLogoControllerListener)
.setOldController(mLogoHolder.getController())
.setOldController(logoHolder.getController())
.build();
mLogoHolder.setController(controller);
logoHolder.setController(controller);
} else {
iconBitmapDescriptor = getBitmapDescriptorByName(uri);
update();
Expand Down
6 changes: 4 additions & 2 deletions example/examples/AnimatedPriceMarker.js
Original file line number Diff line number Diff line change
@@ -1,13 +1,15 @@
var React = require('react');
var ReactNative = require('react-native');
var {
StyleSheet,
PropTypes,
} = React;

var {
StyleSheet,
View,
Text,
Animated,
} = ReactNative;
var PropTypes = require('ReactPropTypes');

const PriceMarker = ({ amount, selected, style }) => {

Expand Down
5 changes: 3 additions & 2 deletions example/examples/PanController.js
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
var React = require('react');
var ReactNative = require('react-native');
var {
PropTypes,
} = React;
var {
View,
Animated,
PropTypes,
PanResponder,
} = ReactNative;
var PropTypes = require('ReactPropTypes');

var ModePropType = PropTypes.oneOf(["decay", "snap", "spring-origin"]);
var OvershootPropType = PropTypes.oneOf(["spring", "clamp"]);
Expand Down
2 changes: 1 addition & 1 deletion example/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
},
"dependencies": {
"react": "15.2.0",
"react-native": "0.29.0",
"react-native": "^0.30.0-rc",
"react-native-maps": "../"
}
}
6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,11 @@
"mapkit"
],
"dependencies": {
"react": "*",
"react-native": "*"
"react": "15.2.0",
"react-native": "^0.30.0-rc"
},
"devDependencies": {
"react": "15.2.0",
"react-native": "0.29.0"
"react-native": "^0.30.0-rc"
}
}

0 comments on commit b23ca3d

Please sign in to comment.