A fully open source & end-to-end encrypted note taking alternative to Evernote.
TypeScript asp-net-coredotnet-coreelectronfosshacktoberfestnote-managmentnote-takingnote-taking-appnotebooknotesnotes-appopen-sourceopensourceprivacyproductivityreactreact-nativereactjsself-hosted
mobile: use word-counter from editor
ammarahm-edcc446f99ee62
diff --git a/packages/editor-mobile/src/components/statusbar.tsx b/packages/editor-mobile/src/components/statusbar.tsxindex 4dbe6411c..bfaec4236 100644--- a/packages/editor-mobile/src/components/statusbar.tsx+++ b/packages/editor-mobile/src/components/statusbar.tsx@@ -18,6 +18,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.*/import React, { RefObject, useEffect, useRef, useState } from "react";+import { getTotalWords, Editor } from "@notesnook/editor";function StatusBar({ container }: { container: RefObject<HTMLDivElement> }) {const [status, setStatus] = useState({@@ -66,7 +67,7 @@ function StatusBar({ container }: { container: RefObject<HTMLDivElement> }) {useEffect(() => {clearInterval(interval.current);interval.current = setInterval(() => {- const words = editor?.storage?.characterCount?.words() + " words";+ const words = getTotalWords(editor as Editor) + " words";if (currentWords.current === words) return;setWords(words);}, 3000) as unknown as number;