Skip to content
Open
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 @@ -314,6 +314,12 @@ public void deleteSectionAt(int index, @Kroll.argument(optional = true) KrollDic
}
}

// not needed on Android but parity for iOS method call
@Kroll.method
public void deselectItem(int section, int item)
Copy link
Collaborator

Choose a reason for hiding this comment

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

I would expect an empty-function warning or something. Isn't that the case?

Copy link
Contributor

Choose a reason for hiding this comment

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

A debug warning is better here.

Copy link
Collaborator

Choose a reason for hiding this comment

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

Maybe, if Android does not have the concept, it really should just not be exposed. I thought about it a bit more and think that it's much more clean instead of an empty function.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I thought it might be a good empty function as you have to use it on iOS so often and you always have to make the if OS_IOS check before it because it will throw a "method not found" error on Android.

but as you've said: no requests by other people yet, just thought it might be a good convenient method

Copy link
Collaborator

Choose a reason for hiding this comment

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

You can just write $.listView.deselectItem?.(event.sectionIndex, event.itemIndex) for that :)

{
}

@Override
public String getApiName()
{
Expand Down
Loading