Skip to content

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

web: disable in-app noticies (temporarily)

Abdullah Attac10332809847
diff --git a/apps/web/src/app-effects.tsx b/apps/web/src/app-effects.tsx
index 44b489a42..277fcd225 100644
--- a/apps/web/src/app-effects.tsx
+++ b/apps/web/src/app-effects.tsx
@@ -23,11 +23,7 @@ import { useStore as useUserStore } from "./stores/user-store";
import { useEditorStore } from "./stores/editor-store";
import { useStore as useAnnouncementStore } from "./stores/announcement-store";
import { useStore as useSettingStore } from "./stores/setting-store";
-import {
- resetNotices,
- scheduleBackups,
- scheduleFullBackups
-} from "./common/notices";
+import { scheduleBackups, scheduleFullBackups } from "./common/notices";
import { introduceFeatures, resetFeatures } from "./common";
import { AppEventManager, AppEvents } from "./common/app-events";
import { db } from "./common/db";
@@ -63,7 +59,7 @@ export default function AppEffects() {
await refreshNavItems();
await updateLastSynced();
await initUser();
- await resetNotices();
+ // await resetNotices();
setIsVaultCreated(await db.vault.exists());
await FeatureDialog.show({ featureName: "highlights" });
diff --git a/apps/web/src/common/notices.ts b/apps/web/src/common/notices.ts
index d1c13eb2b..8727e633d 100644
--- a/apps/web/src/common/notices.ts
+++ b/apps/web/src/common/notices.ts
@@ -89,9 +89,6 @@ export async function scheduleFullBackups() {
export async function shouldAddAutoBackupsDisabledNotice() {
if (isIgnored("autoBackupsOff")) return false;
- const user = await db.user.getUser();
- if (!user) return false;
-
const backupInterval = Config.get("backupReminderOffset", 0);
return backupInterval === 0;
}
@@ -201,9 +198,11 @@ function isIgnored(key: keyof typeof NoticesData) {
let openedToast: { hide: () => void } | null = null;
async function saveBackup(mode: "full" | "partial" = "partial") {
+ if (IS_TESTING) return;
+
if (IS_DESKTOP_APP) {
await createBackup({ noVerify: true, mode, background: true });
- } else if (!IS_TESTING) {
+ } else {
if (openedToast !== null) return;
openedToast = showToast(
"success",
diff --git a/apps/web/src/stores/app-store.ts b/apps/web/src/stores/app-store.ts
index a025ca545..48ae8a2a4 100644
--- a/apps/web/src/stores/app-store.ts
+++ b/apps/web/src/stores/app-store.ts
@@ -29,7 +29,7 @@ import { store as reminderStore } from "./reminder-store";
import { store as settingStore } from "./setting-store";
import BaseStore from "./index";
import { showToast } from "../utils/toast";
-import { Notice, resetNotices } from "../common/notices";
+import { Notice } from "../common/notices";
import { EV, EVENTS, SYNC_CHECK_IDS, SyncOptions } from "@notesnook/core";
import { logger } from "../utils/logger";
import Config from "../utils/config";
@@ -173,7 +173,7 @@ class AppStore extends BaseStore<AppStore> {
logger.measure("refreshing app");
await this.updateLastSynced();
- await resetNotices();
+ // await resetNotices();
await noteStore.refresh();
await notebookStore.refresh();
await reminderStore.refresh();