Skip to content

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

web: reset default notebook & tag feature if applicable (#8628)

01zulfibb682a6f6e7c
diff --git a/apps/web/src/common/index.ts b/apps/web/src/common/index.ts
index 4a29ed0f0..1362b3c56 100644
--- a/apps/web/src/common/index.ts
+++ b/apps/web/src/common/index.ts
@@ -514,7 +514,8 @@ export async function resetFeatures() {
"disableTrashCleanup",
"syncControls",
"fullOfflineMode",
- "appLock"
+ "appLock",
+ "defaultNotebookAndTag"
]);
if (!features.appLock.isAllowed) {
await useKeyStore.getState().disable();
@@ -553,4 +554,9 @@ export async function resetFeatures() {
if (!features.fullOfflineMode.isAllowed)
useSettingStore.getState().toggleFullOfflineMode(false);
+
+ if (!features.defaultNotebookAndTag.isAllowed) {
+ db.settings.setDefaultNotebook(undefined);
+ db.settings.setDefaultTag(undefined);
+ }
}