Use Linking.openSettings() so it works on Android (#865)
This commit is contained in:
@@ -4,10 +4,6 @@ import {Linking} from 'react-native'
|
|||||||
import {isWeb} from 'platform/detection'
|
import {isWeb} from 'platform/detection'
|
||||||
import {Alert} from 'view/com/util/Alert'
|
import {Alert} from 'view/com/util/Alert'
|
||||||
|
|
||||||
const openSettings = () => {
|
|
||||||
Linking.openURL('app-settings:')
|
|
||||||
}
|
|
||||||
|
|
||||||
const openPermissionAlert = (perm: string) => {
|
const openPermissionAlert = (perm: string) => {
|
||||||
Alert.alert(
|
Alert.alert(
|
||||||
'Permission needed',
|
'Permission needed',
|
||||||
@@ -17,7 +13,7 @@ const openPermissionAlert = (perm: string) => {
|
|||||||
text: 'Cancel',
|
text: 'Cancel',
|
||||||
style: 'cancel',
|
style: 'cancel',
|
||||||
},
|
},
|
||||||
{text: 'Open Settings', onPress: () => openSettings()},
|
{text: 'Open Settings', onPress: () => Linking.openSettings()},
|
||||||
],
|
],
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user