mirror of
https://github.com/BlueWallet/BlueWallet.git
synced 2025-02-24 07:28:07 +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 RNFS from 'react-native-fs';
|
||||||
import Share from 'react-native-share';
|
import Share from 'react-native-share';
|
||||||
import loc from '../loc';
|
import loc from '../loc';
|
||||||
import { getSystemName } from 'react-native-device-info';
|
|
||||||
import DocumentPicker from 'react-native-document-picker';
|
import DocumentPicker from 'react-native-document-picker';
|
||||||
|
import isCatalyst from 'react-native-is-catalyst';
|
||||||
const LocalQRCode = require('@remobile/react-native-qrcode-local-image');
|
const LocalQRCode = require('@remobile/react-native-qrcode-local-image');
|
||||||
|
|
||||||
const isDesktop = getSystemName() === 'Mac OS X';
|
|
||||||
|
|
||||||
const writeFileAndExport = async function (filename, contents) {
|
const writeFileAndExport = async function (filename, contents) {
|
||||||
if (Platform.OS === 'ios') {
|
if (Platform.OS === 'ios') {
|
||||||
const filePath = RNFS.TemporaryDirectoryPath + `/${filename}`;
|
const filePath = RNFS.TemporaryDirectoryPath + `/${filename}`;
|
||||||
await RNFS.writeFile(filePath, contents);
|
await RNFS.writeFile(filePath, contents);
|
||||||
Share.open({
|
Share.open({
|
||||||
url: 'file://' + filePath,
|
url: 'file://' + filePath,
|
||||||
saveToFiles: isDesktop,
|
saveToFiles: isCatalyst,
|
||||||
})
|
})
|
||||||
.catch(error => {
|
.catch(error => {
|
||||||
console.log(error);
|
console.log(error);
|
||||||
|
|
|
@ -25,9 +25,8 @@ import Privacy from '../../Privacy';
|
||||||
import { BitcoinUnit } from '../../models/bitcoinUnits';
|
import { BitcoinUnit } from '../../models/bitcoinUnits';
|
||||||
import loc from '../../loc';
|
import loc from '../../loc';
|
||||||
import { BlueCurrentTheme } from '../../components/themes';
|
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 currency = require('../../blue_modules/currency');
|
||||||
const isDesktop = getSystemName() === 'Mac OS X';
|
|
||||||
|
|
||||||
export default class SendCreate extends Component {
|
export default class SendCreate extends Component {
|
||||||
constructor(props) {
|
constructor(props) {
|
||||||
|
@ -59,7 +58,7 @@ export default class SendCreate extends Component {
|
||||||
await RNFS.writeFile(filePath, this.state.tx);
|
await RNFS.writeFile(filePath, this.state.tx);
|
||||||
Share.open({
|
Share.open({
|
||||||
url: 'file://' + filePath,
|
url: 'file://' + filePath,
|
||||||
saveToFiles: isDesktop,
|
saveToFiles: isCatalyst,
|
||||||
})
|
})
|
||||||
.catch(error => {
|
.catch(error => {
|
||||||
console.log(error);
|
console.log(error);
|
||||||
|
|
|
@ -29,11 +29,10 @@ import loc from '../../loc';
|
||||||
import { useTheme, useRoute, useNavigation } from '@react-navigation/native';
|
import { useTheme, useRoute, useNavigation } from '@react-navigation/native';
|
||||||
import RNFS from 'react-native-fs';
|
import RNFS from 'react-native-fs';
|
||||||
import Share from 'react-native-share';
|
import Share from 'react-native-share';
|
||||||
import { getSystemName } from 'react-native-device-info';
|
|
||||||
import { BlueStorageContext } from '../../blue_modules/storage-context';
|
import { BlueStorageContext } from '../../blue_modules/storage-context';
|
||||||
import Notifications from '../../blue_modules/notifications';
|
import Notifications from '../../blue_modules/notifications';
|
||||||
|
import isCatalyst from 'react-native-is-catalyst';
|
||||||
const prompt = require('../../blue_modules/prompt');
|
const prompt = require('../../blue_modules/prompt');
|
||||||
const isDesktop = getSystemName() === 'Mac OS X';
|
|
||||||
|
|
||||||
const styles = StyleSheet.create({
|
const styles = StyleSheet.create({
|
||||||
root: {
|
root: {
|
||||||
|
@ -258,7 +257,7 @@ const WalletDetails = () => {
|
||||||
await RNFS.writeFile(filePath, contents);
|
await RNFS.writeFile(filePath, contents);
|
||||||
Share.open({
|
Share.open({
|
||||||
url: 'file://' + filePath,
|
url: 'file://' + filePath,
|
||||||
saveToFiles: isDesktop,
|
saveToFiles: isCatalyst,
|
||||||
})
|
})
|
||||||
.catch(error => {
|
.catch(error => {
|
||||||
console.log(error);
|
console.log(error);
|
||||||
|
|
Loading…
Add table
Reference in a new issue