A fully open source & end-to-end encrypted note taking alternative to Evernote.
TypeScript asp-net-coredotnet-coreelectronfosshacktoberfestnote-managmentnote-takingnote-taking-appnotebooknotesnotes-appopen-sourceopensourceprivacyproductivityreactreact-nativereactjsself-hosted
fix trial ending dialog showing everytime
ammarahm-ed006a1d32c475
diff --git a/apps/mobile/src/services/PremiumService.js b/apps/mobile/src/services/PremiumService.jsindex 520bdfb73..f2aa2bf41 100644--- a/apps/mobile/src/services/PremiumService.js+++ b/apps/mobile/src/services/PremiumService.js@@ -282,13 +282,14 @@ async function getRemainingTrialDaysStatus() {let user = await db.user.getUser();if (!user) 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;let current = Date.now() - user.subscription.start;current = (current / total) * 100;console.log(current);let lastTrialDialogShownAt = await MMKV.getItem('lastTrialDialogShownAt');- if (current > 75 && lastTrialDialogShownAt !== 'ending') {+ if (current > 75 && isTrial && lastTrialDialogShownAt !== 'ending') {eSendEvent(eOpenTrialEndingDialog, {title: 'Your trial is ending soon',offer: null,