From 208f5595055426305a9f23e92546b2ad09a8a52c Mon Sep 17 00:00:00 2001 From: Arushi Kesarwani Date: Thu, 19 Jan 2023 21:15:03 -0800 Subject: [PATCH] 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 --- Libraries/Utilities/LoadingView.android.js | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/Libraries/Utilities/LoadingView.android.js b/Libraries/Utilities/LoadingView.android.js index d578a411592589..b5ffc4d964c8c7 100644 --- a/Libraries/Utilities/LoadingView.android.js +++ b/Libraries/Utilities/LoadingView.android.js @@ -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() {