Skip to content

Commit

Permalink
Add missing invocation of item dispatch listeners when forcing batchi…
Browse files Browse the repository at this point in the history
…ng of mount items on Android (#45264)

Summary:
Pull Request resolved: #45264

Changelog: [internal]

We added a flag to fix some issues when committing state updates synchronously from the main thread in #44015 but that implementation was incorrectly not invoking item dispatch listeners after mount.

This adds the missing logic so we can unblock shipping sync state updates.

Reviewed By: javache

Differential Revision: D59319230

fbshipit-source-id: b0ab7e7c79a3315ef29dbb024e62c10444192509
  • Loading branch information
rubennorte authored and facebook-github-bot committed Jul 3, 2024
1 parent 3c6762a commit 8db2995
Showing 1 changed file with 5 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,11 @@ public void tryDispatchMountItems() {
} finally {
mInDispatch = false;
}

// We call didDispatchMountItems regardless of whether we actually dispatched anything, since
// NativeAnimatedModule relies on this for executing any animations that may have been
// scheduled
mItemDispatchListener.didDispatchMountItems();
} else {
final boolean didDispatchItems;
try {
Expand Down

0 comments on commit 8db2995

Please sign in to comment.