mirror of
https://github.com/streetwriters/notesnook.git
synced 2025-12-23 23:19:40 +01:00
fix creating new notebook
This commit is contained in:
@@ -158,7 +158,8 @@ export class AddNotebookDialog extends React.Component {
|
|||||||
});
|
});
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (notesnook) {
|
let toEdit = null;
|
||||||
|
if (notebook) {
|
||||||
toEdit = db.notebooks.notebook(notebook.id).data;
|
toEdit = db.notebooks.notebook(notebook.id).data;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -172,7 +173,8 @@ export class AddNotebookDialog extends React.Component {
|
|||||||
this.currentInputValue = null;
|
this.currentInputValue = null;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (notesnook) {
|
|
||||||
|
if (notebook) {
|
||||||
if (this.topicsToDelete?.length > 0) {
|
if (this.topicsToDelete?.length > 0) {
|
||||||
await db.notebooks
|
await db.notebooks
|
||||||
.notebook(toEdit.id)
|
.notebook(toEdit.id)
|
||||||
@@ -203,7 +205,8 @@ export class AddNotebookDialog extends React.Component {
|
|||||||
await db.notebooks.add({
|
await db.notebooks.add({
|
||||||
title: this.title,
|
title: this.title,
|
||||||
description: this.description,
|
description: this.description,
|
||||||
topics: prevTopics
|
topics: prevTopics,
|
||||||
|
id:null
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
useMenuStore.getState().setMenuPins();
|
useMenuStore.getState().setMenuPins();
|
||||||
@@ -286,7 +289,7 @@ export class AddNotebookDialog extends React.Component {
|
|||||||
descFocused: false,
|
descFocused: false,
|
||||||
titleFocused: false,
|
titleFocused: false,
|
||||||
editTopic: false,
|
editTopic: false,
|
||||||
notesnook: null
|
notebook: null
|
||||||
});
|
});
|
||||||
}}
|
}}
|
||||||
statusBarTranslucent={false}
|
statusBarTranslucent={false}
|
||||||
|
|||||||
Reference in New Issue
Block a user