| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
|
Please sign CLA at http://www.nativescript.org/cla |
Sorry, something went wrong.
|
CLA signature found, happy contributing! |
Sorry, something went wrong.
There was a problem hiding this comment.
We could also think about removing the return value. Why do we need false when we pass null, instead of a simple void method? @PanayotCankov @hshristov
Sorry, something went wrong.
| } | ||
|
|
||
| public setNativeSource(source: any): boolean { | ||
| if (!(source instanceof android.graphics.Bitmap)) { |
There was a problem hiding this comment.
In this way, the method will no longer return false, it will throw an exception instead. It could be something like:
if (source && !(source instanceof android.graphics.Bitmap))
Sorry, something went wrong.
| public setNativeSource(source: any): boolean { | ||
| if (source instanceof UIImage) { | ||
| this.ios = source; | ||
| if (!(source instanceof UIImage)) { |
There was a problem hiding this comment.
In this way, the method will no longer return false, it will throw an exception instead. It could be something like:
if (source && !(source instanceof UIImage))
Sorry, something went wrong.
| public setNativeSource(source: any): boolean { | ||
| if (source instanceof UIImage) { | ||
| this.ios = source; | ||
| public setNativeSource(source: any): void { |
There was a problem hiding this comment.
This is a change in the public API -> mark this as breaking change if it is really needed.
Also the definitions (image-source.d.ts) should be updated
Sorry, something went wrong.
There was a problem hiding this comment.
Done, thanks.
Sorry, something went wrong.
BREAKING CHANGE: Change the return type of `setNativeSource` method from `boolean` to `void`.
|
Changes are done, branch is rebased and able to merge after green CI. |
Sorry, something went wrong.
|
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
Sorry, something went wrong.
| Back | FazBrowse Home | New Git URL |
#3605