1
0
mirror of https://github.com/laurent22/joplin.git synced 2025-12-02 22:49:09 +02:00

Disable non-working ShareExtension on iOS

This commit is contained in:
Laurent Cozic
2018-10-03 08:17:37 +01:00
parent 377adea51d
commit d1f4c5be18
4 changed files with 71 additions and 55 deletions

View File

@@ -1,5 +1,5 @@
const React = require('react'); const Component = React.Component;
const { AppState, Keyboard, NativeModules, BackHandler } = require('react-native');
const { AppState, Keyboard, NativeModules, BackHandler, Platform } = require('react-native');
const { SafeAreaView } = require('react-navigation');
const { connect, Provider } = require('react-redux');
const { BackButtonService } = require('lib/services/back-button.js');
@@ -529,23 +529,25 @@ class AppComponent extends React.Component {
});
}
try {
const { type, value } = await ShareExtension.data();
if (Platform.OS !== 'ios') {
try {
const { type, value } = await ShareExtension.data();
if (type != "" && this.props.selectedFolderId) {
if (type != "" && this.props.selectedFolderId) {
this.props.dispatch({
type: 'NAV_GO',
routeName: 'Note',
noteId: null,
sharedData: {type: type, value: value},
folderId: this.props.selectedFolderId,
itemType: 'note',
});
this.props.dispatch({
type: 'NAV_GO',
routeName: 'Note',
noteId: null,
sharedData: {type: type, value: value},
folderId: this.props.selectedFolderId,
itemType: 'note',
});
}
} catch(e) {
reg.logger().error('Error in ShareExtension.data', e);
}
} catch(e) {
reg.logger().error('Error in ShareExtension.data', e);
}
BackButtonService.initialize(this.backButtonHandler_);