mirror of
https://github.com/streetwriters/notesnook.git
synced 2025-12-18 20:49:36 +01:00
mobile: fix numerous issues with tabs
This commit is contained in:
committed by
Abdullah Atta
parent
6b6ee76c39
commit
ad338aeefc
@@ -149,7 +149,7 @@ export function useEditorController(update: () => void): EditorController {
|
||||
const contentChange = useCallback(
|
||||
(editor: Editor, ignoreEdit?: boolean) => {
|
||||
const currentSessionId = globalThis.sessionId;
|
||||
post(EventTypes.contentchange);
|
||||
post(EventTypes.contentchange, undefined, tab.id, tab.noteId);
|
||||
if (!editor) return;
|
||||
if (typeof timers.current.change === "number") {
|
||||
clearTimeout(timers.current?.change);
|
||||
@@ -198,14 +198,15 @@ export function useEditorController(update: () => void): EditorController {
|
||||
return;
|
||||
}
|
||||
|
||||
logger(
|
||||
"info",
|
||||
"webview message for tab",
|
||||
message.type,
|
||||
tab.id,
|
||||
message.tabId,
|
||||
useTabStore.getState().currentTab
|
||||
);
|
||||
if (tab.id === message.tabId) {
|
||||
logger(
|
||||
"info",
|
||||
message.type,
|
||||
tab.noteId,
|
||||
"Focused:",
|
||||
tab.id === useTabStore.getState().currentTab
|
||||
);
|
||||
}
|
||||
|
||||
const editor = editors[tab.id];
|
||||
switch (type) {
|
||||
|
||||
Reference in New Issue
Block a user