Correctly batch reportMount calls (#50090)

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

Changelog: [internal]

I refactored `FabricUIManager` in D54547194 / https://github.com/facebook/react-native/pull/43337 and accidentally removed setting this flag to avoid scheduling redundant tasks in the UI thread to report mount. This fixes it.

Reviewed By: javache

Differential Revision: D71387374

fbshipit-source-id: cad8a3ead2434738325560902cbab817e5d5dde7
This commit is contained in:
Rubén Norte
2025-03-26 13:47:29 +00:00
committed by Fabrizio Cucci
parent 4f838c22cd
commit 4e4b9baf3c
@@ -1260,6 +1260,8 @@ public class FabricUIManager
}
if (!mMountNotificationScheduled && !mMountedSurfaceIds.isEmpty()) {
mMountNotificationScheduled = true;
// Notify mount when the effects are visible and prevent mount hooks to
// delay paint.
UiThreadUtil.getUiThreadHandler()