Pārlūkot izejas kodu

Remove annoying alert

Mathieu Acthernoene 5 gadus atpakaļ
vecāks
revīzija
b8adb1322b
1 mainītis faili ar 1 papildinājumiem un 11 dzēšanām
  1. 1
    11
      example/App.js

+ 1
- 11
example/App.js Parādīt failu

@@ -81,17 +81,7 @@ export default class App extends React.Component<{}, State> {
81 81
 
82 82
     Permissions.request(permission, options)
83 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 86
       .catch(error => console.warn(error));
97 87
   };