.class public Lcom/moji/forum/ui/CommonLongClickDialog;
.super Ljava/lang/Object;
.source "CommonLongClickDialog.java"


# annotations
.annotation system Ldalvik/annotation/MemberClasses;
    value = {
        Lcom/moji/forum/ui/CommonLongClickDialog$OnLongClickResultListener;
    }
.end annotation


# direct methods
.method public constructor <init>()V
    .locals 0

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

    return-void
.end method

.method public static a(Landroid/content/Context;Lcom/moji/http/mqn/entity/Topic;ZLcom/moji/forum/ui/CommonLongClickDialog$OnLongClickResultListener;)V
    .locals 8

    .line 38
    iget-object v1, p1, Lcom/moji/http/mqn/entity/Topic;->sns_id:Ljava/lang/String;

    iget-boolean v2, p1, Lcom/moji/http/mqn/entity/Topic;->is_moderator:Z

    iget-boolean v3, p1, Lcom/moji/http/mqn/entity/Topic;->is_top:Z

    iget-object v4, p1, Lcom/moji/http/mqn/entity/Topic;->id:Ljava/lang/String;

    const/4 v5, 0x0

    move-object v0, p0

    move v6, p2

    move-object v7, p3

    invoke-static/range {v0 .. v7}, Lcom/moji/forum/ui/CommonLongClickDialog;->a(Landroid/content/Context;Ljava/lang/String;ZZLjava/lang/String;Ljava/lang/String;ZLcom/moji/forum/ui/CommonLongClickDialog$OnLongClickResultListener;)V

    return-void
.end method

.method public static a(Landroid/content/Context;Lcom/moji/http/mqn/entity/TopicList$Topic;ZLcom/moji/forum/ui/CommonLongClickDialog$OnLongClickResultListener;)V
    .locals 8

    .line 34
    iget-object v1, p1, Lcom/moji/http/mqn/entity/TopicList$Topic;->sns_id:Ljava/lang/String;

    iget-boolean v2, p1, Lcom/moji/http/mqn/entity/TopicList$Topic;->is_moderator:Z

    iget-object v4, p1, Lcom/moji/http/mqn/entity/TopicList$Topic;->id:Ljava/lang/String;

    const/4 v3, 0x0

    const/4 v5, 0x0

    const/4 v6, 0x0

    move-object v0, p0

    move-object v7, p3

    invoke-static/range {v0 .. v7}, Lcom/moji/forum/ui/CommonLongClickDialog;->a(Landroid/content/Context;Ljava/lang/String;ZZLjava/lang/String;Ljava/lang/String;ZLcom/moji/forum/ui/CommonLongClickDialog$OnLongClickResultListener;)V

    return-void
.end method

.method static synthetic a(Landroid/content/Context;Ljava/lang/String;)V
    .locals 0

    .line 32
    invoke-static {p0, p1}, Lcom/moji/forum/ui/CommonLongClickDialog;->b(Landroid/content/Context;Ljava/lang/String;)V

    return-void
.end method

.method public static a(Landroid/content/Context;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;ZLcom/moji/forum/ui/CommonLongClickDialog$OnLongClickResultListener;)V
    .locals 8

    const/4 v2, 0x0

    const/4 v3, 0x0

    const/4 v5, 0x0

    move-object v0, p0

    move-object v1, p1

    move-object v4, p2

    move v6, p4

    move-object v7, p5

    .line 42
    invoke-static/range {v0 .. v7}, Lcom/moji/forum/ui/CommonLongClickDialog;->a(Landroid/content/Context;Ljava/lang/String;ZZLjava/lang/String;Ljava/lang/String;ZLcom/moji/forum/ui/CommonLongClickDialog$OnLongClickResultListener;)V

    return-void
.end method

.method public static a(Landroid/content/Context;Ljava/lang/String;ZLjava/lang/String;Lcom/moji/forum/ui/CommonLongClickDialog$OnLongClickResultListener;)V
    .locals 0

    .line 169
    new-instance p0, Lcom/moji/http/mqn/DeleteTopicRequest;

    if-eqz p2, :cond_0

    const/4 p2, 0x3

    goto :goto_0

    :cond_0
    const/4 p2, 0x1

    :goto_0
    invoke-direct {p0, p1, p2, p3}, Lcom/moji/http/mqn/DeleteTopicRequest;-><init>(Ljava/lang/String;ILjava/lang/String;)V

    new-instance p2, Lcom/moji/forum/ui/CommonLongClickDialog$5;

    invoke-direct {p2, p4, p1}, Lcom/moji/forum/ui/CommonLongClickDialog$5;-><init>(Lcom/moji/forum/ui/CommonLongClickDialog$OnLongClickResultListener;Ljava/lang/String;)V

    invoke-virtual {p0, p2}, Lcom/moji/http/mqn/DeleteTopicRequest;->a(Lcom/moji/requestcore/MJBaseHttpCallback;)V

    return-void
.end method

.method public static a(Landroid/content/Context;Ljava/lang/String;ZZLjava/lang/String;Ljava/lang/String;ZLcom/moji/forum/ui/CommonLongClickDialog$OnLongClickResultListener;)V
    .locals 16

    move-object/from16 v7, p0

    move-object/from16 v0, p1

    .line 46
    new-instance v8, Landroid/app/Dialog;

    sget v1, Lcom/moji/forum/R$style;->dialog_report:I

    invoke-direct {v8, v7, v1}, Landroid/app/Dialog;-><init>(Landroid/content/Context;I)V

    .line 47
    invoke-static/range {p0 .. p0}, Landroid/view/LayoutInflater;->from(Landroid/content/Context;)Landroid/view/LayoutInflater;

    move-result-object v1

    sget v2, Lcom/moji/forum/R$layout;->sns_picture_menu:I

    const/4 v3, 0x0

    invoke-virtual {v1, v2, v3}, Landroid/view/LayoutInflater;->inflate(ILandroid/view/ViewGroup;)Landroid/view/View;

    move-result-object v1

    .line 48
    invoke-virtual {v8, v1}, Landroid/app/Dialog;->setContentView(Landroid/view/View;)V

    .line 49
    sget v2, Lcom/moji/forum/R$id;->tv_send_comment_like:I

    invoke-virtual {v1, v2}, Landroid/view/View;->findViewById(I)Landroid/view/View;

    move-result-object v2

    check-cast v2, Landroid/widget/TextView;

    .line 50
    sget v3, Lcom/moji/forum/R$id;->iv_send_comment_like:I

    invoke-virtual {v1, v3}, Landroid/view/View;->findViewById(I)Landroid/view/View;

    move-result-object v3

    check-cast v3, Landroid/widget/ImageView;

    .line 51
    sget v4, Lcom/moji/forum/R$id;->btn_save_to_sd:I

    invoke-virtual {v1, v4}, Landroid/view/View;->findViewById(I)Landroid/view/View;

    move-result-object v4

    move-object v9, v4

    check-cast v9, Landroid/widget/TextView;

    .line 52
    sget v4, Lcom/moji/forum/R$id;->iv_save_to_sd:I

    invoke-virtual {v1, v4}, Landroid/view/View;->findViewById(I)Landroid/view/View;

    move-result-object v4

    check-cast v4, Landroid/widget/ImageView;

    .line 53
    sget v5, Lcom/moji/forum/R$id;->btn_report:I

    invoke-virtual {v1, v5}, Landroid/view/View;->findViewById(I)Landroid/view/View;

    move-result-object v5

    move-object v10, v5

    check-cast v10, Landroid/widget/TextView;

    .line 54
    sget v5, Lcom/moji/forum/R$id;->iv_report:I

    invoke-virtual {v1, v5}, Landroid/view/View;->findViewById(I)Landroid/view/View;

    move-result-object v5

    check-cast v5, Landroid/widget/ImageView;

    .line 55
    sget v6, Lcom/moji/forum/R$id;->btn_delete:I

    invoke-virtual {v1, v6}, Landroid/view/View;->findViewById(I)Landroid/view/View;

    move-result-object v6

    move-object v11, v6

    check-cast v11, Landroid/widget/TextView;

    .line 56
    sget v6, Lcom/moji/forum/R$id;->iv_delete:I

    invoke-virtual {v1, v6}, Landroid/view/View;->findViewById(I)Landroid/view/View;

    move-result-object v6

    check-cast v6, Landroid/widget/ImageView;

    .line 57
    sget v12, Lcom/moji/forum/R$id;->btn_cancle:I

    invoke-virtual {v1, v12}, Landroid/view/View;->findViewById(I)Landroid/view/View;

    move-result-object v12

    check-cast v12, Landroid/widget/TextView;

    .line 58
    sget v13, Lcom/moji/forum/R$id;->btn_gag:I

    invoke-virtual {v1, v13}, Landroid/view/View;->findViewById(I)Landroid/view/View;

    move-result-object v13

    check-cast v13, Landroid/widget/TextView;

    .line 59
    sget v14, Lcom/moji/forum/R$id;->iv_gag:I

    invoke-virtual {v1, v14}, Landroid/view/View;->findViewById(I)Landroid/view/View;

    move-result-object v14

    check-cast v14, Landroid/widget/ImageView;

    .line 60
    sget v15, Lcom/moji/forum/R$id;->btn_ungag:I

    invoke-virtual {v1, v15}, Landroid/view/View;->findViewById(I)Landroid/view/View;

    move-result-object v15

    check-cast v15, Landroid/widget/TextView;

    .line 61
    sget v7, Lcom/moji/forum/R$id;->iv_ungag:I

    invoke-virtual {v1, v7}, Landroid/view/View;->findViewById(I)Landroid/view/View;

    move-result-object v1

    check-cast v1, Landroid/widget/ImageView;

    const/16 v7, 0x8

    .line 63
    invoke-virtual {v2, v7}, Landroid/widget/TextView;->setVisibility(I)V

    .line 64
    invoke-virtual {v3, v7}, Landroid/widget/ImageView;->setVisibility(I)V

    .line 65
    invoke-virtual {v9, v7}, Landroid/widget/TextView;->setVisibility(I)V

    .line 66
    invoke-virtual {v4, v7}, Landroid/widget/ImageView;->setVisibility(I)V

    .line 67
    invoke-virtual {v13, v7}, Landroid/widget/TextView;->setVisibility(I)V

    .line 68
    invoke-virtual {v14, v7}, Landroid/widget/ImageView;->setVisibility(I)V

    .line 69
    invoke-virtual {v15, v7}, Landroid/widget/TextView;->setVisibility(I)V

    .line 70
    invoke-virtual {v1, v7}, Landroid/widget/ImageView;->setVisibility(I)V

    const/4 v1, 0x0

    if-eqz p6, :cond_1

    .line 72
    invoke-virtual {v9, v1}, Landroid/widget/TextView;->setVisibility(I)V

    .line 73
    sget v2, Lcom/moji/forum/R$string;->reply:I

    invoke-virtual {v9, v2}, Landroid/widget/TextView;->setText(I)V

    .line 74
    invoke-virtual {v4, v1}, Landroid/widget/ImageView;->setVisibility(I)V

    .line 75
    invoke-static/range {p1 .. p1}, Landroid/text/TextUtils;->isEmpty(Ljava/lang/CharSequence;)Z

    move-result v2

    if-nez v2, :cond_0

    invoke-static {}, Lcom/moji/forum/common/ForumUtil;->b()Ljava/lang/String;

    move-result-object v2

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

    move-result v0

    if-eqz v0, :cond_0

    .line 76
    invoke-virtual {v10, v7}, Landroid/widget/TextView;->setVisibility(I)V

    .line 77
    invoke-virtual {v5, v7}, Landroid/widget/ImageView;->setVisibility(I)V

    .line 78
    invoke-virtual {v11, v1}, Landroid/widget/TextView;->setVisibility(I)V

    .line 79
    invoke-virtual {v6, v1}, Landroid/widget/ImageView;->setVisibility(I)V

    goto :goto_0

    .line 81
    :cond_0
    invoke-virtual {v10, v1}, Landroid/widget/TextView;->setVisibility(I)V

    .line 82
    invoke-virtual {v5, v1}, Landroid/widget/ImageView;->setVisibility(I)V

    .line 83
    invoke-virtual {v11, v7}, Landroid/widget/TextView;->setVisibility(I)V

    .line 84
    invoke-virtual {v6, v7}, Landroid/widget/ImageView;->setVisibility(I)V

    .line 85
    sget v0, Lcom/moji/forum/R$string;->report:I

    invoke-virtual {v10, v0}, Landroid/widget/TextView;->setText(I)V

    goto :goto_0

    .line 88
    :cond_1
    invoke-static/range {p1 .. p1}, Landroid/text/TextUtils;->isEmpty(Ljava/lang/CharSequence;)Z

    move-result v2

    const/high16 v3, 0x42640000    # 57.0f

    if-nez v2, :cond_2

    invoke-static {}, Lcom/moji/forum/common/ForumUtil;->b()Ljava/lang/String;

    move-result-object v2

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

    move-result v0

    if-eqz v0, :cond_2

    .line 89
    invoke-virtual {v10, v7}, Landroid/widget/TextView;->setVisibility(I)V

    .line 90
    invoke-virtual {v5, v7}, Landroid/widget/ImageView;->setVisibility(I)V

    .line 91
    invoke-virtual {v11, v1}, Landroid/widget/TextView;->setVisibility(I)V

    .line 92
    invoke-virtual {v6, v1}, Landroid/widget/ImageView;->setVisibility(I)V

    .line 93
    sget v0, Lcom/moji/forum/R$drawable;->common_dialog_top_selector:I

    invoke-virtual {v11, v0}, Landroid/widget/TextView;->setBackgroundResource(I)V

    .line 94
    invoke-virtual {v11}, Landroid/widget/TextView;->getLayoutParams()Landroid/view/ViewGroup$LayoutParams;

    move-result-object v0

    check-cast v0, Landroid/widget/LinearLayout$LayoutParams;

    .line 95
    invoke-static {}, Lcom/moji/forum/common/ResUtil;->a()F

    move-result v2

    mul-float v2, v2, v3

    float-to-int v2, v2

    iput v2, v0, Landroid/widget/LinearLayout$LayoutParams;->height:I

    goto :goto_0

    .line 97
    :cond_2
    invoke-virtual {v10, v1}, Landroid/widget/TextView;->setVisibility(I)V

    .line 98
    invoke-virtual {v5, v1}, Landroid/widget/ImageView;->setVisibility(I)V

    .line 99
    invoke-virtual {v11, v7}, Landroid/widget/TextView;->setVisibility(I)V

    .line 100
    invoke-virtual {v6, v7}, Landroid/widget/ImageView;->setVisibility(I)V

    .line 101
    sget v0, Lcom/moji/forum/R$drawable;->common_dialog_top_selector:I

    invoke-virtual {v10, v0}, Landroid/widget/TextView;->setBackgroundResource(I)V

    .line 102
    sget v0, Lcom/moji/forum/R$string;->report:I

    invoke-virtual {v10, v0}, Landroid/widget/TextView;->setText(I)V

    .line 103
    invoke-virtual {v10}, Landroid/widget/TextView;->getLayoutParams()Landroid/view/ViewGroup$LayoutParams;

    move-result-object v0

    check-cast v0, Landroid/widget/LinearLayout$LayoutParams;

    .line 104
    invoke-static {}, Lcom/moji/forum/common/ResUtil;->a()F

    move-result v2

    mul-float v2, v2, v3

    float-to-int v2, v2

    iput v2, v0, Landroid/widget/LinearLayout$LayoutParams;->height:I

    :goto_0
    if-eqz p2, :cond_3

    if-nez p3, :cond_3

    .line 109
    invoke-virtual {v11, v1}, Landroid/widget/TextView;->setVisibility(I)V

    .line 110
    invoke-virtual {v6, v1}, Landroid/widget/ImageView;->setVisibility(I)V

    .line 112
    :cond_3
    invoke-virtual {v12, v1}, Landroid/widget/TextView;->setVisibility(I)V

    .line 114
    new-instance v7, Lcom/moji/forum/ui/CommonLongClickDialog$1;

    move-object v0, v7

    move-object v1, v8

    move-object/from16 v2, p0

    move-object/from16 v3, p4

    move/from16 v4, p2

    move-object/from16 v5, p5

    move-object/from16 v6, p7

    invoke-direct/range {v0 .. v6}, Lcom/moji/forum/ui/CommonLongClickDialog$1;-><init>(Landroid/app/Dialog;Landroid/content/Context;Ljava/lang/String;ZLjava/lang/String;Lcom/moji/forum/ui/CommonLongClickDialog$OnLongClickResultListener;)V

    invoke-virtual {v11, v7}, Landroid/widget/TextView;->setOnClickListener(Landroid/view/View$OnClickListener;)V

    .line 122
    new-instance v0, Lcom/moji/forum/ui/CommonLongClickDialog$2;

    move-object/from16 v2, p4

    move-object/from16 v1, p0

    invoke-direct {v0, v8, v1, v2}, Lcom/moji/forum/ui/CommonLongClickDialog$2;-><init>(Landroid/app/Dialog;Landroid/content/Context;Ljava/lang/String;)V

    invoke-virtual {v10, v0}, Landroid/widget/TextView;->setOnClickListener(Landroid/view/View$OnClickListener;)V

    .line 138
    new-instance v0, Lcom/moji/forum/ui/CommonLongClickDialog$3;

    invoke-direct {v0, v8}, Lcom/moji/forum/ui/CommonLongClickDialog$3;-><init>(Landroid/app/Dialog;)V

    invoke-virtual {v12, v0}, Landroid/widget/TextView;->setOnClickListener(Landroid/view/View$OnClickListener;)V

    .line 146
    new-instance v0, Lcom/moji/forum/ui/CommonLongClickDialog$4;

    move-object/from16 v1, p7

    invoke-direct {v0, v8, v1}, Lcom/moji/forum/ui/CommonLongClickDialog$4;-><init>(Landroid/app/Dialog;Lcom/moji/forum/ui/CommonLongClickDialog$OnLongClickResultListener;)V

    invoke-virtual {v9, v0}, Landroid/widget/TextView;->setOnClickListener(Landroid/view/View$OnClickListener;)V

    .line 155
    invoke-virtual {v8}, Landroid/app/Dialog;->getWindow()Landroid/view/Window;

    move-result-object v0

    invoke-virtual {v0}, Landroid/view/Window;->getAttributes()Landroid/view/WindowManager$LayoutParams;

    move-result-object v0

    invoke-static {}, Lcom/moji/tool/DeviceTool;->b()I

    move-result v1

    int-to-float v1, v1

    const v2, 0x3f3c71c7

    mul-float v1, v1, v2

    float-to-int v1, v1

    iput v1, v0, Landroid/view/WindowManager$LayoutParams;->width:I

    const/4 v0, 0x1

    .line 156
    invoke-virtual {v8, v0}, Landroid/app/Dialog;->setCanceledOnTouchOutside(Z)V

    .line 157
    invoke-virtual {v8}, Landroid/app/Dialog;->show()V

    return-void
.end method

.method private static b(Landroid/content/Context;Ljava/lang/String;)V
    .locals 3

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

    const-class v1, Lcom/moji/forum/ui/ReportOrGagActivity;

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

    const-string v1, "report_or_gag_type"

    const/4 v2, 0x1

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

    const-string v1, "topic_id"

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

    .line 164
    invoke-virtual {p0, v0}, Landroid/content/Context;->startActivity(Landroid/content/Intent;)V

    return-void
.end method

.method public static b(Landroid/content/Context;Ljava/lang/String;ZLjava/lang/String;Lcom/moji/forum/ui/CommonLongClickDialog$OnLongClickResultListener;)V
    .locals 8

    .line 189
    new-instance v0, Lcom/moji/dialog/control/MJDialogDefaultControl$Builder;

    invoke-direct {v0, p0}, Lcom/moji/dialog/control/MJDialogDefaultControl$Builder;-><init>(Landroid/content/Context;)V

    sget v1, Lcom/moji/forum/R$string;->point_info:I

    .line 190
    invoke-virtual {v0, v1}, Lcom/moji/dialog/control/MJDialogDefaultControl$Builder;->a(I)Lcom/moji/dialog/control/MJDialogDefaultControl$Builder;

    move-result-object v0

    sget v1, Lcom/moji/forum/R$string;->make_sure_delete_topic:I

    .line 191
    invoke-virtual {v0, v1}, Lcom/moji/dialog/control/MJDialogDefaultControl$Builder;->b(I)Lcom/moji/dialog/control/MJDialogDefaultControl$Builder;

    move-result-object v0

    sget v1, Lcom/moji/forum/R$string;->ok:I

    .line 192
    invoke-virtual {v0, v1}, Lcom/moji/dialog/control/MJDialogDefaultControl$Builder;->d(I)Lcom/moji/dialog/control/MJDialogDefaultControl$Builder;

    move-result-object v0

    sget v1, Lcom/moji/forum/R$string;->cancel:I

    .line 193
    invoke-virtual {v0, v1}, Lcom/moji/dialog/control/MJDialogDefaultControl$Builder;->e(I)Lcom/moji/dialog/control/MJDialogDefaultControl$Builder;

    move-result-object v0

    new-instance v7, Lcom/moji/forum/ui/CommonLongClickDialog$6;

    move-object v1, v7

    move-object v2, p0

    move-object v3, p1

    move v4, p2

    move-object v5, p3

    move-object v6, p4

    invoke-direct/range {v1 .. v6}, Lcom/moji/forum/ui/CommonLongClickDialog$6;-><init>(Landroid/content/Context;Ljava/lang/String;ZLjava/lang/String;Lcom/moji/forum/ui/CommonLongClickDialog$OnLongClickResultListener;)V

    .line 194
    invoke-virtual {v0, v7}, Lcom/moji/dialog/control/MJDialogDefaultControl$Builder;->a(Lcom/moji/dialog/control/MJDialogDefaultControl$SingleButtonCallback;)Lcom/moji/dialog/control/MJDialogDefaultControl$Builder;

    move-result-object p0

    .line 200
    invoke-virtual {p0}, Lcom/moji/dialog/control/MJDialogDefaultControl$Builder;->b()Lcom/moji/dialog/MJDialog;

    return-void
.end method
