Skip to content

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

fix monthly subscription showing yearly pricing

ammarahm-ed3d48eb4da402
diff --git a/apps/mobile/src/services/PremiumService.js b/apps/mobile/src/services/PremiumService.js
index ceaf534a9..57e8f3d83 100644
--- a/apps/mobile/src/services/PremiumService.js
+++ b/apps/mobile/src/services/PremiumService.js
@@ -43,6 +43,20 @@ async function setPremiumStatus() {
}
}
+function getMontlySub() {
+ let _product = {
+ localizedPrice: '$4.49'
+ };
+ if (
+ products.find(p => p.productId === 'com.streetwriters.notesnook.sub.mo')
+ ) {
+ _product = products.find(
+ p => p.productId === 'com.streetwriters.notesnook.sub.mo'
+ );
+ }
+ return _product;
+}
+
function getProducts() {
return products;
}
@@ -263,5 +277,6 @@ export default {
showVerifyEmailDialog,
getProducts,
getUser,
- subscriptions
+ subscriptions,
+ getMontlySub
};
diff --git a/apps/mobile/src/views/Settings/index.js b/apps/mobile/src/views/Settings/index.js
index ddb675108..35bbaa905 100644
--- a/apps/mobile/src/views/Settings/index.js
+++ b/apps/mobile/src/views/Settings/index.js
@@ -359,7 +359,9 @@ export const Settings = ({navigation}) => {
textAlign: 'center'
}}
color={colors.pri}>
- It took us a year to bring Notesnook to you. Help us make it better by rating it on {Platform.OS === 'ios' ? 'Appstore' : 'Playstore'}
+ It took us a year to bring Notesnook to you. Help us make it
+ better by rating it on{' '}
+ {Platform.OS === 'ios' ? 'Appstore' : 'Playstore'}
</Paragraph>
<Seperator />
<MButton
@@ -920,16 +922,10 @@ const SettingsUserSection = () => {
: user.subscription.type ===
SUBSCRIPTION_STATUS.PREMIUM_EXPIRED
? `Resubscribe to Notesnook Pro (${
- PremiumService.getProducts().length > 0
- ? PremiumService.getProducts()[0]
- .localizedPrice
- : '$4.49'
+ PremiumService.getMontlySub().localizedPrice
} / mo)`
: `Subscribe to Notesnook Pro (${
- PremiumService.getProducts().length > 0
- ? PremiumService.getProducts()[0]
- .localizedPrice
- : '$4.49'
+ PremiumService.getMontlySub().localizedPrice
} / mo)`
}
height={50}