-
Notifications
You must be signed in to change notification settings - Fork 1
Return nodeName instead of anchorName on Android (replicates upstream #13) #1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -500,6 +500,7 @@ class ArView( | |||||
| if (node != null) { | ||||||
| var anchorName: String? = null | ||||||
| var currentNode: Node? = node | ||||||
| val nodeName = node.name | ||||||
| while (currentNode != null) { | ||||||
| anchorNodesMap.forEach { (name, anchorNode) -> | ||||||
| if (currentNode == anchorNode) { | ||||||
|
|
@@ -511,7 +512,7 @@ class ArView( | |||||
| currentNode = currentNode.parent | ||||||
| } | ||||||
| if(handleTaps) { | ||||||
| objectChannel.invokeMethod("onNodeTap", listOf(anchorName)) | ||||||
| objectChannel.invokeMethod("onNodeTap", listOf(nodeName)) | ||||||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Since
Suggested change
|
||||||
| } | ||||||
| true | ||||||
| } else { | ||||||
|
|
@@ -1328,4 +1329,4 @@ class ArView( | |||||
| } | ||||||
|
|
||||||
|
|
||||||
| } | ||||||
| } | ||||||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since
nodeNameis now used instead ofanchorNamefor the tap event, theanchorNameandcurrentNodevariables, as well as the entirewhileloop traversing the parent hierarchy, are now dead code. They should be removed to clean up the codebase and avoid unnecessary parent-traversal and map-lookup operations on every tap.