Skip to content

Commit

Permalink
Mobile: Fixes laurent22#9863: Fix share to Joplin when only "All note…
Browse files Browse the repository at this point in the history
…s" has been opened
  • Loading branch information
personalizedrefrigerator committed Feb 7, 2024
1 parent 01ec640 commit c882d37
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions packages/app-mobile/root.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -981,9 +981,12 @@ class AppComponent extends React.Component {

if (sharedData) {
reg.logger().info('Received shared data');
if (this.props.selectedFolderId) {

// selectedFolderId can be null if "All notes" or a similar screen is open.
const targetFolder = this.props.selectedFolderId ?? (await Folder.defaultFolder())?.id;
if (targetFolder) {
logger.info('Sharing: handleShareData: Processing...');
await handleShared(sharedData, this.props.selectedFolderId, this.props.dispatch);
await handleShared(sharedData, targetFolder, this.props.dispatch);
} else {
reg.logger().info('Cannot handle share - default folder id is not set');
}
Expand Down

0 comments on commit c882d37

Please sign in to comment.