Mathieu Acthernoene преди 5 години
родител
ревизия
b8adb1322b
променени са 1 файла, в които са добавени 1 реда и са изтрити 11 реда
  1. 1
    11
      example/App.js

+ 1
- 11
example/App.js Целия файл

@@ -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
   };