-
Notifications
You must be signed in to change notification settings - Fork 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
Formatting MessageHandler #2510
Formatting MessageHandler #2510
Conversation
@imjacobclark Would you mind resolving the conflicts and updating this PR? |
@dwieeb yep, will fix this up tomorrow, thanks for taking a look! |
@dwieeb conflicts sorted! |
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.
Looks good! I just had a question about one of the branches of the if statement
android/capacitor/src/main/java/com/getcapacitor/MessageHandler.java
Outdated
Show resolved
Hide resolved
@carlpoole thanks, fixed the comment! What is the process to getting this merged? |
We just merge it. 😉 Thanks for your contribution, @imjacobclark! |
Second contribution 👋!
No functional changes here, I simplified the check if we're a
cordovaPlugin
,javascriptError
oranything else
.I also extracted the predicates that checks if the types (null, cordova, js error) to help make the
postMessage
a little easier to read.Replaced
new Runnable
with a Lambda and the// Only eval the JS code if this is a valid callback id
comment with a clear variable name.Moved both public methods to the top of the file and the private methods at the bottom.