mirror of
https://github.com/streetwriters/notesnook.git
synced 2025-12-23 23:19:40 +01:00
show notebooks at fixed positions
This commit is contained in:
@@ -89,9 +89,11 @@ const MoveNoteComponent = ({close, note, setNote}) => {
|
|||||||
const [state, dispatch] = useTracked();
|
const [state, dispatch] = useTracked();
|
||||||
const {colors} = state;
|
const {colors} = state;
|
||||||
|
|
||||||
const notebooks = useNotebookStore(state =>
|
const nbs = useNotebookStore(state =>
|
||||||
state.notebooks.filter(n => n.type === 'notebook')
|
state.notebooks.filter(n => n?.type === 'notebook')
|
||||||
);
|
);
|
||||||
|
let notebooks = [...db.notebooks.all];
|
||||||
|
|
||||||
const selectedItemsList = useSelectionStore(state => state.selectedItemsList);
|
const selectedItemsList = useSelectionStore(state => state.selectedItemsList);
|
||||||
const setNotebooks = useNotebookStore(state => state.setNotebooks);
|
const setNotebooks = useNotebookStore(state => state.setNotebooks);
|
||||||
const [expanded, setExpanded] = useState('');
|
const [expanded, setExpanded] = useState('');
|
||||||
@@ -146,7 +148,7 @@ const MoveNoteComponent = ({close, note, setNote}) => {
|
|||||||
if (note && note.id) {
|
if (note && note.id) {
|
||||||
setNote({...db.notes.note(note.id).data});
|
setNote({...db.notes.note(note.id).data});
|
||||||
requestAnimationFrame(() => {
|
requestAnimationFrame(() => {
|
||||||
layoutmanager.withSpringAnimation(500);
|
//layoutmanager.withSpringAnimation(500);
|
||||||
Navigation.setRoutesToUpdate([
|
Navigation.setRoutesToUpdate([
|
||||||
Navigation.routeNames.NotesPage,
|
Navigation.routeNames.NotesPage,
|
||||||
Navigation.routeNames.Favorites,
|
Navigation.routeNames.Favorites,
|
||||||
@@ -173,7 +175,7 @@ const MoveNoteComponent = ({close, note, setNote}) => {
|
|||||||
if (note && note.id) {
|
if (note && note.id) {
|
||||||
setNote({...db.notes.note(note.id).data});
|
setNote({...db.notes.note(note.id).data});
|
||||||
requestAnimationFrame(() => {
|
requestAnimationFrame(() => {
|
||||||
layoutmanager.withSpringAnimation(500);
|
//layoutmanager.withSpringAnimation(500);
|
||||||
Navigation.setRoutesToUpdate([
|
Navigation.setRoutesToUpdate([
|
||||||
Navigation.routeNames.NotesPage,
|
Navigation.routeNames.NotesPage,
|
||||||
Navigation.routeNames.Favorites,
|
Navigation.routeNames.Favorites,
|
||||||
|
|||||||
Reference in New Issue
Block a user