From e2db02887c2b6cae3227111d3cfd7ef92692d238 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tam=C3=A1s=20Hetesi?= Date: Fri, 26 Mar 2021 10:02:16 +0100 Subject: [PATCH] Mobile: Fix flash of white when loading note bodies (#4629) Refs #4450 --- .../components/NoteBodyViewer/NoteBodyViewer.tsx | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/packages/app-mobile/components/NoteBodyViewer/NoteBodyViewer.tsx b/packages/app-mobile/components/NoteBodyViewer/NoteBodyViewer.tsx index 3dc60e849..14a66bae8 100644 --- a/packages/app-mobile/components/NoteBodyViewer/NoteBodyViewer.tsx +++ b/packages/app-mobile/components/NoteBodyViewer/NoteBodyViewer.tsx @@ -1,4 +1,4 @@ -import { useRef, useMemo, useCallback } from 'react'; +import { useRef, useCallback } from 'react'; import Setting from '@joplin/lib/models/Setting'; import useSource from './hooks/useSource'; @@ -27,13 +27,13 @@ interface Props { onLoadEnd?: Function; } +const webViewStyle = { + backgroundColor: 'transparent', +}; + export default function NoteBodyViewer(props: Props) { const theme = themeStyle(props.themeId); - const webViewStyle: any = useMemo(() => { - return { backgroundColor: theme.backgroundColor }; - }, [theme.backgroundColor]); - const dialogBoxRef = useRef(null); const { source, injectedJs } = useSource(