-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
fix: Fix android crashing on text binding #2390
Conversation
@@ -142,10 +142,14 @@ private static DispatchItem CreateTimePickerMinuteFromWidget() | |||
{ | |||
var view = (TView)x; | |||
|
|||
return Observable.FromEvent<EventHandler<TEventArgs>, TEventArgs>( |
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.
This was the cause of the error. The event handlers weren't being set properly.
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.
Essentially, there was a mismatch between the EventHandler and Rx would cause an exception.
Now we are explicitly specifying the event handler method which is more efficient since it avoids reflection anyway.
} | ||
|
||
return Tuple.Create((object)vmAsView, isVm); |
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.
This is just syntactic sugar to remove a Tuple instance for the more efficient ValueTuple.
Codecov Report
@@ Coverage Diff @@
## master #2390 +/- ##
==========================================
+ Coverage 54.66% 54.69% +0.03%
==========================================
Files 114 114
Lines 4341 4344 +3
Branches 663 663
==========================================
+ Hits 2373 2376 +3
Misses 1801 1801
Partials 167 167
Continue to review full report at Codecov.
|
This pull request has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
What kind of change does this PR introduce?
This fixes a bug where android text binding would crash.
It fixes #2170
What is the current behavior?
It crashes on binding.
What is the new behavior?
It doesn't crash.