Skip to content

Commit

Permalink
Release 2.1.2 (#32)
Browse files Browse the repository at this point in the history
* Fixed android properties loaded callback

* bump version

* updated readme
  • Loading branch information
jsalaber authored Oct 16, 2020
1 parent 88dc016 commit 19def3b
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 6 deletions.
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,10 @@ Then follow the [Experiment](/EXPERIMENTS.md) guide and the [Push Notification](

## Changelog

**[2.1.2](https://github.com/taplytics/Taplytics-React-Native/releases/tag/2.1.2)**

1. Fixed `propertiesLoadedCallback` for Android

**[2.1.1](https://github.com/taplytics/Taplytics-React-Native/releases/tag/2.1.1)**

1. Fixed `propertiesLoadedCallback` crashing the app when called more than once
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -252,7 +252,7 @@ public void pushTokenReceived(String s) {
}

@ReactMethod
public void propertiesLoadedCallback(final Callback callback) {
public void _propertiesLoadedCallback(final Callback callback) {
Taplytics.getRunningExperimentsAndVariations(new TaplyticsRunningExperimentsListener() {
@Override
public void runningExperimentsAndVariation(Map<String, String> map) {
Expand Down
12 changes: 8 additions & 4 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -134,10 +134,14 @@ Taplytics.registerPushReceivedListener = (listener) => {
}

Taplytics.propertiesLoadedCallback = (callback) => {
Taplytics.nativeEventEmitter.addListener('propertiesLoadedCallback', (loaded) => {
callback(loaded)
})
Taplytics._propertiesLoadedCallback()
if (Platform.OS == 'ios') {
Taplytics.nativeEventEmitter.addListener('propertiesLoadedCallback', (loaded) => {
callback(loaded)
})
Taplytics._propertiesLoadedCallback()
} else {
Taplytics._propertiesLoadedCallback(callback)
}
}

if (Platform.OS == 'ios') {
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": "taplytics-react-native",
"version": "2.1.1",
"version": "2.1.2",
"description": "_Taplytics is a native mobile A/B testing and push notification platform that helps you optimize your React Native app!_",
"main": "index.js",
"scripts": {
Expand Down

0 comments on commit 19def3b

Please sign in to comment.