mirror of
https://github.com/streetwriters/notesnook.git
synced 2025-12-16 19:57:52 +01:00
web: disable in-app noticies (temporarily)
This commit is contained in:
@@ -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" });
|
||||
|
||||
@@ -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",
|
||||
|
||||
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user