2016-10-11 20:08:54 +03:00
|
|
|
/**
|
2021-12-31 02:08:43 +03:00
|
|
|
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
2016-10-11 20:08:54 +03:00
|
|
|
*
|
2018-02-17 05:24:55 +03:00
|
|
|
* This source code is licensed under the MIT license found in the
|
|
|
|
* LICENSE file in the root directory of this source tree.
|
2016-10-11 20:08:54 +03:00
|
|
|
*
|
2018-05-11 05:06:46 +03:00
|
|
|
* @format
|
|
|
|
*/
|
|
|
|
|
2019-05-23 04:19:10 +03:00
|
|
|
import NativeDialogManagerAndroid from '../NativeModules/specs/NativeDialogManagerAndroid';
|
2016-10-11 20:08:54 +03:00
|
|
|
|
|
|
|
function emptyCallback() {}
|
|
|
|
|
|
|
|
module.exports = {
|
2021-11-03 08:10:46 +03:00
|
|
|
alertWithArgs: function (args, callback) {
|
2016-10-11 20:08:54 +03:00
|
|
|
// TODO(5998984): Polyfill it correctly with DialogManagerAndroid
|
2019-05-23 04:19:10 +03:00
|
|
|
if (!NativeDialogManagerAndroid) {
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
NativeDialogManagerAndroid.showAlert(
|
2018-05-11 05:06:46 +03:00
|
|
|
args,
|
|
|
|
emptyCallback,
|
|
|
|
callback || emptyCallback,
|
|
|
|
);
|
2016-10-11 20:08:54 +03:00
|
|
|
},
|
|
|
|
};
|