Skip to content

Commit e00d7cb

Browse files
lunaleapsfacebook-github-bot
authored andcommitted
Check equivalence vs reference equality
Differential Revision: D82326681
1 parent ebe51d6 commit e00d7cb

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

packages/react-native/ReactAndroid/src/main/java/com/facebook/react/views/virtual/view/ReactVirtualView.kt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -201,7 +201,7 @@ public class ReactVirtualView(context: Context) :
201201
clippingRect.intersect(targetRect)
202202
clippingRect.offset(-targetRect.left, -targetRect.top)
203203

204-
if (lastClippingRect == clippingRect) {
204+
if (lastClippingRect.equals(clippingRect)) {
205205
return
206206
}
207207

@@ -241,7 +241,7 @@ public class ReactVirtualView(context: Context) :
241241
updateClippingRect()
242242

243243
if (checkRectChange) {
244-
if (!lastRect.isEmpty && lastRect == targetRect) {
244+
if (!lastRect.isEmpty && lastRect.equals(targetRect)) {
245245
debugLog("dispatchOnModeChangeIfNeeded") { "no rect change" }
246246
return
247247
}

packages/react-native/ReactAndroid/src/main/java/com/facebook/react/views/virtual/viewexperimental/ReactVirtualViewExperimental.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -208,7 +208,7 @@ public class ReactVirtualViewExperimental(context: Context) :
208208
}
209209

210210
private fun reportRectChangeToContainer() {
211-
if (lastContainerRelativeRect == containerRelativeRect) {
211+
if (lastContainerRelativeRect.equals(containerRelativeRect)) {
212212
debugLog("reportRectChangeToContainer") { "no rect change $containerRelativeRect" }
213213
return
214214
}

0 commit comments

Comments
 (0)