Getting rid of Toast in Dev Loading View post Native Module is released (#35888)

Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/35888

Changelog:
[Android][Removed] - For supporting Dev Loading View across multiple platforms, changed the Loading View of Android to rely on the native implementation instead of Toast. Getting rid of the JS changes relying on Toast for Dev Loading View now that the native module is released.

Reviewed By: rshest

Differential Revision: D42599220

fbshipit-source-id: ec7098b508c766c07384d48d3bffed075b092b72
This commit is contained in:
Arushi Kesarwani 2023-01-19 21:15:03 -08:00 коммит произвёл Facebook GitHub Bot
Родитель 9cf35bfcc4
Коммит 208f559505
1 изменённых файлов: 0 добавлений и 10 удалений

Просмотреть файл

@ -8,14 +8,10 @@
* @flow strict-local
*/
import ToastAndroid from '../Components/ToastAndroid/ToastAndroid';
import processColor from '../StyleSheet/processColor';
import Appearance from './Appearance';
import NativeDevLoadingView from './NativeDevLoadingView';
const TOAST_SHORT_DELAY = 2000;
let isVisible = false;
module.exports = {
showMessage(message: string, type: 'load' | 'refresh') {
if (NativeDevLoadingView) {
@ -40,12 +36,6 @@ module.exports = {
typeof textColor === 'number' ? textColor : null,
typeof backgroundColor === 'number' ? backgroundColor : null,
);
} else if (!isVisible) {
ToastAndroid.show(message, ToastAndroid.SHORT);
isVisible = true;
setTimeout(() => {
isVisible = false;
}, TOAST_SHORT_DELAY);
}
},
hide() {