瀏覽代碼

Remove annoying alert

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