Skip to content

Bug: does not return image not found error #32

Description

@hdev72

hello dear friends
when i request to load unavailable image, davinci does not return error and returns Image has been loaded.

here is my code

Davinci.get()
.load(imgUrl)
.into(into)
.setErrorPlaceholder(errorSprite)
.setFadeTime(0) // 0 for disable fading
.withStartAction(() =>
{
H.log(TAG, "Download has been started.");
})
.withDownloadProgressChangedAction((progress) =>
{
H.log(TAG, "Download progress: " + progress);
})
.withDownloadedAction(() =>
{
H.log(TAG, "Download has been completed.");
})
.withLoadedAction(() =>
{
H.log(TAG, "Image has been loaded.");
// //H.log("into.sprit:" + into.sprite );
if(!avatarHistory.ContainsKey(avatarName)){
avatarHistory.Add(avatarName, into.sprite);
}
})
.withErrorAction((error) =>
{
H.log(TAG, "loadAvatarImage error:" + error);
if(gender == 0){
into.sprite = Resources.Load("avatar_boy");
}else{
into.sprite = Resources.Load("avatar_girl");
}
})
.withEndAction(() =>
{
H.log(TAG, "Operation has been finished.");
})
.start();

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions