You've already forked joplin
mirror of
https://github.com/laurent22/joplin.git
synced 2025-07-16 00:14:34 +02:00
Android: Fix file system sync issues (#6943)
This commit is contained in:
@ -1,3 +1,5 @@
|
||||
import debounce from './debounce';
|
||||
|
||||
const { NativeModules, Platform } = require('react-native');
|
||||
|
||||
export interface SharedData {
|
||||
@ -9,7 +11,9 @@ export interface SharedData {
|
||||
const ShareExtension = (NativeModules.ShareExtension) ?
|
||||
{
|
||||
data: () => NativeModules.ShareExtension.data(),
|
||||
close: () => NativeModules.ShareExtension.close(),
|
||||
// we debounce the `close` method, to keep alive permissions of Uris received from the share activity
|
||||
// this is to prevent getting permission denied error while sharing the same file to joplin multiple times in a row
|
||||
close: () => debounce(() => NativeModules.ShareExtension.close(), 3 * 60 * 1000), // close it after 3 minutes
|
||||
shareURL: (Platform.OS === 'ios') ? NativeModules.ShareExtension.getConstants().SHARE_EXTENSION_SHARE_URL : '',
|
||||
} :
|
||||
{
|
||||
|
Reference in New Issue
Block a user