mobile: reconnect messaging when app reloads

This commit is contained in:
ammarahm-ed
2022-11-09 11:21:14 +05:00
parent 10904d13c2
commit a806f6813a

View File

@@ -121,8 +121,12 @@ const Editor = React.memo(
const onError = useCallback(() => {
editor.setLoading(true);
console.log("loading editor");
if (useGeckoView) {
//@ts-ignore
editor.ref?.connectMessagingPort();
}
setTimeout(() => editor.setLoading(false), 10);
}, [editor]);
}, [editor, useGeckoView]);
useEffect(() => {
eSubscribeEvent("webview_reset", onError);