mirror of
https://github.com/facebook/react-native.git
synced 2026-11-18 20:19:07 +00:00
Fix definition of NativeAnimated.isEmpty
Summary: Noticed in D36098912 (https://github.com/facebook/react-native/commit/5de0f145eca36d3263cb8a9928add278cdfffa2b) that the definition of NativeAnimatedModule's OperationQueue.isEmpty was incorrect as it didn't account for `mPeekedOperation`, while `drainQueueIntoList` did. Changelog: [Internal] Reviewed By: mdvacca Differential Revision: D36109810 fbshipit-source-id: afd7059975ce6e5c65d1975d168a03f0881bd7c1
This commit is contained in:
1 parent
8b8d7324a6
commit
bf405d7083
1 file changed
+2
-2
@@ -113,7 +113,7 @@ public class NativeAnimatedModule extends NativeAnimatedModuleSpec
|
||||
|
||||
@AnyThread
|
||||
boolean isEmpty() {
|
||||
return mQueue.isEmpty();
|
||||
return mQueue.isEmpty() && mPeekedOperation != null;
|
||||
}
|
||||
|
||||
void setSynchronizedAccess(boolean isSynchronizedAccess) {
|
||||
@@ -150,7 +150,7 @@ public class NativeAnimatedModule extends NativeAnimatedModuleSpec
|
||||
|
||||
@UiThread
|
||||
private @Nullable List<UIThreadOperation> drainQueueIntoList(long maxBatchNumber) {
|
||||
if (mQueue.isEmpty() && mPeekedOperation == null) {
|
||||
if (isEmpty()) {
|
||||
return null;
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user