mirror of
https://github.com/zhigang1992/react-native.git
synced 2026-05-15 09:27:05 +08:00
Merge AlertIOS with Alert (#23318)
Summary: Itwas merged AlertIOS into Alert and removed type parameter from Alert.alert line 60 at Alert.js [AlertIOS] [Change and Replace] - Merge AlertIOS into Alert. Pull Request resolved: https://github.com/facebook/react-native/pull/23318 Reviewed By: mjesun Differential Revision: D14031421 Pulled By: cpojer fbshipit-source-id: 98db173adeb65aa90d309f8a583993bc0cddb6e1
This commit is contained in:
committed by
Facebook Github Bot
parent
4ac65f5413
commit
e2bd7db732
@@ -13,7 +13,7 @@
|
||||
const React = require('react');
|
||||
const ReactNative = require('react-native');
|
||||
const {
|
||||
AlertIOS,
|
||||
Alert,
|
||||
PushNotificationIOS,
|
||||
StyleSheet,
|
||||
Text,
|
||||
@@ -110,20 +110,16 @@ class NotificationExample extends React.Component<{}> {
|
||||
}
|
||||
|
||||
_onRegistered(deviceToken) {
|
||||
AlertIOS.alert(
|
||||
'Registered For Remote Push',
|
||||
`Device Token: ${deviceToken}`,
|
||||
[
|
||||
{
|
||||
text: 'Dismiss',
|
||||
onPress: null,
|
||||
},
|
||||
],
|
||||
);
|
||||
Alert.alert('Registered For Remote Push', `Device Token: ${deviceToken}`, [
|
||||
{
|
||||
text: 'Dismiss',
|
||||
onPress: null,
|
||||
},
|
||||
]);
|
||||
}
|
||||
|
||||
_onRegistrationError(error) {
|
||||
AlertIOS.alert(
|
||||
Alert.alert(
|
||||
'Failed To Register For Remote Push',
|
||||
`Error (${error.code}): ${error.message}`,
|
||||
[
|
||||
@@ -142,7 +138,7 @@ class NotificationExample extends React.Component<{}> {
|
||||
category: ${notification.getCategory()};\n
|
||||
content-available: ${notification.getContentAvailable()}.`;
|
||||
|
||||
AlertIOS.alert('Push Notification Received', result, [
|
||||
Alert.alert('Push Notification Received', result, [
|
||||
{
|
||||
text: 'Dismiss',
|
||||
onPress: null,
|
||||
@@ -151,7 +147,7 @@ class NotificationExample extends React.Component<{}> {
|
||||
}
|
||||
|
||||
_onLocalNotification(notification) {
|
||||
AlertIOS.alert(
|
||||
Alert.alert(
|
||||
'Local Notification Received',
|
||||
'Alert message: ' + notification.getMessage(),
|
||||
[
|
||||
|
||||
Reference in New Issue
Block a user