Skip to content

A fully open source & end-to-end encrypted note taking alternative to Evernote.

request sku data on open dialog

ammarahm-ed5c6c94f167c9
diff --git a/apps/mobile/src/components/Premium/PremiumDialog.js b/apps/mobile/src/components/Premium/PremiumDialog.js
index 9a5a25168..3745be9b7 100644
--- a/apps/mobile/src/components/Premium/PremiumDialog.js
+++ b/apps/mobile/src/components/Premium/PremiumDialog.js
@@ -38,7 +38,9 @@ class PremiumDialog extends React.Component {
close() {
this.actionSheetRef.current?._setModalVisible(false);
}
- async componentDidMount() {
+
+
+ async getSkus() {
try {
let u = await db.user.get();
let prod = await RNIap.getSubscriptions(itemSkus);
@@ -49,7 +51,6 @@ class PremiumDialog extends React.Component {
} catch(e) {
console.log(e,"SKU ERROR")
}
-
}
onSuccessfulSubscription = (subscription: RNIap.SubscriptionPurchase) => {
@@ -79,6 +80,9 @@ class PremiumDialog extends React.Component {
borderRadius: 10,
marginBottom: DDS.isTab ? 50 : 0,
}}
+ onOpen={async () => {
+ await this.getSkus();
+ }}
extraScroll={DDS.isTab ? 50 : 0}
footerAlwaysVisible={DDS.isTab}
footerHeight={DDS.isTab ? 20 : 10}