fix: disable local only mode for logged out users

This commit is contained in:
Ammar Ahmed
2022-07-08 18:23:20 +05:00
parent e47bfb4bd4
commit cf4ce36480

View File

@@ -514,7 +514,7 @@ export const useActions = ({ close = () => {}, item }) => {
} }
async function toggleLocalOnly() { async function toggleLocalOnly() {
if (!checkNoteSynced()) return; if (!checkNoteSynced() || !user) return;
db.notes.note(item.id).localOnly(); db.notes.note(item.id).localOnly();
Navigation.queueRoutesForUpdate( Navigation.queueRoutesForUpdate(
'TaggedNotes', 'TaggedNotes',
@@ -569,7 +569,7 @@ export const useActions = ({ close = () => {}, item }) => {
icon: 'plus', icon: 'plus',
func: async () => { func: async () => {
close(); close();
await sleep(300); await sleep(500);
MoveNotes.present(db.notebooks.notebook(item.notebookId).data, item); MoveNotes.present(db.notebooks.notebook(item.notebookId).data, item);
} }
}, },