Mobile: Fix flash of white when loading note bodies (#4629)

Refs #4450
pull/4738/head
Tamás Hetesi 2021-03-26 10:02:16 +01:00 committed by GitHub
parent 0da3881aa6
commit e2db02887c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 5 additions and 5 deletions

View File

@ -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(