From 9d8ad92049aa0bb7128cfbe61a58eb45a04263c9 Mon Sep 17 00:00:00 2001 From: DevHossamHassan Date: Fri, 23 Jun 2017 01:09:28 +0200 Subject: [PATCH] Revert "Revert "Merge branch 'master' of https://github.com/Instabug/instabug-reactnative"" This reverts commit 4cdeaaf2d1730535f43f56330298da215d3f7804. --- InstabugSample/index.ios.js | 11 ++- .../InstabugSample.xcodeproj/project.pbxproj | 41 ++++++---- .../RNInstabugReactnativeModule.java | 2 +- index.js | 75 +++++++++++-------- ios/RNInstabug/InstabugReactBridge.m | 38 +++++++++- 5 files changed, 117 insertions(+), 50 deletions(-) diff --git a/InstabugSample/index.ios.js b/InstabugSample/index.ios.js index 26092fd..ba7ebfe 100644 --- a/InstabugSample/index.ios.js +++ b/InstabugSample/index.ios.js @@ -28,6 +28,7 @@ export default class InstabugSample extends Component { constructor(props) { super(props); Instabug.startWithToken('0f0dc916bd9175e3b5d2fdf0cfa49a69', Instabug.invocationEvent.shake); + const ds = new ListView.DataSource({rowHasChanged: (r1, r2) => r1 !== r2}); this.state = { dataSource: ds.cloneWithRows(this._genRows({})), @@ -61,7 +62,8 @@ export default class InstabugSample extends Component { "Unread messages count", "Set locale", "Set color theme", - "Set primary color" + "Set primary color", + "Show surveys" ]; return dataBlob; } @@ -85,6 +87,8 @@ export default class InstabugSample extends Component { this._showColorThemeActionSheet(); } else if (rowID == 7) { this._showPrimaryColorActionSheet(); + } else if (rowID == 8) { + this._showSurveys(); } } @@ -225,6 +229,11 @@ export default class InstabugSample extends Component { }); } + _showSurveys() { + console.log("show surveys") + Instabug.showSurveysIfAvailable() + } + _renderSeparator(sectionID: number, rowID: number, adjacentRowHighlighted: bool) { return (