Weather/smali_classes3/com/moji/user/message/cell/CommentMsgCell.smali
2021-05-10 10:13:34 +02:00

544 lines
15 KiB
Smali

.class public Lcom/moji/user/message/cell/CommentMsgCell;
.super Lcom/moji/user/message/BaseMsgCell;
.source "CommentMsgCell.java"
# annotations
.annotation system Ldalvik/annotation/Signature;
value = {
"Lcom/moji/user/message/BaseMsgCell<",
"Lcom/moji/http/message/bean/CommentMsgResp$CommentMsg;",
">;"
}
.end annotation
# direct methods
.method public constructor <init>(Lcom/moji/http/message/bean/CommentMsgResp$CommentMsg;Lcom/moji/user/message/IMsgDetailCallBack;)V
.locals 0
.line 32
invoke-direct {p0, p1, p2}, Lcom/moji/user/message/BaseMsgCell;-><init>(Ljava/lang/Object;Lcom/moji/user/message/IMsgDetailCallBack;)V
return-void
.end method
# virtual methods
.method public a()I
.locals 1
const/4 v0, 0x2
return v0
.end method
.method public a(Landroid/view/ViewGroup;I)Lcom/moji/newliveview/dynamic/base/CustomViewHolder;
.locals 3
.line 42
new-instance p2, Lcom/moji/newliveview/dynamic/base/CustomViewHolder;
invoke-virtual {p1}, Landroid/view/ViewGroup;->getContext()Landroid/content/Context;
move-result-object v0
invoke-static {v0}, Landroid/view/LayoutInflater;->from(Landroid/content/Context;)Landroid/view/LayoutInflater;
move-result-object v0
sget v1, Lcom/moji/user/R$layout;->item_msg_comment:I
const/4 v2, 0x0
invoke-virtual {v0, v1, p1, v2}, Landroid/view/LayoutInflater;->inflate(ILandroid/view/ViewGroup;Z)Landroid/view/View;
move-result-object p1
invoke-direct {p2, p1}, Lcom/moji/newliveview/dynamic/base/CustomViewHolder;-><init>(Landroid/view/View;)V
return-object p2
.end method
.method public a(Lcom/moji/newliveview/dynamic/base/CustomViewHolder;I)V
.locals 9
.line 47
sget p2, Lcom/moji/user/R$id;->iv_face:I
invoke-virtual {p1, p2}, Lcom/moji/newliveview/dynamic/base/CustomViewHolder;->c(I)Landroid/view/View;
move-result-object p2
check-cast p2, Lcom/moji/imageview/CertificateRoundImageView;
.line 48
invoke-virtual {p1}, Lcom/moji/newliveview/dynamic/base/CustomViewHolder;->y()Landroid/content/Context;
move-result-object v0
iget-object v1, p0, Lcom/moji/user/message/cell/CommentMsgCell;->c:Ljava/lang/Object;
check-cast v1, Lcom/moji/http/message/bean/CommentMsgResp$CommentMsg;
iget-object v1, v1, Lcom/moji/http/message/bean/CommentMsgResp$CommentMsg;->face:Ljava/lang/String;
sget v2, Lcom/moji/user/R$drawable;->default_user_face_male:I
invoke-static {v0, v1, p2, v2}, Lcom/moji/tool/ImageUtils;->b(Landroid/content/Context;Ljava/lang/String;Landroid/widget/ImageView;I)V
.line 49
iget-object v0, p0, Lcom/moji/user/message/cell/CommentMsgCell;->c:Ljava/lang/Object;
check-cast v0, Lcom/moji/http/message/bean/CommentMsgResp$CommentMsg;
iget v0, v0, Lcom/moji/http/message/bean/CommentMsgResp$CommentMsg;->offical_type:I
invoke-virtual {p2, v0}, Lcom/moji/imageview/CertificateRoundImageView;->setCertificateType(I)V
.line 51
sget v0, Lcom/moji/user/R$id;->tv_nick:I
invoke-virtual {p1, v0}, Lcom/moji/newliveview/dynamic/base/CustomViewHolder;->c(I)Landroid/view/View;
move-result-object v0
check-cast v0, Landroid/widget/TextView;
.line 52
iget-object v1, p0, Lcom/moji/user/message/cell/CommentMsgCell;->c:Ljava/lang/Object;
check-cast v1, Lcom/moji/http/message/bean/CommentMsgResp$CommentMsg;
iget-object v1, v1, Lcom/moji/http/message/bean/CommentMsgResp$CommentMsg;->from_nick:Ljava/lang/String;
invoke-virtual {v0, v1}, Landroid/widget/TextView;->setText(Ljava/lang/CharSequence;)V
.line 54
sget v1, Lcom/moji/user/R$id;->reply_comment:I
invoke-virtual {p1, v1}, Lcom/moji/newliveview/dynamic/base/CustomViewHolder;->c(I)Landroid/view/View;
move-result-object v1
check-cast v1, Landroid/widget/TextView;
const/4 v2, 0x0
.line 55
invoke-virtual {v1, v2}, Landroid/widget/TextView;->setVisibility(I)V
.line 57
sget v3, Lcom/moji/user/R$id;->tv_what_comment:I
invoke-virtual {p1, v3}, Lcom/moji/newliveview/dynamic/base/CustomViewHolder;->c(I)Landroid/view/View;
move-result-object v3
check-cast v3, Landroid/widget/TextView;
.line 59
sget v4, Lcom/moji/user/R$id;->tv_other_nick:I
invoke-virtual {p1, v4}, Lcom/moji/newliveview/dynamic/base/CustomViewHolder;->c(I)Landroid/view/View;
move-result-object v4
check-cast v4, Landroid/widget/TextView;
.line 60
invoke-virtual {v4, v2}, Landroid/widget/TextView;->setVisibility(I)V
.line 63
iget-object v5, p0, Lcom/moji/user/message/cell/CommentMsgCell;->c:Ljava/lang/Object;
check-cast v5, Lcom/moji/http/message/bean/CommentMsgResp$CommentMsg;
iget v5, v5, Lcom/moji/http/message/bean/CommentMsgResp$CommentMsg;->type:I
const/16 v6, 0x8
const/4 v7, 0x3
if-eq v5, v7, :cond_1
iget-object v5, p0, Lcom/moji/user/message/cell/CommentMsgCell;->c:Ljava/lang/Object;
check-cast v5, Lcom/moji/http/message/bean/CommentMsgResp$CommentMsg;
iget v5, v5, Lcom/moji/http/message/bean/CommentMsgResp$CommentMsg;->type:I
const/4 v7, 0x5
if-ne v5, v7, :cond_0
goto :goto_0
.line 69
:cond_0
iget-object v1, p0, Lcom/moji/user/message/cell/CommentMsgCell;->c:Ljava/lang/Object;
check-cast v1, Lcom/moji/http/message/bean/CommentMsgResp$CommentMsg;
iget-object v1, v1, Lcom/moji/http/message/bean/CommentMsgResp$CommentMsg;->to_nick:Ljava/lang/String;
invoke-virtual {v4, v1}, Landroid/widget/TextView;->setText(Ljava/lang/CharSequence;)V
.line 70
sget v1, Lcom/moji/user/R$string;->what_comment:I
invoke-virtual {v3, v1}, Landroid/widget/TextView;->setText(I)V
.line 71
invoke-static {}, Lcom/moji/tool/DeviceTool;->b()I
move-result v1
const/high16 v3, 0x437a0000 # 250.0f
invoke-static {v3}, Lcom/moji/tool/DeviceTool;->a(F)I
move-result v3
sub-int/2addr v1, v3
div-int/lit8 v1, v1, 0x2
goto :goto_1
.line 64
:cond_1
:goto_0
invoke-virtual {v4, v6}, Landroid/widget/TextView;->setVisibility(I)V
.line 65
invoke-virtual {v1, v6}, Landroid/widget/TextView;->setVisibility(I)V
.line 66
sget v1, Lcom/moji/user/R$string;->comment_my_pic:I
invoke-virtual {v3, v1}, Landroid/widget/TextView;->setText(I)V
.line 67
invoke-static {}, Lcom/moji/tool/DeviceTool;->b()I
move-result v1
const/high16 v3, 0x435c0000 # 220.0f
invoke-static {v3}, Lcom/moji/tool/DeviceTool;->a(F)I
move-result v3
sub-int/2addr v1, v3
.line 73
:goto_1
invoke-virtual {v4, v1}, Landroid/widget/TextView;->setMaxWidth(I)V
.line 74
invoke-virtual {v0, v1}, Landroid/widget/TextView;->setMaxWidth(I)V
.line 76
sget v0, Lcom/moji/user/R$id;->tv_comment:I
invoke-virtual {p1, v0}, Lcom/moji/newliveview/dynamic/base/CustomViewHolder;->c(I)Landroid/view/View;
move-result-object v0
check-cast v0, Landroid/widget/TextView;
.line 77
iget-object v1, p0, Lcom/moji/user/message/cell/CommentMsgCell;->c:Ljava/lang/Object;
check-cast v1, Lcom/moji/http/message/bean/CommentMsgResp$CommentMsg;
iget v1, v1, Lcom/moji/http/message/bean/CommentMsgResp$CommentMsg;->is_del:I
const/4 v3, 0x1
if-ne v1, v3, :cond_2
const/16 v1, 0x11
.line 78
invoke-virtual {v0, v1}, Landroid/widget/TextView;->setGravity(I)V
const/high16 v1, 0x41300000 # 11.0f
.line 79
invoke-virtual {v0, v3, v1}, Landroid/widget/TextView;->setTextSize(IF)V
const-string v1, "#999999"
.line 80
invoke-static {v1}, Landroid/graphics/Color;->parseColor(Ljava/lang/String;)I
move-result v1
invoke-virtual {v0, v1}, Landroid/widget/TextView;->setTextColor(I)V
.line 81
sget v1, Lcom/moji/user/R$drawable;->msg_commnet_del_bg:I
invoke-virtual {v0, v1}, Landroid/widget/TextView;->setBackgroundResource(I)V
.line 82
sget v1, Lcom/moji/user/R$string;->the_comment_deleted:I
invoke-virtual {v0, v1}, Landroid/widget/TextView;->setText(I)V
goto :goto_2
.line 84
:cond_2
invoke-virtual {v0, v2}, Landroid/widget/TextView;->setGravity(I)V
const/high16 v1, 0x41600000 # 14.0f
.line 85
invoke-virtual {v0, v3, v1}, Landroid/widget/TextView;->setTextSize(IF)V
const-string v1, "#323232"
.line 86
invoke-static {v1}, Landroid/graphics/Color;->parseColor(Ljava/lang/String;)I
move-result v1
invoke-virtual {v0, v1}, Landroid/widget/TextView;->setTextColor(I)V
.line 87
sget v1, Lcom/moji/user/R$color;->white:I
invoke-virtual {v0, v1}, Landroid/widget/TextView;->setBackgroundResource(I)V
.line 88
invoke-static {}, Lcom/moji/tool/AppDelegate;->a()Landroid/content/Context;
move-result-object v1
iget-object v4, p0, Lcom/moji/user/message/cell/CommentMsgCell;->c:Ljava/lang/Object;
check-cast v4, Lcom/moji/http/message/bean/CommentMsgResp$CommentMsg;
iget-object v4, v4, Lcom/moji/http/message/bean/CommentMsgResp$CommentMsg;->content:Ljava/lang/String;
invoke-static {v1, v4}, Lcom/moji/mjweather/ipc/utils/EmojiUtils;->a(Landroid/content/Context;Ljava/lang/String;)Landroid/text/SpannableString;
move-result-object v1
invoke-virtual {v0, v1}, Landroid/widget/TextView;->setText(Ljava/lang/CharSequence;)V
.line 91
:goto_2
sget v0, Lcom/moji/user/R$id;->tv_time:I
invoke-virtual {p1, v0}, Lcom/moji/newliveview/dynamic/base/CustomViewHolder;->c(I)Landroid/view/View;
move-result-object v0
check-cast v0, Landroid/widget/TextView;
.line 92
iget-object v1, p0, Lcom/moji/user/message/cell/CommentMsgCell;->c:Ljava/lang/Object;
check-cast v1, Lcom/moji/http/message/bean/CommentMsgResp$CommentMsg;
iget-wide v4, v1, Lcom/moji/http/message/bean/CommentMsgResp$CommentMsg;->create_time:J
const-wide/16 v7, 0x0
cmp-long v1, v4, v7
if-nez v1, :cond_3
const-string v1, ""
goto :goto_3
:cond_3
iget-object v1, p0, Lcom/moji/user/message/cell/CommentMsgCell;->c:Ljava/lang/Object;
check-cast v1, Lcom/moji/http/message/bean/CommentMsgResp$CommentMsg;
iget-wide v4, v1, Lcom/moji/http/message/bean/CommentMsgResp$CommentMsg;->create_time:J
invoke-static {v4, v5}, Lcom/moji/mjweather/ipc/utils/DateUtils;->a(J)Ljava/lang/String;
move-result-object v1
:goto_3
invoke-virtual {v0, v1}, Landroid/widget/TextView;->setText(Ljava/lang/CharSequence;)V
.line 94
sget v0, Lcom/moji/user/R$id;->iv_pic:I
invoke-virtual {p1, v0}, Lcom/moji/newliveview/dynamic/base/CustomViewHolder;->c(I)Landroid/view/View;
move-result-object v0
check-cast v0, Landroid/widget/ImageView;
.line 95
iget-object v1, p0, Lcom/moji/user/message/cell/CommentMsgCell;->c:Ljava/lang/Object;
check-cast v1, Lcom/moji/http/message/bean/CommentMsgResp$CommentMsg;
iget-object v1, v1, Lcom/moji/http/message/bean/CommentMsgResp$CommentMsg;->path:Ljava/lang/String;
if-eqz v1, :cond_4
.line 96
invoke-virtual {p1}, Lcom/moji/newliveview/dynamic/base/CustomViewHolder;->y()Landroid/content/Context;
move-result-object v1
invoke-static {v1}, Lcom/squareup/picasso/Picasso;->a(Landroid/content/Context;)Lcom/squareup/picasso/Picasso;
move-result-object v1
iget-object v4, p0, Lcom/moji/user/message/cell/CommentMsgCell;->c:Ljava/lang/Object;
check-cast v4, Lcom/moji/http/message/bean/CommentMsgResp$CommentMsg;
iget-object v4, v4, Lcom/moji/http/message/bean/CommentMsgResp$CommentMsg;->path:Ljava/lang/String;
invoke-virtual {v1, v4}, Lcom/squareup/picasso/Picasso;->a(Ljava/lang/String;)Lcom/squareup/picasso/RequestCreator;
move-result-object v1
invoke-static {}, Lcom/moji/tool/ImageUtils;->a()I
move-result v4
invoke-virtual {v1, v4}, Lcom/squareup/picasso/RequestCreator;->a(I)Lcom/squareup/picasso/RequestCreator;
move-result-object v1
invoke-virtual {v1}, Lcom/squareup/picasso/RequestCreator;->b()Lcom/squareup/picasso/RequestCreator;
move-result-object v1
invoke-virtual {v1}, Lcom/squareup/picasso/RequestCreator;->f()Lcom/squareup/picasso/RequestCreator;
move-result-object v1
invoke-virtual {v1, v0}, Lcom/squareup/picasso/RequestCreator;->a(Landroid/widget/ImageView;)V
goto :goto_4
.line 98
:cond_4
sget v1, Lcom/moji/user/R$drawable;->translucent:I
invoke-virtual {v0, v1}, Landroid/widget/ImageView;->setImageResource(I)V
.line 101
:goto_4
sget v0, Lcom/moji/user/R$id;->iv_red_dot:I
invoke-virtual {p1, v0}, Lcom/moji/newliveview/dynamic/base/CustomViewHolder;->c(I)Landroid/view/View;
move-result-object v0
check-cast v0, Landroid/widget/ImageView;
.line 102
iget-object v1, p0, Lcom/moji/user/message/cell/CommentMsgCell;->c:Ljava/lang/Object;
check-cast v1, Lcom/moji/http/message/bean/CommentMsgResp$CommentMsg;
iget v1, v1, Lcom/moji/http/message/bean/CommentMsgResp$CommentMsg;->is_read:I
if-ne v1, v3, :cond_5
.line 103
invoke-virtual {v0, v2}, Landroid/widget/ImageView;->setVisibility(I)V
goto :goto_5
.line 105
:cond_5
invoke-virtual {v0, v6}, Landroid/widget/ImageView;->setVisibility(I)V
.line 108
:goto_5
invoke-virtual {p1}, Lcom/moji/newliveview/dynamic/base/CustomViewHolder;->z()Landroid/view/View;
move-result-object v0
invoke-virtual {v0, p0}, Landroid/view/View;->setOnLongClickListener(Landroid/view/View$OnLongClickListener;)V
.line 109
invoke-virtual {p1}, Lcom/moji/newliveview/dynamic/base/CustomViewHolder;->z()Landroid/view/View;
move-result-object p1
invoke-virtual {p1, p0}, Landroid/view/View;->setOnClickListener(Landroid/view/View$OnClickListener;)V
.line 110
invoke-virtual {p2, p0}, Lcom/moji/imageview/CertificateRoundImageView;->setOnClickListener(Landroid/view/View$OnClickListener;)V
return-void
.end method
.method public onClick(Landroid/view/View;)V
.locals 2
.line 115
iget-object v0, p0, Lcom/moji/user/message/cell/CommentMsgCell;->c:Ljava/lang/Object;
check-cast v0, Lcom/moji/http/message/bean/CommentMsgResp$CommentMsg;
const/4 v1, 0x2
iput v1, v0, Lcom/moji/http/message/bean/CommentMsgResp$CommentMsg;->is_read:I
.line 116
invoke-virtual {p1}, Landroid/view/View;->getId()I
move-result p1
sget v0, Lcom/moji/user/R$id;->iv_face:I
if-ne p1, v0, :cond_0
.line 117
iget-object p1, p0, Lcom/moji/user/message/cell/CommentMsgCell;->a:Lcom/moji/user/message/IMsgDetailCallBack;
const/4 v0, 0x1
iget-object v1, p0, Lcom/moji/user/message/cell/CommentMsgCell;->c:Ljava/lang/Object;
invoke-interface {p1, v0, v1}, Lcom/moji/user/message/IMsgDetailCallBack;->a(ILjava/lang/Object;)V
goto :goto_0
.line 119
:cond_0
iget-object p1, p0, Lcom/moji/user/message/cell/CommentMsgCell;->a:Lcom/moji/user/message/IMsgDetailCallBack;
const/4 v0, 0x0
iget-object v1, p0, Lcom/moji/user/message/cell/CommentMsgCell;->c:Ljava/lang/Object;
invoke-interface {p1, v0, v1}, Lcom/moji/user/message/IMsgDetailCallBack;->a(ILjava/lang/Object;)V
:goto_0
return-void
.end method
.method public onLongClick(Landroid/view/View;)Z
.locals 0
.line 125
iget-object p1, p0, Lcom/moji/user/message/cell/CommentMsgCell;->a:Lcom/moji/user/message/IMsgDetailCallBack;
invoke-interface {p1, p0}, Lcom/moji/user/message/IMsgDetailCallBack;->a(Lcom/moji/newliveview/dynamic/base/BaseCell;)V
const/4 p1, 0x1
return p1
.end method