mirror of
https://github.com/BlueWallet/BlueWallet.git
synced 2025-02-23 15:20:55 +01:00
FIX: FIle dialog was not displayed on Big Sur
This commit is contained in:
parent
1b465c06a9
commit
eccb764840
3 changed files with 6 additions and 10 deletions
|
@ -3,19 +3,17 @@ import { PermissionsAndroid, Platform } from 'react-native';
|
|||
import RNFS from 'react-native-fs';
|
||||
import Share from 'react-native-share';
|
||||
import loc from '../loc';
|
||||
import { getSystemName } from 'react-native-device-info';
|
||||
import DocumentPicker from 'react-native-document-picker';
|
||||
import isCatalyst from 'react-native-is-catalyst';
|
||||
const LocalQRCode = require('@remobile/react-native-qrcode-local-image');
|
||||
|
||||
const isDesktop = getSystemName() === 'Mac OS X';
|
||||
|
||||
const writeFileAndExport = async function (filename, contents) {
|
||||
if (Platform.OS === 'ios') {
|
||||
const filePath = RNFS.TemporaryDirectoryPath + `/${filename}`;
|
||||
await RNFS.writeFile(filePath, contents);
|
||||
Share.open({
|
||||
url: 'file://' + filePath,
|
||||
saveToFiles: isDesktop,
|
||||
saveToFiles: isCatalyst,
|
||||
})
|
||||
.catch(error => {
|
||||
console.log(error);
|
||||
|
|
|
@ -25,9 +25,8 @@ import Privacy from '../../Privacy';
|
|||
import { BitcoinUnit } from '../../models/bitcoinUnits';
|
||||
import loc from '../../loc';
|
||||
import { BlueCurrentTheme } from '../../components/themes';
|
||||
import { getSystemName } from 'react-native-device-info';
|
||||
import isCatalyst from 'react-native-is-catalyst';
|
||||
const currency = require('../../blue_modules/currency');
|
||||
const isDesktop = getSystemName() === 'Mac OS X';
|
||||
|
||||
export default class SendCreate extends Component {
|
||||
constructor(props) {
|
||||
|
@ -59,7 +58,7 @@ export default class SendCreate extends Component {
|
|||
await RNFS.writeFile(filePath, this.state.tx);
|
||||
Share.open({
|
||||
url: 'file://' + filePath,
|
||||
saveToFiles: isDesktop,
|
||||
saveToFiles: isCatalyst,
|
||||
})
|
||||
.catch(error => {
|
||||
console.log(error);
|
||||
|
|
|
@ -29,11 +29,10 @@ import loc from '../../loc';
|
|||
import { useTheme, useRoute, useNavigation } from '@react-navigation/native';
|
||||
import RNFS from 'react-native-fs';
|
||||
import Share from 'react-native-share';
|
||||
import { getSystemName } from 'react-native-device-info';
|
||||
import { BlueStorageContext } from '../../blue_modules/storage-context';
|
||||
import Notifications from '../../blue_modules/notifications';
|
||||
import isCatalyst from 'react-native-is-catalyst';
|
||||
const prompt = require('../../blue_modules/prompt');
|
||||
const isDesktop = getSystemName() === 'Mac OS X';
|
||||
|
||||
const styles = StyleSheet.create({
|
||||
root: {
|
||||
|
@ -258,7 +257,7 @@ const WalletDetails = () => {
|
|||
await RNFS.writeFile(filePath, contents);
|
||||
Share.open({
|
||||
url: 'file://' + filePath,
|
||||
saveToFiles: isDesktop,
|
||||
saveToFiles: isCatalyst,
|
||||
})
|
||||
.catch(error => {
|
||||
console.log(error);
|
||||
|
|
Loading…
Add table
Reference in a new issue