mirror of
https://github.com/streetwriters/notesnook.git
synced 2026-08-29 10:09:26 +02:00
mobile: remove unused ignoreEdit handling
Signed-off-by: kashaf-ansari-dev <kashafansari3108@gmail.com>
This commit is contained in:
committed by
Ammar Ahmed
parent
02c60d14c7
commit
28f2ffdbf7
@@ -90,7 +90,6 @@ export type SavePayload = {
|
||||
data?: string;
|
||||
type?: "tiptap";
|
||||
sessionHistoryId?: number;
|
||||
ignoreEdit: boolean;
|
||||
tabId: string;
|
||||
pendingChanges?: boolean;
|
||||
sourceNoteId?: string;
|
||||
|
||||
@@ -149,7 +149,7 @@ const showActionsheet = async () => {
|
||||
}
|
||||
};
|
||||
|
||||
type ContentMessage = { html: string; ignoreEdit: boolean };
|
||||
type ContentMessage = { html: string };
|
||||
|
||||
export const useEditorEvents = (
|
||||
editor: useEditorType,
|
||||
@@ -422,7 +422,6 @@ export const useEditorEvents = (
|
||||
noteId: saveNoteId,
|
||||
sourceNoteId: editorMessage.noteId,
|
||||
tabId: editorMessage.tabId,
|
||||
ignoreEdit: (editorMessage.value as ContentMessage).ignoreEdit,
|
||||
pendingChanges: editorMessage.value?.pendingChanges,
|
||||
pendingChangesAt: editorMessage.value?.pendingChangesAt
|
||||
});
|
||||
@@ -435,7 +434,6 @@ export const useEditorEvents = (
|
||||
noteId: saveNoteId,
|
||||
sourceNoteId: editorMessage.noteId,
|
||||
tabId: editorMessage.tabId,
|
||||
ignoreEdit: false,
|
||||
pendingChanges: editorMessage.value?.pendingChanges,
|
||||
pendingChangesAt: editorMessage.value?.pendingChangesAt
|
||||
});
|
||||
|
||||
@@ -260,7 +260,6 @@ export const useEditor = (
|
||||
id,
|
||||
data,
|
||||
type,
|
||||
ignoreEdit,
|
||||
sessionHistoryId: currentSessionHistoryId,
|
||||
tabId,
|
||||
pendingChanges,
|
||||
@@ -343,11 +342,6 @@ export const useEditor = (
|
||||
|
||||
noteData.title = title;
|
||||
|
||||
if (ignoreEdit) {
|
||||
DatabaseLogger.log("Ignoring edits...");
|
||||
noteData.dateEdited = note?.dateEdited;
|
||||
}
|
||||
|
||||
if (data) {
|
||||
noteData.content = {
|
||||
data: data,
|
||||
@@ -984,7 +978,6 @@ export const useEditor = (
|
||||
title,
|
||||
content,
|
||||
type,
|
||||
ignoreEdit,
|
||||
noteId,
|
||||
tabId,
|
||||
pendingChanges,
|
||||
@@ -995,7 +988,6 @@ export const useEditor = (
|
||||
title?: string;
|
||||
content?: string;
|
||||
type: string;
|
||||
ignoreEdit: boolean;
|
||||
tabId: string;
|
||||
pendingChanges?: boolean;
|
||||
sourceNoteId?: string;
|
||||
@@ -1005,7 +997,6 @@ export const useEditor = (
|
||||
`saveContent... title: ${!!title}, content: ${!!content}, noteId: ${noteId}`
|
||||
);
|
||||
if (
|
||||
ignoreEdit ||
|
||||
lock.current ||
|
||||
(currentLoadingNoteId.current &&
|
||||
currentLoadingNoteId.current === noteId)
|
||||
@@ -1014,7 +1005,6 @@ export const useEditor = (
|
||||
|
||||
lock.current: ${lock.current}
|
||||
currentLoadingNoteId.current: ${currentLoadingNoteId.current}
|
||||
ignoreEdit: ${ignoreEdit}
|
||||
`);
|
||||
if (lock.current) {
|
||||
setTimeout(() => {
|
||||
@@ -1051,7 +1041,6 @@ export const useEditor = (
|
||||
data: content,
|
||||
type: "tiptap",
|
||||
id: noteId,
|
||||
ignoreEdit,
|
||||
sessionHistoryId: noteId ? editorSessionHistory.get(noteId) : undefined,
|
||||
tabId: tabId,
|
||||
pendingChanges,
|
||||
@@ -1080,7 +1069,7 @@ export const useEditor = (
|
||||
saveNote(params);
|
||||
}
|
||||
},
|
||||
ignoreEdit ? 0 : 150
|
||||
150
|
||||
);
|
||||
},
|
||||
[editorSessionHistory, withTimer, onChange, saveNote]
|
||||
|
||||
Reference in New Issue
Block a user