.class Lcom/moji/forum/ui/VoteTopicActivity$8;
.super Lcom/moji/requestcore/MJHttpCallback;
.source "VoteTopicActivity.java"


# annotations
.annotation system Ldalvik/annotation/EnclosingMethod;
    value = Lcom/moji/forum/ui/VoteTopicActivity;->a(Lcom/moji/http/mqn/entity/TopicComment;)V
.end annotation

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

.annotation system Ldalvik/annotation/Signature;
    value = {
        "Lcom/moji/requestcore/MJHttpCallback<",
        "Lcom/moji/http/mqn/entity/TopicPraise;",
        ">;"
    }
.end annotation


# instance fields
.field final synthetic a:Lcom/moji/http/mqn/entity/TopicComment;

.field final synthetic b:Lcom/moji/forum/ui/VoteTopicActivity;


# direct methods
.method constructor <init>(Lcom/moji/forum/ui/VoteTopicActivity;Lcom/moji/http/mqn/entity/TopicComment;)V
    .locals 0

    .line 628
    iput-object p1, p0, Lcom/moji/forum/ui/VoteTopicActivity$8;->b:Lcom/moji/forum/ui/VoteTopicActivity;

    iput-object p2, p0, Lcom/moji/forum/ui/VoteTopicActivity$8;->a:Lcom/moji/http/mqn/entity/TopicComment;

    invoke-direct {p0}, Lcom/moji/requestcore/MJHttpCallback;-><init>()V

    return-void
.end method


# virtual methods
.method protected a(Lcom/moji/http/mqn/entity/TopicPraise;)V
    .locals 2

    .line 632
    iget-object v0, p0, Lcom/moji/forum/ui/VoteTopicActivity$8;->b:Lcom/moji/forum/ui/VoteTopicActivity;

    invoke-static {v0}, Lcom/moji/forum/ui/VoteTopicActivity;->r(Lcom/moji/forum/ui/VoteTopicActivity;)Z

    move-result v0

    if-eqz v0, :cond_0

    return-void

    .line 633
    :cond_0
    iget-object v0, p0, Lcom/moji/forum/ui/VoteTopicActivity$8;->a:Lcom/moji/http/mqn/entity/TopicComment;

    const/4 v1, 0x1

    iput-boolean v1, v0, Lcom/moji/http/mqn/entity/TopicComment;->is_praise:Z

    .line 634
    iget-object v0, p0, Lcom/moji/forum/ui/VoteTopicActivity$8;->a:Lcom/moji/http/mqn/entity/TopicComment;

    new-instance v1, Ljava/lang/StringBuilder;

    invoke-direct {v1}, Ljava/lang/StringBuilder;-><init>()V

    iget p1, p1, Lcom/moji/http/mqn/entity/TopicPraise;->count:I

    invoke-virtual {v1, p1}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder;

    const-string p1, ""

    invoke-virtual {v1, p1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    invoke-virtual {v1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object p1

    iput-object p1, v0, Lcom/moji/http/mqn/entity/TopicComment;->praise_count:Ljava/lang/String;

    .line 635
    iget-object p1, p0, Lcom/moji/forum/ui/VoteTopicActivity$8;->b:Lcom/moji/forum/ui/VoteTopicActivity;

    invoke-static {p1}, Lcom/moji/forum/ui/VoteTopicActivity;->s(Lcom/moji/forum/ui/VoteTopicActivity;)Lcom/moji/forum/ui/CommentAdapter;

    move-result-object p1

    invoke-virtual {p1}, Lcom/moji/forum/ui/CommentAdapter;->notifyDataSetChanged()V

    return-void
.end method

.method protected a(Lcom/moji/requestcore/entity/IResult;)V
    .locals 2

    .line 640
    invoke-super {p0, p1}, Lcom/moji/requestcore/MJHttpCallback;->a(Lcom/moji/requestcore/entity/IResult;)V

    .line 641
    invoke-virtual {p1}, Lcom/moji/requestcore/entity/IResult;->b()Ljava/lang/String;

    move-result-object p1

    .line 642
    iget-object v0, p0, Lcom/moji/forum/ui/VoteTopicActivity$8;->b:Lcom/moji/forum/ui/VoteTopicActivity;

    const/4 v1, 0x0

    invoke-static {v0, p1, v1}, Landroid/widget/Toast;->makeText(Landroid/content/Context;Ljava/lang/CharSequence;I)Landroid/widget/Toast;

    move-result-object p1

    invoke-virtual {p1}, Landroid/widget/Toast;->show()V

    return-void
.end method

.method protected onFailed(Lcom/moji/requestcore/MJException;)V
    .locals 0

    return-void
.end method

.method protected synthetic onSuccess(Ljava/lang/Object;)V
    .locals 0

    .line 628
    check-cast p1, Lcom/moji/http/mqn/entity/TopicPraise;

    invoke-virtual {p0, p1}, Lcom/moji/forum/ui/VoteTopicActivity$8;->a(Lcom/moji/http/mqn/entity/TopicPraise;)V

    return-void
.end method
