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

update example app to use feedback module #19

Merged
merged 1 commit into from
Oct 27, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 12 additions & 12 deletions CountlyRNExample/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -497,21 +497,21 @@ class Example extends Component {
};

showSurvey = () => {
Countly.getFeedbackWidgets((retrivedWidgets, error) => {
Countly.feedback.getAvailableFeedbackWidgets((retrivedWidgets, error) => {
if (error != null) {
console.log('showSurvey Error : ' + error);
} else {
console.log('showSurvey Success : ' + retrivedWidgets.length);
var surveyWidget = retrivedWidgets.find((x) => x.type === 'survey');
if (surveyWidget) {
Countly.presentFeedbackWidgetObject(
Countly.feedback.presentFeedbackWidget(
surveyWidget,
'Close',
function () {
console.log('showSurvey presentFeedbackWidgetObject : ' + 'Widgetshown');
console.log('showSurvey presentFeedbackWidget : ' + 'Widgetshown');
},
function () {
console.log('showSurvey presentFeedbackWidgetObject : ' + 'Widgetclosed');
console.log('showSurvey presentFeedbackWidget : ' + 'Widgetclosed');
}
);
}
Expand All @@ -520,21 +520,21 @@ class Example extends Component {
};

showNPS = () => {
Countly.getFeedbackWidgets((retrivedWidgets, error) => {
Countly.feedback.getAvailableFeedbackWidgets((retrivedWidgets, error) => {
if (error != null) {
console.log('showNPS Error : ' + error);
} else {
console.log('showNPS Success : ' + retrivedWidgets.length);
var npsWidget = retrivedWidgets.find((x) => x.type === 'nps');
if (npsWidget) {
Countly.presentFeedbackWidgetObject(
Countly.feedback.presentFeedbackWidget(
npsWidget,
'Close',
function () {
console.log('showNPS presentFeedbackWidgetObject : ' + 'Widgetshown');
console.log('showNPS presentFeedbackWidget : ' + 'Widgetshown');
},
function () {
console.log('showNPS presentFeedbackWidgetObject : ' + 'Widgetclosed');
console.log('showNPS presentFeedbackWidget : ' + 'Widgetclosed');
}
);
}
Expand All @@ -543,21 +543,21 @@ class Example extends Component {
};

showRating = () => {
Countly.getFeedbackWidgets((retrivedWidgets, error) => {
Countly.feedback.getAvailableFeedbackWidgets((retrivedWidgets, error) => {
if (error != null) {
console.log('showRating Error : ' + error);
} else {
console.log('showRating Success : ' + retrivedWidgets.length);
const ratingWidget = retrivedWidgets.find((x) => x.type === 'rating');
if (ratingWidget) {
Countly.presentFeedbackWidgetObject(
Countly.feedback.presentFeedbackWidget(
ratingWidget,
'Close',
function () {
console.log('showRating presentFeedbackWidgetObject : Widgetshown');
console.log('showRating presentFeedbackWidget : Widgetshown');
},
function () {
console.log('showRating presentFeedbackWidgetObject : Widgetclosed');
console.log('showRating presentFeedbackWidget : Widgetclosed');
}
);
}
Expand Down
12 changes: 6 additions & 6 deletions CountlyRNExample/ios/Podfile.lock
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
PODS:
- boost (1.76.0)
- CocoaAsyncSocket (7.6.5)
- CountlyReactNative (23.6.0):
- CountlyReactNative/NotificationService (= 23.6.0)
- CountlyReactNative (23.8.1):
- CountlyReactNative/NotificationService (= 23.8.1)
- React
- CountlyReactNative/NotificationService (23.6.0):
- CountlyReactNative/NotificationService (23.8.1):
- React
- DoubleConversion (1.1.6)
- FBLazyVector (0.71.0)
Expand Down Expand Up @@ -383,7 +383,7 @@ PODS:
- React-jsi (= 0.71.0)
- React-logger (= 0.71.0)
- React-perflogger (= 0.71.0)
- SocketRocket (0.6.0)
- SocketRocket (0.6.1)
- Yoga (1.14.0)
- YogaKit (1.18.1):
- Yoga (~> 1.14)
Expand Down Expand Up @@ -543,7 +543,7 @@ EXTERNAL SOURCES:
SPEC CHECKSUMS:
boost: 57d2868c099736d80fcd648bf211b4431e51a558
CocoaAsyncSocket: 065fd1e645c7abab64f7a6a2007a48038fdc6a99
CountlyReactNative: 7a67c409ff0a08188a0cf218aed596bacb323650
CountlyReactNative: a9570036edcc4a4bf65d802f1a14c4f3a63a77f1
DoubleConversion: 5189b271737e1565bdce30deb4a08d647e3f5f54
FBLazyVector: 61839cba7a48c570b7ac3e1cd8a4d0948382202f
FBReactNativeSpec: 5a14398ccf5e27c1ca2d7109eb920594ce93c10d
Expand Down Expand Up @@ -588,7 +588,7 @@ SPEC CHECKSUMS:
React-RCTVibration: 55c91eccdbd435d7634efbe847086944389475b0
React-runtimeexecutor: ac80782d9d76ba2b0f709f4de0c427fe33c352dc
ReactCommon: 20e38a9be5fe1341b5e422220877cc94034776ba
SocketRocket: fccef3f9c5cedea1353a9ef6ada904fde10d6608
SocketRocket: f32cd54efbe0f095c4d7594881e52619cfe80b17
Yoga: c618b544ff8bd8865cdca602f00cbcdb92fd6d31
YogaKit: f782866e155069a2cca2517aafea43200b01fd5a

Expand Down
2 changes: 1 addition & 1 deletion CountlyRNExample/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"test": "jest"
},
"dependencies": {
"countly-sdk-react-native-bridge": "23.6.1",
"countly-sdk-react-native-bridge": "23.8.1",
"react": "18.2.0",
"react-native": "0.71.0"
},
Expand Down