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
web: fix automatic backup reminder setting reverting to never (#8037)
01zulfi6c8dc223f2c5
diff --git a/apps/web/src/common/notices.ts b/apps/web/src/common/notices.tsindex c4434deb7..ee0fcf63b 100644--- a/apps/web/src/common/notices.ts+++ b/apps/web/src/common/notices.ts@@ -86,9 +86,12 @@ export async function scheduleFullBackups() {);}-export function shouldAddAutoBackupsDisabledNotice() {+export async function shouldAddAutoBackupsDisabledNotice() {+ const user = await db.user.getUser();+ if (!user) return false;+const backupInterval = Config.get("backupReminderOffset", 0);- if (!isUserPremium() && backupInterval) {+ if (!isUserPremium(user) && backupInterval) {Config.set("backupReminderOffset", 0);return true;}@@ -177,7 +180,7 @@ export const NoticesData: Record<NoticeType, NoticeData> = {export async function resetNotices() {const notices: Notice[] = [];- if (shouldAddAutoBackupsDisabledNotice()) {+ if (await shouldAddAutoBackupsDisabledNotice()) {notices.push({ type: "autoBackupsOff", priority: 3 });}if (await shouldAddBackupNotice()) {