mirror of
https://github.com/streetwriters/notesnook.git
synced 2025-12-18 20:49:36 +01:00
editor: update word count immediately after note is loaded
Previously when opening note, the word count on mobile would be 0, then update to actual word count. This has been fixed so correct word count shows when opening not without any delay.
This commit is contained in:
@@ -123,12 +123,13 @@ export function useEditorController(update: () => void): EditorController {
|
||||
from,
|
||||
to
|
||||
});
|
||||
|
||||
statusBar.current?.updateWords();
|
||||
break;
|
||||
}
|
||||
case "native:html":
|
||||
htmlContentRef.current = value;
|
||||
update();
|
||||
statusBar.current?.updateWords();
|
||||
break;
|
||||
case "native:theme":
|
||||
useEditorThemeStore.getState().setColors(message.value);
|
||||
@@ -156,7 +157,6 @@ export function useEditorController(update: () => void): EditorController {
|
||||
if (isSafari) {
|
||||
root = window;
|
||||
}
|
||||
console.log("recreating messaging");
|
||||
root.addEventListener("message", onMessage);
|
||||
|
||||
return () => {
|
||||
|
||||
Reference in New Issue
Block a user