e.smali

.class Lcom/sandboxol/blockymods/view/fragment/profileImage/e;
.super Lcom/sandboxol/common/base/web/OnResponseDataListener;
.source "ProfileImageFragVM.java"


# annotations
.annotation system Ldalvik/annotation/EnclosingMethod;
    value = Lcom/sandboxol/blockymods/view/fragment/profileImage/f;->i()V
.end annotation

.annotation system Ldalvik/annotation/InnerClass;
    accessFlags = 0x0
    name = null
.end annotation

.annotation system Ldalvik/annotation/Signature;
    value = {
        "Lcom/sandboxol/common/base/web/OnResponseDataListener<",
        "Ljava/util/List<",
        "Lcom/sandboxol/center/entity/AvatarFrameResponse;",
        ">;>;"
    }
.end annotation


# instance fields
.field final synthetic a:Lcom/sandboxol/center/entity/AvatarFrameResponse;

.field final synthetic b:Ljava/lang/String;

.field final synthetic c:Lcom/sandboxol/blockymods/view/fragment/profileImage/f;


# direct methods
.method constructor <init>(Lcom/sandboxol/blockymods/view/fragment/profileImage/f;Lcom/sandboxol/center/entity/AvatarFrameResponse;Ljava/lang/String;)V
    .registers 4

    .line 1
    iput-object p1, p0, Lcom/sandboxol/blockymods/view/fragment/profileImage/e;->c:Lcom/sandboxol/blockymods/view/fragment/profileImage/f;

    iput-object p2, p0, Lcom/sandboxol/blockymods/view/fragment/profileImage/e;->a:Lcom/sandboxol/center/entity/AvatarFrameResponse;

    iput-object p3, p0, Lcom/sandboxol/blockymods/view/fragment/profileImage/e;->b:Ljava/lang/String;

    invoke-direct {p0}, Lcom/sandboxol/common/base/web/OnResponseDataListener;-><init>()V

    return-void
.end method


# virtual methods
.method public a(ILjava/lang/String;Ljava/util/List;)V
    .registers 4
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "(I",
            "Ljava/lang/String;",
            "Ljava/util/List<",
            "Lcom/sandboxol/center/entity/AvatarFrameResponse;",
            ">;)V"
        }
    .end annotation

    return-void
.end method

.method public onError(ILjava/lang/String;)V
    .registers 3

    return-void
.end method

.method public bridge synthetic onErrorWithData(ILjava/lang/String;Ljava/lang/Object;)V
    .registers 4

    .line 1
    check-cast p3, Ljava/util/List;

    invoke-virtual {p0, p1, p2, p3}, Lcom/sandboxol/blockymods/view/fragment/profileImage/e;->a(ILjava/lang/String;Ljava/util/List;)V

    return-void
.end method

.method public onServerError(I)V
    .registers 3

    .line 1
    iget-object v0, p0, Lcom/sandboxol/blockymods/view/fragment/profileImage/e;->c:Lcom/sandboxol/blockymods/view/fragment/profileImage/f;

    invoke-static {v0}, Lcom/sandboxol/blockymods/view/fragment/profileImage/f;->a(Lcom/sandboxol/blockymods/view/fragment/profileImage/f;)Landroid/content/Context;

    move-result-object v0

    invoke-static {v0, p1}, Lcom/sandboxol/common/web/error/ServerOnError;->showOnServerError(Landroid/content/Context;I)V

    return-void
.end method

.method public bridge synthetic onSuccess(Ljava/lang/Object;)V
    .registers 2

    .line 1
    check-cast p1, Ljava/util/List;

    invoke-virtual {p0, p1}, Lcom/sandboxol/blockymods/view/fragment/profileImage/e;->onSuccess(Ljava/util/List;)V

    return-void
.end method

.method public onSuccess(Ljava/util/List;)V
    .registers 5
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "(",
            "Ljava/util/List<",
            "Lcom/sandboxol/center/entity/AvatarFrameResponse;",
            ">;)V"
        }
    .end annotation

    .line 2
    iget-object p1, p0, Lcom/sandboxol/blockymods/view/fragment/profileImage/e;->c:Lcom/sandboxol/blockymods/view/fragment/profileImage/f;

    iget-object p1, p1, Lcom/sandboxol/blockymods/view/fragment/profileImage/f;->a:Landroidx/databinding/ObservableField;

    invoke-virtual {p1}, Landroidx/databinding/ObservableField;->get()Ljava/lang/Object;

    move-result-object p1

    check-cast p1, Lcom/sandboxol/center/entity/AvatarFrameResponse;

    invoke-virtual {p1}, Lcom/sandboxol/center/entity/AvatarFrameResponse;->setCurrentWearing()V

    .line 3
    iget-object p1, p0, Lcom/sandboxol/blockymods/view/fragment/profileImage/e;->c:Lcom/sandboxol/blockymods/view/fragment/profileImage/f;

    iget-object p1, p1, Lcom/sandboxol/blockymods/view/fragment/profileImage/f;->b:Landroidx/databinding/ObservableField;

    invoke-virtual {p1}, Landroidx/databinding/ObservableField;->get()Ljava/lang/Object;

    move-result-object p1

    if-eqz p1, :cond_51

    .line 4
    iget-object p1, p0, Lcom/sandboxol/blockymods/view/fragment/profileImage/e;->c:Lcom/sandboxol/blockymods/view/fragment/profileImage/f;

    iget-object p1, p1, Lcom/sandboxol/blockymods/view/fragment/profileImage/f;->b:Landroidx/databinding/ObservableField;

    invoke-virtual {p1}, Landroidx/databinding/ObservableField;->get()Ljava/lang/Object;

    move-result-object p1

    check-cast p1, Ljava/util/List;

    invoke-interface {p1}, Ljava/util/List;->iterator()Ljava/util/Iterator;

    move-result-object p1

    :cond_25
    invoke-interface {p1}, Ljava/util/Iterator;->hasNext()Z

    move-result v0

    if-eqz v0, :cond_51

    invoke-interface {p1}, Ljava/util/Iterator;->next()Ljava/lang/Object;

    move-result-object v0

    check-cast v0, Lcom/sandboxol/center/entity/AvatarFrameResponse;

    .line 5
    invoke-virtual {v0}, Lcom/sandboxol/center/entity/AvatarFrameResponse;->getResourceId()Ljava/lang/String;

    move-result-object v1

    iget-object v2, p0, Lcom/sandboxol/blockymods/view/fragment/profileImage/e;->a:Lcom/sandboxol/center/entity/AvatarFrameResponse;

    invoke-virtual {v2}, Lcom/sandboxol/center/entity/AvatarFrameResponse;->getResourceId()Ljava/lang/String;

    move-result-object v2

    invoke-virtual {v1, v2}, Ljava/lang/String;->equalsIgnoreCase(Ljava/lang/String;)Z

    move-result v1

    if-nez v1, :cond_25

    invoke-virtual {v0}, Lcom/sandboxol/center/entity/AvatarFrameResponse;->isCurrentWearing()Z

    move-result v1

    if-eqz v1, :cond_25

    .line 6
    invoke-virtual {v0}, Lcom/sandboxol/center/entity/AvatarFrameResponse;->setOwned()V

    .line 7
    iget-object p1, p0, Lcom/sandboxol/blockymods/view/fragment/profileImage/e;->c:Lcom/sandboxol/blockymods/view/fragment/profileImage/f;

    iget-object p1, p1, Lcom/sandboxol/blockymods/view/fragment/profileImage/f;->b:Landroidx/databinding/ObservableField;

    invoke-virtual {p1}, Landroidx/databinding/BaseObservable;->notifyChange()V

    .line 8
    :cond_51
    iget-object p1, p0, Lcom/sandboxol/blockymods/view/fragment/profileImage/e;->c:Lcom/sandboxol/blockymods/view/fragment/profileImage/f;

    invoke-static {p1}, Lcom/sandboxol/blockymods/view/fragment/profileImage/f;->a(Lcom/sandboxol/blockymods/view/fragment/profileImage/f;)Landroid/content/Context;

    move-result-object p1

    const v0, 0x7f12054c

    invoke-static {p1, v0}, Lcom/sandboxol/common/utils/AppToastUtils;->showShortPositiveTipToast(Landroid/content/Context;I)V

    .line 9
    invoke-static {}, Lcom/sandboxol/center/entity/AccountCenter;->newInstance()Lcom/sandboxol/center/entity/AccountCenter;

    move-result-object p1

    iget-object v0, p0, Lcom/sandboxol/blockymods/view/fragment/profileImage/e;->b:Ljava/lang/String;

    invoke-virtual {p1, v0}, Lcom/sandboxol/center/entity/AccountCenter;->setAvatarFrame(Ljava/lang/String;)V

    .line 10
    invoke-static {}, Lcom/sandboxol/center/entity/AccountCenter;->newInstance()Lcom/sandboxol/center/entity/AccountCenter;

    invoke-static {}, Lcom/sandboxol/center/entity/AccountCenter;->putAccountInfo()V

    return-void
.end method