Add alert before closing
This commit is contained in:
@@ -1,5 +1,11 @@
|
||||
// Current version of react-native-restart doesn't work with our ios setup
|
||||
// therefore we have a fork and use different libraries on the platforms
|
||||
import RNExitApp from 'react-native-exit-app-v2'
|
||||
import { Alert } from 'react-native'
|
||||
|
||||
export const restartApp = RNExitApp.exitApp
|
||||
export const restartApp = () => {
|
||||
Alert.alert('Closing app', 'App is shutting down. Please restart.')
|
||||
setTimeout(() => {
|
||||
RNExitApp.exitApp()
|
||||
}, 3000)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user