Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -84,8 +84,18 @@ public object ReactAxOrderHelper {
if (view.getTag(R.id.original_focusability) == null) {
view.setTag(R.id.original_focusability, view.isFocusable)
}
view.isFocusable = false
}
val originalFocusability =
view.getTag(R.id.original_focusability)

if (originalFocusability != null) {
view.setTag(
R.id.original_focusability,
newFocusable
)
} else {
view.isFocusable = newFocusable
}
Comment on lines 84 to +97

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you merge this with the branch above, and do the view.getTag(R.id.original_focusability) lookup once.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok I will check

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the feedback! I've combined the conditions and reused the originalFocusability value to avoid performing the view.getTag() lookup twice. I'll update the implementation accordingly.

}

if (view is ViewGroup) {
for (i in 0..<view.childCount) {
Expand Down
Loading