.class Lcom/moji/mjweather/me/comment/UpPhotosAdapter$OpenPhotoListener;
.super Ljava/lang/Object;
.source "UpPhotosAdapter.java"

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


# annotations
.annotation system Ldalvik/annotation/EnclosingClass;
    value = Lcom/moji/mjweather/me/comment/UpPhotosAdapter;
.end annotation

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


# instance fields
.field final synthetic a:Lcom/moji/mjweather/me/comment/UpPhotosAdapter;

.field private final b:I


# direct methods
.method public constructor <init>(Lcom/moji/mjweather/me/comment/UpPhotosAdapter;I)V
    .locals 0

    .line 201
    iput-object p1, p0, Lcom/moji/mjweather/me/comment/UpPhotosAdapter$OpenPhotoListener;->a:Lcom/moji/mjweather/me/comment/UpPhotosAdapter;

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

    .line 202
    iput p2, p0, Lcom/moji/mjweather/me/comment/UpPhotosAdapter$OpenPhotoListener;->b:I

    return-void
.end method


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

    .line 207
    iget-object p1, p0, Lcom/moji/mjweather/me/comment/UpPhotosAdapter$OpenPhotoListener;->a:Lcom/moji/mjweather/me/comment/UpPhotosAdapter;

    invoke-static {p1}, Lcom/moji/mjweather/me/comment/UpPhotosAdapter;->a(Lcom/moji/mjweather/me/comment/UpPhotosAdapter;)Z

    move-result p1

    if-nez p1, :cond_0

    return-void

    .line 210
    :cond_0
    new-instance p1, Landroid/content/Intent;

    iget-object v0, p0, Lcom/moji/mjweather/me/comment/UpPhotosAdapter$OpenPhotoListener;->a:Lcom/moji/mjweather/me/comment/UpPhotosAdapter;

    invoke-static {v0}, Lcom/moji/mjweather/me/comment/UpPhotosAdapter;->g(Lcom/moji/mjweather/me/comment/UpPhotosAdapter;)Landroid/content/Context;

    move-result-object v0

    const-class v1, Lcom/moji/mjweather/me/comment/ShopCommentPhotoActivity;

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

    const-string v0, "tolnum"

    .line 211
    iget-object v1, p0, Lcom/moji/mjweather/me/comment/UpPhotosAdapter$OpenPhotoListener;->a:Lcom/moji/mjweather/me/comment/UpPhotosAdapter;

    invoke-static {v1}, Lcom/moji/mjweather/me/comment/UpPhotosAdapter;->h(Lcom/moji/mjweather/me/comment/UpPhotosAdapter;)I

    move-result v1

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

    const-string v0, "curnum"

    .line 212
    iget v1, p0, Lcom/moji/mjweather/me/comment/UpPhotosAdapter$OpenPhotoListener;->b:I

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

    const/4 v0, 0x0

    .line 213
    :goto_0
    iget-object v1, p0, Lcom/moji/mjweather/me/comment/UpPhotosAdapter$OpenPhotoListener;->a:Lcom/moji/mjweather/me/comment/UpPhotosAdapter;

    invoke-static {v1}, Lcom/moji/mjweather/me/comment/UpPhotosAdapter;->h(Lcom/moji/mjweather/me/comment/UpPhotosAdapter;)I

    move-result v1

    if-ge v0, v1, :cond_1

    .line 214
    new-instance v1, Ljava/lang/StringBuilder;

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

    const-string v2, "photo"

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

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

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

    move-result-object v1

    iget-object v2, p0, Lcom/moji/mjweather/me/comment/UpPhotosAdapter$OpenPhotoListener;->a:Lcom/moji/mjweather/me/comment/UpPhotosAdapter;

    invoke-static {v2}, Lcom/moji/mjweather/me/comment/UpPhotosAdapter;->i(Lcom/moji/mjweather/me/comment/UpPhotosAdapter;)Ljava/util/List;

    move-result-object v2

    invoke-interface {v2, v0}, Ljava/util/List;->get(I)Ljava/lang/Object;

    move-result-object v2

    check-cast v2, Ljava/lang/String;

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

    add-int/lit8 v0, v0, 0x1

    goto :goto_0

    .line 215
    :cond_1
    iget-object v0, p0, Lcom/moji/mjweather/me/comment/UpPhotosAdapter$OpenPhotoListener;->a:Lcom/moji/mjweather/me/comment/UpPhotosAdapter;

    invoke-static {v0}, Lcom/moji/mjweather/me/comment/UpPhotosAdapter;->c(Lcom/moji/mjweather/me/comment/UpPhotosAdapter;)Landroid/app/Activity;

    move-result-object v0

    const/16 v1, 0x190

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

    return-void
.end method
