mobile: fix trial expired notice shows to new users

This commit is contained in:
ammarahm-ed
2023-06-09 08:03:29 +05:00
committed by Ammar Ahmed
parent 5d1ba7fa0a
commit 49df1bcd9e
2 changed files with 3 additions and 3 deletions

View File

@@ -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>
);

View File

@@ -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;