Skip to content

Commit b015b9d

Browse files
authored
Merge branch 'develop' into NR-480854
2 parents 100a9d3 + 115d911 commit b015b9d

File tree

1 file changed

+31
-0
lines changed

1 file changed

+31
-0
lines changed

Agent/SessionReplay/ViewCaptors/ViewDetails.swift

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -356,7 +356,38 @@ struct ViewDetails {
356356
}
357357

358358
extension ViewDetails: Hashable {
359+
func hash(into hasher: inout Hasher) {
360+
hasher.combine(viewId)
361+
hasher.combine(frame.origin.x)
362+
hasher.combine(frame.origin.y)
363+
hasher.combine(frame.size.width)
364+
hasher.combine(frame.size.height)
365+
hasher.combine(alpha)
366+
hasher.combine(isHidden)
367+
hasher.combine(cornerRadius)
368+
hasher.combine(borderWidth)
369+
hasher.combine(viewName)
370+
hasher.combine(parentId)
371+
hasher.combine(nextId)
372+
hasher.combine(clip.origin.x)
373+
hasher.combine(clip.origin.y)
374+
hasher.combine(clip.size.width)
375+
hasher.combine(clip.size.height)
376+
hasher.combine(isMasked)
377+
hasher.combine(maskApplicationText)
378+
hasher.combine(maskUserInputText)
379+
hasher.combine(maskAllImages)
380+
hasher.combine(maskAllUserTouches)
381+
hasher.combine(viewIdentifier)
359382

383+
// Convert UIColors to hex strings before hashing to ensure thread safety
384+
if let bgColor = backgroundColor {
385+
hasher.combine(bgColor.toHexString(includingAlpha: true))
386+
}
387+
if let bColor = borderColor {
388+
hasher.combine(bColor.toHexString(includingAlpha: true))
389+
}
390+
}
360391
}
361392

362393
fileprivate var associatedSessionReplayViewIDKey: String = "SessionReplayID"

0 commit comments

Comments
 (0)