| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
|
This helps avoid these app crashes as well:
|
Sorry, something went wrong.
|
Hi and thanks for the PR! The team have been quite busy baking the upcoming NativeScript 5.0 release. We hope you love it as much as we do! The major release is the reason we taking longer with PR reviews. We will resume active reviewing in the following weeks. Thanks for your patience and for being awesome contributor! |
Sorry, something went wrong.
|
Hey @NathanWalker, Let's get merged the related pull request in tns-core-modules-widgets to facilitate the work here. Could you also share how to reproduce the errors you experience? Thank you! |
Sorry, something went wrong.
There was a problem hiding this comment.
Hey @NathanWalker,
A few things:
tns-core-modules/ui/image-cache/image-cache.android.ts(56,13): error TS2345: Argument of type '{ onComplete: (result: any, context: any) => void; onError: (context: any) => void; }' is not assignable to parameter of type 'ICompleteCallback'.
Object literal may only specify known properties, and 'onError' does not exist in type 'ICompleteCallback'.
The tns-platform-declarations/android/org.nativescript.widgets.d.ts needs to be updated with the changes in NativeScript/tns-core-modules-widgets#147 and NativeScript/tns-core-modules-widgets#149:
onError(err: string, context: Object): void;
tns-core-modules/http/http-request/http-request.android.ts(51,76): error TS2345: Argument of type '{ onComplete: (result: any, context: any) => void; }' is not assignable to parameter of type 'ICompleteCallback'.
Property 'onError' is missing in type '{ onComplete: (result: any, context: any) => void; }'.
Sorry, something went wrong.
|
Hey @NathanWalker, I committed a few updates on the API and implementation that we think are required and would expect in future pull requests. Could you please handle my comments above to proceed forward? Thank you! |
Sorry, something went wrong.
|
Hey @NathanWalker, is there any update here? |
Sorry, something went wrong.
Add DownloadError interface.
Use arrow functions. Remove an unnecessary `trace.write().
Update Android `constructor()`. Move `key` and `image` check to `set()`. Update `trace.write`.
|
@vchimev ok got this updated now. The changes are based on this PR which I completely agree with: Let me know if you need anything else here. |
Sorry, something went wrong.
|
test |
Sorry, something went wrong.
|
test |
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 |
PR Checklist
What is the current behavior?
Usage of the image Cache class can result in many app problems due to invalid error handling conditions.
What is the new behavior?
Proper error handling can be wired up to circumvent troubling app conditions, ie:
this._cache.push((<DownloadRequest> { key: url, url: url, completed: (image: any, key: string) => { if (url === key) { // handle success } }, error: (key: string) => { if (url === key) { // we can now properly handle error for failed url request here } } }));These changes are dependent on widgets PR here: NativeScript/tns-core-modules-widgets#147