You've already forked joplin
mirror of
https://github.com/laurent22/joplin.git
synced 2025-06-15 23:00:36 +02:00
iOS: various fixes
This commit is contained in:
@ -1,5 +1,5 @@
|
||||
const React = require('react'); const Component = React.Component;
|
||||
const { WebView, View, Linking } = require('react-native');
|
||||
const { Platform, WebView, View, Linking } = require('react-native');
|
||||
const { globalStyle } = require('lib/components/global-style.js');
|
||||
const { Resource } = require('lib/models/resource.js');
|
||||
const { reg } = require('lib/registry.js');
|
||||
@ -52,11 +52,17 @@ class NoteBodyViewer extends Component {
|
||||
const html = this.mdToHtml_.render(note ? note.body : '', this.props.webViewStyle, mdOptions);
|
||||
|
||||
let webViewStyle = {}
|
||||
webViewStyle.opacity = this.state.webViewLoaded ? 1 : 0.01;
|
||||
// On iOS, the onLoadEnd() event is never fired so always
|
||||
// display the webview (don't do the little trick
|
||||
// to avoid the white flash).
|
||||
if (Platform.OS !== 'ios') {
|
||||
webViewStyle.opacity = this.state.webViewLoaded ? 1 : 0.01;
|
||||
}
|
||||
|
||||
return (
|
||||
<View style={style}>
|
||||
<WebView
|
||||
scalesPageToFit={false}
|
||||
style={webViewStyle}
|
||||
source={{ html: html }}
|
||||
onLoadEnd={() => this.onLoadEnd()}
|
||||
|
Reference in New Issue
Block a user