HurriyetNotificationsViewHolder.smali
.class Lhurriyet/mobil/android/hurriyet/views/notificationsview/HurriyetNotificationsViewHolder;
.super Landroidx/recyclerview/widget/RecyclerView$ViewHolder;
.source "HurriyetNotificationsViewHolder.java"
# instance fields
.field private colorBgCustomNotification:I
.field private colorBgHighlighted:I
.field private colorBgPassive:I
.field private rootV:Landroid/view/View;
.field private timeTv:Landroid/widget/TextView;
.field private titleTv:Landroid/widget/TextView;
# direct methods
.method public constructor <init>(Landroid/view/View;)V
.registers 3
.line 29
invoke-direct {p0, p1}, Landroidx/recyclerview/widget/RecyclerView$ViewHolder;-><init>(Landroid/view/View;)V
const v0, 0x7f090200
.line 30
invoke-virtual {p1, v0}, Landroid/view/View;->findViewById(I)Landroid/view/View;
move-result-object v0
check-cast v0, Landroid/widget/TextView;
iput-object v0, p0, Lhurriyet/mobil/android/hurriyet/views/notificationsview/HurriyetNotificationsViewHolder;->timeTv:Landroid/widget/TextView;
const v0, 0x7f0901fe
.line 31
invoke-virtual {p1, v0}, Landroid/view/View;->findViewById(I)Landroid/view/View;
move-result-object v0
check-cast v0, Landroid/widget/TextView;
iput-object v0, p0, Lhurriyet/mobil/android/hurriyet/views/notificationsview/HurriyetNotificationsViewHolder;->titleTv:Landroid/widget/TextView;
const v0, 0x7f0901ff
.line 32
invoke-virtual {p1, v0}, Landroid/view/View;->findViewById(I)Landroid/view/View;
move-result-object p1
iput-object p1, p0, Lhurriyet/mobil/android/hurriyet/views/notificationsview/HurriyetNotificationsViewHolder;->rootV:Landroid/view/View;
const p1, 0x7f06002f
.line 35
invoke-static {p1}, Lhurriyet/mobil/android/hurriyet/HApp;->getColorWithID(I)I
move-result p1
iput p1, p0, Lhurriyet/mobil/android/hurriyet/views/notificationsview/HurriyetNotificationsViewHolder;->colorBgCustomNotification:I
const p1, 0x7f060030
.line 36
invoke-static {p1}, Lhurriyet/mobil/android/hurriyet/HApp;->getColorWithID(I)I
move-result p1
iput p1, p0, Lhurriyet/mobil/android/hurriyet/views/notificationsview/HurriyetNotificationsViewHolder;->colorBgHighlighted:I
const p1, 0x7f060147
.line 38
invoke-static {p1}, Lhurriyet/mobil/android/hurriyet/HApp;->getColorWithID(I)I
move-result p1
iput p1, p0, Lhurriyet/mobil/android/hurriyet/views/notificationsview/HurriyetNotificationsViewHolder;->colorBgPassive:I
return-void
.end method
# virtual methods
.method public setData(ILhurriyet/mobil/android/hurriyet/views/notificationsview/NotificationModel;Lhurriyet/mobil/android/hurriyet/views/notificationsview/HurriyetNotificationsViewListener;)V
.registers 6
.line 42
iget-object v0, p0, Lhurriyet/mobil/android/hurriyet/views/notificationsview/HurriyetNotificationsViewHolder;->rootV:Landroid/view/View;
new-instance v1, Lhurriyet/mobil/android/hurriyet/views/notificationsview/HurriyetNotificationsViewHolder$1;
invoke-direct {v1, p0, p3, p1}, Lhurriyet/mobil/android/hurriyet/views/notificationsview/HurriyetNotificationsViewHolder$1;-><init>(Lhurriyet/mobil/android/hurriyet/views/notificationsview/HurriyetNotificationsViewHolder;Lhurriyet/mobil/android/hurriyet/views/notificationsview/HurriyetNotificationsViewListener;I)V
invoke-virtual {v0, v1}, Landroid/view/View;->setOnClickListener(Landroid/view/View$OnClickListener;)V
.line 52
:try_start_a
new-instance p1, Ljava/text/SimpleDateFormat;
const-string p3, "yyyy-MM-dd\'T\'HH:mm:ss"
invoke-direct {p1, p3}, Ljava/text/SimpleDateFormat;-><init>(Ljava/lang/String;)V
.line 53
iget-object p3, p2, Lhurriyet/mobil/android/hurriyet/views/notificationsview/NotificationModel;->sentTime:Ljava/lang/String;
invoke-virtual {p1, p3}, Ljava/text/SimpleDateFormat;->parse(Ljava/lang/String;)Ljava/util/Date;
move-result-object p1
.line 54
new-instance p3, Ljava/text/SimpleDateFormat;
const-string v0, "HH:mm"
invoke-direct {p3, v0}, Ljava/text/SimpleDateFormat;-><init>(Ljava/lang/String;)V
.line 55
invoke-virtual {p3, p1}, Ljava/text/SimpleDateFormat;->format(Ljava/util/Date;)Ljava/lang/String;
move-result-object p1
.line 56
iget-object p3, p0, Lhurriyet/mobil/android/hurriyet/views/notificationsview/HurriyetNotificationsViewHolder;->timeTv:Landroid/widget/TextView;
invoke-virtual {p3, p1}, Landroid/widget/TextView;->setText(Ljava/lang/CharSequence;)V
.line 57
iget-object p1, p0, Lhurriyet/mobil/android/hurriyet/views/notificationsview/HurriyetNotificationsViewHolder;->timeTv:Landroid/widget/TextView;
const/4 p3, 0x0
invoke-virtual {p1, p3}, Landroid/widget/TextView;->setVisibility(I)V
:try_end_2d
.catch Ljava/lang/Exception; {:try_start_a .. :try_end_2d} :catch_2e
goto :goto_35
.line 59
:catch_2e
iget-object p1, p0, Lhurriyet/mobil/android/hurriyet/views/notificationsview/HurriyetNotificationsViewHolder;->timeTv:Landroid/widget/TextView;
const/16 p3, 0x8
invoke-virtual {p1, p3}, Landroid/widget/TextView;->setVisibility(I)V
.line 62
:goto_35
iget-object p1, p0, Lhurriyet/mobil/android/hurriyet/views/notificationsview/HurriyetNotificationsViewHolder;->titleTv:Landroid/widget/TextView;
iget-object p3, p2, Lhurriyet/mobil/android/hurriyet/views/notificationsview/NotificationModel;->title:Ljava/lang/String;
invoke-virtual {p1, p3}, Landroid/widget/TextView;->setText(Ljava/lang/CharSequence;)V
.line 64
iget-boolean p1, p2, Lhurriyet/mobil/android/hurriyet/views/notificationsview/NotificationModel;->isCustomNotification:Z
if-eqz p1, :cond_48
.line 65
iget-object p1, p0, Lhurriyet/mobil/android/hurriyet/views/notificationsview/HurriyetNotificationsViewHolder;->rootV:Landroid/view/View;
iget p2, p0, Lhurriyet/mobil/android/hurriyet/views/notificationsview/HurriyetNotificationsViewHolder;->colorBgCustomNotification:I
invoke-virtual {p1, p2}, Landroid/view/View;->setBackgroundColor(I)V
goto :goto_5b
.line 66
:cond_48
iget-boolean p1, p2, Lhurriyet/mobil/android/hurriyet/views/notificationsview/NotificationModel;->isSeen:Z
if-eqz p1, :cond_54
.line 67
iget-object p1, p0, Lhurriyet/mobil/android/hurriyet/views/notificationsview/HurriyetNotificationsViewHolder;->rootV:Landroid/view/View;
iget p2, p0, Lhurriyet/mobil/android/hurriyet/views/notificationsview/HurriyetNotificationsViewHolder;->colorBgPassive:I
invoke-virtual {p1, p2}, Landroid/view/View;->setBackgroundColor(I)V
goto :goto_5b
.line 69
:cond_54
iget-object p1, p0, Lhurriyet/mobil/android/hurriyet/views/notificationsview/HurriyetNotificationsViewHolder;->rootV:Landroid/view/View;
iget p2, p0, Lhurriyet/mobil/android/hurriyet/views/notificationsview/HurriyetNotificationsViewHolder;->colorBgHighlighted:I
invoke-virtual {p1, p2}, Landroid/view/View;->setBackgroundColor(I)V
:goto_5b
return-void
.end method