-
Notifications
You must be signed in to change notification settings - Fork 39
[MOB-12039] rn-add-in-app-manager-back-onto-iterable-object #699
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
[MOB-12039] rn-add-in-app-manager-back-onto-iterable-object #699
Conversation
Diff Coverage: The code coverage on the diff in this pull request is 100.0%. Total Coverage: This PR will increase coverage by 0.54%. File Coverage Changes
🛟 Help
This is from Qlty Cloud, the successor to Code Climate Quality. Learn more. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looking great!
// THEN Iterable,inAppManager.getMessages returns the list of in-app messages | ||
return await inAppManager.getMessages().then((messagesObtained) => { | ||
// THEN Iterable.inAppManager.getMessages returns the list of in-app messages | ||
return await Iterable.inAppManager?.getMessages().then((messagesObtained) => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This approach feels right. Accessing it from Iterable global level.
const inAppManager = new IterableInAppManager(); | ||
// THEN Iterable,inAppManager.showMessage returns the simulated clicked url | ||
return await inAppManager.showMessage(message, consume).then((url) => { | ||
return await Iterable.inAppManager?.showMessage(message, consume).then((url) => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great to see inAppManager optional(?)
const { IterableInAppManager } = require('../../inApp/classes/IterableInAppManager'); | ||
this._inAppManager = new IterableInAppManager(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Wow! This is insane! Never thought we could conditionally import!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yeah. it's a little hacky, but it works in things like this.
🔹 JIRA Ticket(s) if any
✏️ Description
Added
inAppManager
back onto iterable object