Browse Source

Remove annoying alert

Mathieu Acthernoene 5 years ago
parent
commit
b8adb1322b
1 changed files with 1 additions and 11 deletions
  1. 1
    11
      example/App.js

+ 1
- 11
example/App.js View File

81
 
81
 
82
     Permissions.request(permission, options)
82
     Permissions.request(permission, options)
83
       .then(result => {
83
       .then(result => {
84
-        this.setState({
85
-          status: {...this.state.status, [permission]: result},
86
-        });
87
-
88
-        if (result != 'authorized') {
89
-          Alert.alert(
90
-            'Whoops!',
91
-            'There was a problem getting your permission. Please enable it from settings.',
92
-            [{text: 'Cancel', style: 'cancel'}],
93
-          );
94
-        }
84
+        this.setState({status: {...this.state.status, [permission]: result}});
95
       })
85
       })
96
       .catch(error => console.warn(error));
86
       .catch(error => console.warn(error));
97
   };
87
   };