.class Lcom/moji/forum/ui/ImageAdapter$2;
.super Ljava/lang/Object;
.source "ImageAdapter.java"

# interfaces
.implements Landroid/view/View$OnClickListener;


# annotations
.annotation system Ldalvik/annotation/EnclosingMethod;
    value = Lcom/moji/forum/ui/ImageAdapter;->getView(ILandroid/view/View;Landroid/view/ViewGroup;)Landroid/view/View;
.end annotation

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


# instance fields
.field final synthetic a:Lcom/moji/forum/ui/ImageAdapter;


# direct methods
.method constructor <init>(Lcom/moji/forum/ui/ImageAdapter;)V
    .locals 0

    .line 108
    iput-object p1, p0, Lcom/moji/forum/ui/ImageAdapter$2;->a:Lcom/moji/forum/ui/ImageAdapter;

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

    return-void
.end method


# virtual methods
.method public onClick(Landroid/view/View;)V
    .locals 5

    .line 112
    invoke-static {}, Lcom/moji/forum/common/ForumUtil;->d()Z

    move-result v0

    if-nez v0, :cond_0

    return-void

    .line 115
    :cond_0
    iget-object v0, p0, Lcom/moji/forum/ui/ImageAdapter$2;->a:Lcom/moji/forum/ui/ImageAdapter;

    invoke-static {v0}, Lcom/moji/forum/ui/ImageAdapter;->b(Lcom/moji/forum/ui/ImageAdapter;)I

    move-result v0

    packed-switch v0, :pswitch_data_0

    goto :goto_0

    .line 125
    :pswitch_0
    invoke-static {}, Lcom/moji/statistics/EventManager;->a()Lcom/moji/statistics/EventManager;

    move-result-object v0

    sget-object v1, Lcom/moji/statistics/EVENT_TAG;->PIC_CLICK:Lcom/moji/statistics/EVENT_TAG;

    const-string v2, "4"

    invoke-virtual {v0, v1, v2}, Lcom/moji/statistics/EventManager;->a(Lcom/moji/statistics/EVENT_TAG;Ljava/lang/String;)Lcom/moji/statistics/EventManager;

    goto :goto_0

    .line 121
    :pswitch_1
    invoke-static {}, Lcom/moji/statistics/EventManager;->a()Lcom/moji/statistics/EventManager;

    move-result-object v0

    sget-object v1, Lcom/moji/statistics/EVENT_TAG;->FOLLOW_PIC_CLICK:Lcom/moji/statistics/EVENT_TAG;

    invoke-virtual {v0, v1}, Lcom/moji/statistics/EventManager;->a(Lcom/moji/statistics/EVENT_TAG;)Lcom/moji/statistics/EventManager;

    .line 122
    invoke-static {}, Lcom/moji/statistics/EventManager;->a()Lcom/moji/statistics/EventManager;

    move-result-object v0

    sget-object v1, Lcom/moji/statistics/EVENT_TAG;->PIC_CLICK:Lcom/moji/statistics/EVENT_TAG;

    const-string v2, "2"

    invoke-virtual {v0, v1, v2}, Lcom/moji/statistics/EventManager;->a(Lcom/moji/statistics/EVENT_TAG;Ljava/lang/String;)Lcom/moji/statistics/EventManager;

    goto :goto_0

    .line 117
    :pswitch_2
    invoke-static {}, Lcom/moji/statistics/EventManager;->a()Lcom/moji/statistics/EventManager;

    move-result-object v0

    sget-object v1, Lcom/moji/statistics/EVENT_TAG;->POSTING_PIC_CLICK:Lcom/moji/statistics/EVENT_TAG;

    invoke-virtual {v0, v1}, Lcom/moji/statistics/EventManager;->a(Lcom/moji/statistics/EVENT_TAG;)Lcom/moji/statistics/EventManager;

    .line 118
    invoke-static {}, Lcom/moji/statistics/EventManager;->a()Lcom/moji/statistics/EventManager;

    move-result-object v0

    sget-object v1, Lcom/moji/statistics/EVENT_TAG;->PIC_CLICK:Lcom/moji/statistics/EVENT_TAG;

    const-string v2, "1"

    invoke-virtual {v0, v1, v2}, Lcom/moji/statistics/EventManager;->a(Lcom/moji/statistics/EVENT_TAG;Ljava/lang/String;)Lcom/moji/statistics/EventManager;

    .line 128
    :goto_0
    invoke-virtual {p1}, Landroid/view/View;->getTag()Ljava/lang/Object;

    move-result-object p1

    check-cast p1, Lcom/moji/http/ugc/bean/ImageInfo;

    .line 129
    new-instance v0, Landroid/content/Intent;

    iget-object v1, p0, Lcom/moji/forum/ui/ImageAdapter$2;->a:Lcom/moji/forum/ui/ImageAdapter;

    invoke-static {v1}, Lcom/moji/forum/ui/ImageAdapter;->c(Lcom/moji/forum/ui/ImageAdapter;)Landroid/content/Context;

    move-result-object v1

    const-class v2, Lcom/moji/forum/ui/DelPictureActivity;

    invoke-direct {v0, v1, v2}, Landroid/content/Intent;-><init>(Landroid/content/Context;Ljava/lang/Class;)V

    const-string v1, "total_iamge_id"

    .line 130
    iget-object v2, p0, Lcom/moji/forum/ui/ImageAdapter$2;->a:Lcom/moji/forum/ui/ImageAdapter;

    invoke-static {v2}, Lcom/moji/forum/ui/ImageAdapter;->d(Lcom/moji/forum/ui/ImageAdapter;)Ljava/util/ArrayList;

    move-result-object v2

    invoke-virtual {v0, v1, v2}, Landroid/content/Intent;->putExtra(Ljava/lang/String;Ljava/io/Serializable;)Landroid/content/Intent;

    const/4 v1, 0x0

    const/4 v2, 0x0

    .line 132
    :goto_1
    iget-object v3, p0, Lcom/moji/forum/ui/ImageAdapter$2;->a:Lcom/moji/forum/ui/ImageAdapter;

    invoke-static {v3}, Lcom/moji/forum/ui/ImageAdapter;->e(Lcom/moji/forum/ui/ImageAdapter;)Ljava/util/ArrayList;

    move-result-object v3

    invoke-virtual {v3}, Ljava/util/ArrayList;->size()I

    move-result v3

    if-ge v2, v3, :cond_2

    .line 133
    iget-object v3, p1, Lcom/moji/http/ugc/bean/ImageInfo;->filePath:Ljava/lang/String;

    iget-object v4, p0, Lcom/moji/forum/ui/ImageAdapter$2;->a:Lcom/moji/forum/ui/ImageAdapter;

    invoke-static {v4}, Lcom/moji/forum/ui/ImageAdapter;->f(Lcom/moji/forum/ui/ImageAdapter;)Ljava/util/ArrayList;

    move-result-object v4

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

    move-result-object v4

    check-cast v4, Lcom/moji/http/ugc/bean/ImageInfo;

    iget-object v4, v4, Lcom/moji/http/ugc/bean/ImageInfo;->filePath:Ljava/lang/String;

    invoke-virtual {v3, v4}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

    move-result v3

    if-eqz v3, :cond_1

    move v1, v2

    goto :goto_2

    :cond_1
    add-int/lit8 v2, v2, 0x1

    goto :goto_1

    :cond_2
    :goto_2
    const-string p1, "current_pos"

    .line 138
    invoke-virtual {v0, p1, v1}, Landroid/content/Intent;->putExtra(Ljava/lang/String;I)Landroid/content/Intent;

    .line 139
    iget-object p1, p0, Lcom/moji/forum/ui/ImageAdapter$2;->a:Lcom/moji/forum/ui/ImageAdapter;

    invoke-static {p1}, Lcom/moji/forum/ui/ImageAdapter;->g(Lcom/moji/forum/ui/ImageAdapter;)Landroid/content/Context;

    move-result-object p1

    check-cast p1, Landroid/app/Activity;

    const/16 v1, 0x2a7

    invoke-virtual {p1, v0, v1}, Landroid/app/Activity;->startActivityForResult(Landroid/content/Intent;I)V

    return-void

    :pswitch_data_0
    .packed-switch 0x1
        :pswitch_2
        :pswitch_1
        :pswitch_0
    .end packed-switch
.end method
