From 3a4d79e77525378de318f746a5f9f12b1d0b84fa Mon Sep 17 00:00:00 2001 From: Nicola Corti Date: Tue, 3 Oct 2023 13:24:09 -0700 Subject: [PATCH] Fix broken Loading/Refreshing indicator on Android Summary: The Loading.../Refreshing... indicator is currently broken on Android. The reason is related to D42599220 We used to have a Toast shown to users on Android as a fallback, but as the DevLoadingView is not always loaded as a module in the core package, this ends up in the banner never beign shown to the user (on RN Tester or template apps). Changelog: [Android] [Fixed] - Fix broken Loading/Refreshing indicator on Android Reviewed By: cipolleschi Differential Revision: D49876757 fbshipit-source-id: 400e002327ebca908e3e7a7f81c5066888ac4e9b --- .../main/java/com/facebook/react/shell/MainReactPackage.java | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/shell/MainReactPackage.java b/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/shell/MainReactPackage.java index 5fa72a0ffd02b0..41e4a62c2fc1ce 100644 --- a/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/shell/MainReactPackage.java +++ b/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/shell/MainReactPackage.java @@ -25,6 +25,7 @@ import com.facebook.react.modules.blob.FileReaderModule; import com.facebook.react.modules.camera.ImageStoreManager; import com.facebook.react.modules.clipboard.ClipboardModule; +import com.facebook.react.modules.devloading.DevLoadingModule; import com.facebook.react.modules.devtoolssettings.DevToolsSettingsManagerModule; import com.facebook.react.modules.dialog.DialogModule; import com.facebook.react.modules.fresco.FrescoModule; @@ -72,6 +73,7 @@ AppearanceModule.class, AppStateModule.class, BlobModule.class, + DevLoadingModule.class, FileReaderModule.class, ClipboardModule.class, DialogModule.class, @@ -113,6 +115,8 @@ public MainReactPackage(MainPackageConfig config) { return new AppStateModule(context); case BlobModule.NAME: return new BlobModule(context); + case DevLoadingModule.NAME: + return new DevLoadingModule(context); case FileReaderModule.NAME: return new FileReaderModule(context); case ClipboardModule.NAME: @@ -371,6 +375,7 @@ public ReactModuleInfoProvider getReactModuleInfoProvider() { AppearanceModule.class, AppStateModule.class, BlobModule.class, + DevLoadingModule.class, FileReaderModule.class, ClipboardModule.class, DialogModule.class,