.class public Lcom/moji/mjappstore/engine/AppCommentListWrap;
.super Ljava/lang/Object;
.source "AppCommentListWrap.java"


# annotations
.annotation system Ldalvik/annotation/MemberClasses;
    value = {
        Lcom/moji/mjappstore/engine/AppCommentListWrap$ViewHolder;,
        Lcom/moji/mjappstore/engine/AppCommentListWrap$CommentsAdapter;,
        Lcom/moji/mjappstore/engine/AppCommentListWrap$CommentListener;
    }
.end annotation


# instance fields
.field public a:Ljava/lang/String;

.field public final b:Lcom/moji/mjappstore/engine/AppCommentListWrap$CommentsAdapter;

.field public c:I

.field private final d:Landroid/app/Activity;

.field private final e:Landroid/widget/ListView;

.field private final f:Ljava/util/ArrayList;
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "Ljava/util/ArrayList<",
            "Lcom/moji/http/appmoji001/data/CommentResult$CommentInfo;",
            ">;"
        }
    .end annotation
.end field


# direct methods
.method public constructor <init>(Landroid/widget/ListView;Landroid/app/Activity;)V
    .locals 1

    .line 42
    invoke-direct {p0}, Ljava/lang/Object;-><init>()V

    .line 36
    new-instance v0, Ljava/util/ArrayList;

    invoke-direct {v0}, Ljava/util/ArrayList;-><init>()V

    iput-object v0, p0, Lcom/moji/mjappstore/engine/AppCommentListWrap;->f:Ljava/util/ArrayList;

    const/4 v0, -0x1

    .line 39
    iput v0, p0, Lcom/moji/mjappstore/engine/AppCommentListWrap;->c:I

    .line 43
    iput-object p1, p0, Lcom/moji/mjappstore/engine/AppCommentListWrap;->e:Landroid/widget/ListView;

    .line 44
    iput-object p2, p0, Lcom/moji/mjappstore/engine/AppCommentListWrap;->d:Landroid/app/Activity;

    .line 45
    new-instance p2, Lcom/moji/mjappstore/engine/AppCommentListWrap$CommentsAdapter;

    iget-object v0, p0, Lcom/moji/mjappstore/engine/AppCommentListWrap;->d:Landroid/app/Activity;

    invoke-direct {p2, p0, v0}, Lcom/moji/mjappstore/engine/AppCommentListWrap$CommentsAdapter;-><init>(Lcom/moji/mjappstore/engine/AppCommentListWrap;Landroid/content/Context;)V

    iput-object p2, p0, Lcom/moji/mjappstore/engine/AppCommentListWrap;->b:Lcom/moji/mjappstore/engine/AppCommentListWrap$CommentsAdapter;

    .line 46
    iget-object p2, p0, Lcom/moji/mjappstore/engine/AppCommentListWrap;->b:Lcom/moji/mjappstore/engine/AppCommentListWrap$CommentsAdapter;

    invoke-virtual {p1, p2}, Landroid/widget/ListView;->setAdapter(Landroid/widget/ListAdapter;)V

    .line 47
    iget-object p1, p0, Lcom/moji/mjappstore/engine/AppCommentListWrap;->e:Landroid/widget/ListView;

    const/4 p2, 0x0

    invoke-virtual {p1, p2}, Landroid/widget/ListView;->setCacheColorHint(I)V

    .line 48
    iget-object p1, p0, Lcom/moji/mjappstore/engine/AppCommentListWrap;->e:Landroid/widget/ListView;

    sget p2, Lcom/moji/mjappstore/R$color;->transparent:I

    invoke-virtual {p1, p2}, Landroid/widget/ListView;->setSelector(I)V

    .line 49
    iget-object p1, p0, Lcom/moji/mjappstore/engine/AppCommentListWrap;->e:Landroid/widget/ListView;

    const/4 p2, 0x1

    invoke-virtual {p1, p2}, Landroid/widget/ListView;->setDrawSelectorOnTop(Z)V

    return-void
.end method

.method static synthetic a(Lcom/moji/mjappstore/engine/AppCommentListWrap;)Landroid/app/Activity;
    .locals 0

    .line 28
    iget-object p0, p0, Lcom/moji/mjappstore/engine/AppCommentListWrap;->d:Landroid/app/Activity;

    return-object p0
.end method

.method private a(J)Ljava/lang/String;
    .locals 4

    const-string v0, ""

    .line 55
    :try_start_0
    new-instance v1, Ljava/util/Date;

    invoke-static {}, Ljava/lang/System;->currentTimeMillis()J

    move-result-wide v2

    invoke-direct {v1, v2, v3}, Ljava/util/Date;-><init>(J)V

    const-string v2, "M\u6708d\u65e5"

    invoke-static {v1, v2}, Lcom/moji/tool/DateFormatTool;->a(Ljava/util/Date;Ljava/lang/String;)Ljava/lang/String;

    move-result-object v1

    .line 56
    new-instance v2, Ljava/util/Date;

    invoke-direct {v2, p1, p2}, Ljava/util/Date;-><init>(J)V

    const-string v3, "M\u6708d\u65e5"

    invoke-static {v2, v3}, Lcom/moji/tool/DateFormatTool;->a(Ljava/util/Date;Ljava/lang/String;)Ljava/lang/String;

    move-result-object v2

    .line 57
    invoke-virtual {v1, v2}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

    move-result v1

    if-eqz v1, :cond_0

    .line 58
    new-instance v1, Ljava/util/Date;

    invoke-direct {v1, p1, p2}, Ljava/util/Date;-><init>(J)V

    const-string p1, "HH:mm"

    invoke-static {v1, p1}, Lcom/moji/tool/DateFormatTool;->a(Ljava/util/Date;Ljava/lang/String;)Ljava/lang/String;

    move-result-object p1
    :try_end_0
    .catch Ljava/lang/Exception; {:try_start_0 .. :try_end_0} :catch_0

    move-object v0, p1

    goto :goto_0

    :cond_0
    move-object v0, v2

    goto :goto_0

    :catch_0
    move-exception p1

    const-string p2, "AppCommentListWrap"

    .line 63
    invoke-static {p2, p1}, Lcom/moji/tool/log/MJLogger;->a(Ljava/lang/String;Ljava/lang/Throwable;)V

    :goto_0
    return-object v0
.end method

.method private a(ILcom/moji/mjappstore/engine/AppCommentListWrap$ViewHolder;)V
    .locals 2

    .line 70
    iget-object v0, p0, Lcom/moji/mjappstore/engine/AppCommentListWrap;->f:Ljava/util/ArrayList;

    invoke-virtual {v0, p1}, Ljava/util/ArrayList;->get(I)Ljava/lang/Object;

    move-result-object p1

    check-cast p1, Lcom/moji/http/appmoji001/data/CommentResult$CommentInfo;

    invoke-virtual {p1}, Lcom/moji/http/appmoji001/data/CommentResult$CommentInfo;->getTime()Ljava/lang/String;

    move-result-object p1

    :try_start_0
    const-string v0, "yyyy-MM-dd HH:mm"

    .line 73
    invoke-static {p1, v0}, Lcom/moji/tool/DateFormatTool;->a(Ljava/lang/String;Ljava/lang/String;)Ljava/util/Date;

    move-result-object v0

    .line 74
    invoke-virtual {v0}, Ljava/util/Date;->getTime()J

    move-result-wide v0

    invoke-direct {p0, v0, v1}, Lcom/moji/mjappstore/engine/AppCommentListWrap;->a(J)Ljava/lang/String;

    move-result-object v0
    :try_end_0
    .catch Ljava/lang/Exception; {:try_start_0 .. :try_end_0} :catch_0

    move-object p1, v0

    goto :goto_0

    :catch_0
    move-exception v0

    const-string v1, "AppCommentListWrap"

    .line 76
    invoke-static {v1, v0}, Lcom/moji/tool/log/MJLogger;->a(Ljava/lang/String;Ljava/lang/Throwable;)V

    .line 79
    :goto_0
    iget-object p2, p2, Lcom/moji/mjappstore/engine/AppCommentListWrap$ViewHolder;->g:Landroid/widget/TextView;

    invoke-virtual {p2, p1}, Landroid/widget/TextView;->setText(Ljava/lang/CharSequence;)V

    return-void
.end method

.method static synthetic a(Lcom/moji/mjappstore/engine/AppCommentListWrap;ILcom/moji/mjappstore/engine/AppCommentListWrap$ViewHolder;)V
    .locals 0

    .line 28
    invoke-direct {p0, p1, p2}, Lcom/moji/mjappstore/engine/AppCommentListWrap;->b(ILcom/moji/mjappstore/engine/AppCommentListWrap$ViewHolder;)V

    return-void
.end method

.method static synthetic b(Lcom/moji/mjappstore/engine/AppCommentListWrap;)Ljava/util/ArrayList;
    .locals 0

    .line 28
    iget-object p0, p0, Lcom/moji/mjappstore/engine/AppCommentListWrap;->f:Ljava/util/ArrayList;

    return-object p0
.end method

.method private b(ILcom/moji/mjappstore/engine/AppCommentListWrap$ViewHolder;)V
    .locals 2

    .line 83
    iget-object v0, p2, Lcom/moji/mjappstore/engine/AppCommentListWrap$ViewHolder;->d:Lcom/moji/imageview/RemoteImageView;

    iget-object v1, p0, Lcom/moji/mjappstore/engine/AppCommentListWrap;->f:Ljava/util/ArrayList;

    invoke-virtual {v1, p1}, Ljava/util/ArrayList;->get(I)Ljava/lang/Object;

    move-result-object v1

    check-cast v1, Lcom/moji/http/appmoji001/data/CommentResult$CommentInfo;

    invoke-virtual {v1}, Lcom/moji/http/appmoji001/data/CommentResult$CommentInfo;->getFaceurl()Ljava/lang/String;

    move-result-object v1

    invoke-virtual {v0, v1}, Lcom/moji/imageview/RemoteImageView;->setTag(Ljava/lang/Object;)V

    .line 85
    iget-object v0, p0, Lcom/moji/mjappstore/engine/AppCommentListWrap;->f:Ljava/util/ArrayList;

    invoke-virtual {v0, p1}, Ljava/util/ArrayList;->get(I)Ljava/lang/Object;

    move-result-object v0

    check-cast v0, Lcom/moji/http/appmoji001/data/CommentResult$CommentInfo;

    invoke-virtual {v0}, Lcom/moji/http/appmoji001/data/CommentResult$CommentInfo;->getFaceurl()Ljava/lang/String;

    move-result-object v0

    invoke-static {v0}, Lcom/moji/tool/Utils;->a(Ljava/lang/String;)Z

    move-result v0

    if-eqz v0, :cond_0

    .line 86
    iget-object p1, p2, Lcom/moji/mjappstore/engine/AppCommentListWrap$ViewHolder;->d:Lcom/moji/imageview/RemoteImageView;

    sget v0, Lcom/moji/mjappstore/R$drawable;->sns_face_default:I

    invoke-virtual {p1, v0}, Lcom/moji/imageview/RemoteImageView;->setImageResource(I)V

    goto :goto_0

    .line 88
    :cond_0
    invoke-static {}, Lcom/moji/tool/AppDelegate;->a()Landroid/content/Context;

    move-result-object v0

    invoke-static {v0}, Lcom/squareup/picasso/Picasso;->a(Landroid/content/Context;)Lcom/squareup/picasso/Picasso;

    move-result-object v0

    iget-object v1, p0, Lcom/moji/mjappstore/engine/AppCommentListWrap;->f:Ljava/util/ArrayList;

    invoke-virtual {v1, p1}, Ljava/util/ArrayList;->get(I)Ljava/lang/Object;

    move-result-object p1

    check-cast p1, Lcom/moji/http/appmoji001/data/CommentResult$CommentInfo;

    invoke-virtual {p1}, Lcom/moji/http/appmoji001/data/CommentResult$CommentInfo;->getFaceurl()Ljava/lang/String;

    move-result-object p1

    invoke-virtual {v0, p1}, Lcom/squareup/picasso/Picasso;->a(Ljava/lang/String;)Lcom/squareup/picasso/RequestCreator;

    move-result-object p1

    sget v0, Lcom/moji/mjappstore/R$drawable;->sns_face_default:I

    invoke-virtual {p1, v0}, Lcom/squareup/picasso/RequestCreator;->a(I)Lcom/squareup/picasso/RequestCreator;

    move-result-object p1

    iget-object v0, p2, Lcom/moji/mjappstore/engine/AppCommentListWrap$ViewHolder;->d:Lcom/moji/imageview/RemoteImageView;

    invoke-virtual {p1, v0}, Lcom/squareup/picasso/RequestCreator;->a(Landroid/widget/ImageView;)V

    .line 91
    :goto_0
    iget-object p1, p2, Lcom/moji/mjappstore/engine/AppCommentListWrap$ViewHolder;->d:Lcom/moji/imageview/RemoteImageView;

    new-instance p2, Lcom/moji/mjappstore/engine/AppCommentListWrap$1;

    invoke-direct {p2, p0}, Lcom/moji/mjappstore/engine/AppCommentListWrap$1;-><init>(Lcom/moji/mjappstore/engine/AppCommentListWrap;)V

    invoke-virtual {p1, p2}, Lcom/moji/imageview/RemoteImageView;->setOnClickListener(Landroid/view/View$OnClickListener;)V

    return-void
.end method

.method static synthetic b(Lcom/moji/mjappstore/engine/AppCommentListWrap;ILcom/moji/mjappstore/engine/AppCommentListWrap$ViewHolder;)V
    .locals 0

    .line 28
    invoke-direct {p0, p1, p2}, Lcom/moji/mjappstore/engine/AppCommentListWrap;->a(ILcom/moji/mjappstore/engine/AppCommentListWrap$ViewHolder;)V

    return-void
.end method


# virtual methods
.method public a()Lcom/moji/mjappstore/engine/AppCommentListWrap$CommentsAdapter;
    .locals 1

    .line 116
    iget-object v0, p0, Lcom/moji/mjappstore/engine/AppCommentListWrap;->b:Lcom/moji/mjappstore/engine/AppCommentListWrap$CommentsAdapter;

    return-object v0
.end method

.method public a(Ljava/lang/String;)V
    .locals 0

    .line 136
    iput-object p1, p0, Lcom/moji/mjappstore/engine/AppCommentListWrap;->a:Ljava/lang/String;

    return-void
.end method

.method public b()Ljava/util/ArrayList;
    .locals 1
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "()",
            "Ljava/util/ArrayList<",
            "Lcom/moji/http/appmoji001/data/CommentResult$CommentInfo;",
            ">;"
        }
    .end annotation

    .line 120
    iget-object v0, p0, Lcom/moji/mjappstore/engine/AppCommentListWrap;->f:Ljava/util/ArrayList;

    return-object v0
.end method

.method public c()V
    .locals 0

    return-void
.end method
