1
0
mirror of https://github.com/laurent22/joplin.git synced 2024-12-24 10:27:10 +02:00

iOS: Fixed bug that was preventing images from displaying

This commit is contained in:
Laurent Cozic 2019-06-19 23:16:37 +01:00
parent 267436a00d
commit f6688a65ae
2 changed files with 7 additions and 3 deletions

View File

@ -168,11 +168,14 @@ class NoteBodyViewer extends Component {
// https://github.com/react-native-community/react-native-webview/issues/376
// However, if we add the <meta> tag as described there, it is no longer necessary and WebKit can be used!
// https://github.com/react-native-community/react-native-webview/issues/312#issuecomment-501991406
//
// However, on iOS, due to the bug below, we cannot use WebKit:
// https://github.com/react-native-community/react-native-webview/issues/312#issuecomment-503754654
return (
<View style={style}>
<WebView
useWebKit={true}
useWebKit={Platform.OS !== 'ios'}
style={webViewStyle}
source={source}
injectedJavaScript={injectedJs.join('\n')}

View File

@ -364,8 +364,9 @@ class ScreenHeaderComponent extends Component {
const addFolderChildren = (folders, pickerItems, indent) => {
folders.sort((a, b) => {
if (!a || !b) return -1; // No idea why "a" was undefined at one point
return a.title.toLowerCase() < b.title.toLowerCase() ? -1 : +1;
const aTitle = a && a.title ? a.title : '';
const bTitle = b && b.title ? b.title : '';
return aTitle.toLowerCase() < bTitle.toLowerCase() ? -1 : +1;
});
for (let i = 0; i < folders.length; i++) {