Skip to content

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

mobile: fix trial expired notice shows to new users

ammarahm-ed49df1bcd9e59
diff --git a/apps/mobile/app/components/walkthroughs/walkthroughs.tsx b/apps/mobile/app/components/walkthroughs/walkthroughs.tsx
index 2a2c3d3ad..93153d2e0 100644
--- a/apps/mobile/app/components/walkthroughs/walkthroughs.tsx
+++ b/apps/mobile/app/components/walkthroughs/walkthroughs.tsx
@@ -277,7 +277,6 @@ const ChooseTheme = () => {
return (
<View
style={{
- maxHeight: 170,
alignItems: "center",
marginTop: 20
}}
@@ -295,7 +294,7 @@ const ChooseTheme = () => {
Pick a theme of your choice
</Paragraph>
<Seperator />
- <AccentColorPicker settings={false} />
+ <AccentColorPicker />
<Seperator />
</View>
);
diff --git a/apps/mobile/app/services/premium.js b/apps/mobile/app/services/premium.js
index 742dbe76c..13a7a4e15 100644
--- a/apps/mobile/app/services/premium.js
+++ b/apps/mobile/app/services/premium.js
@@ -319,7 +319,8 @@ const subscriptions = {
async function getRemainingTrialDaysStatus() {
let user = await db.user.getUser();
- if (!user) return false;
+ if (!user || !user.subscription || user.subscription?.expiry === 0) return;
+
let premium = user.subscription.type !== SUBSCRIPTION_STATUS.BASIC;
let isTrial = user.subscription.type === SUBSCRIPTION_STATUS.TRIAL;
let total = user.subscription.expiry - user.subscription.start;