Compare commits

...

2 Commits

Author SHA1 Message Date
ammarahm-ed
f5a34a9073 web: fix trial expired notice shows to new users 2023-06-09 08:03:52 +05:00
ammarahm-ed
c4bb638c29 mobile: fix trial expired notice shows to new users 2023-06-09 08:03:29 +05:00
3 changed files with 4 additions and 4 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;

View File

@@ -199,7 +199,7 @@ export async function showUpgradeReminderDialogs() {
if (isTesting()) return;
const user = userstore.get().user;
if (!user) return;
if (!user || !user.subscription || user.subscription?.expiry === 0) return;
const consumed = totalSubscriptionConsumed(user);
const isTrial = user?.subscription?.type === SUBSCRIPTION_STATUS.TRIAL;