2020-09-09 19:21:20 +00:00
|
|
|
.class public final Lcom/discord/widgets/status/WidgetChatStatus;
|
|
|
|
.super Lcom/discord/app/AppFragment;
|
|
|
|
.source "WidgetChatStatus.kt"
|
|
|
|
|
|
|
|
|
|
|
|
# annotations
|
|
|
|
.annotation system Ldalvik/annotation/MemberClasses;
|
|
|
|
value = {
|
|
|
|
Lcom/discord/widgets/status/WidgetChatStatus$Model;
|
|
|
|
}
|
|
|
|
.end annotation
|
|
|
|
|
|
|
|
|
|
|
|
# static fields
|
|
|
|
.field public static final synthetic $$delegatedProperties:[Lkotlin/reflect/KProperty;
|
|
|
|
|
|
|
|
|
|
|
|
# instance fields
|
|
|
|
.field public final statusUnreadMessages$delegate:Lkotlin/properties/ReadOnlyProperty;
|
|
|
|
|
|
|
|
.field public final statusUnreadMessagesMark$delegate:Lkotlin/properties/ReadOnlyProperty;
|
|
|
|
|
|
|
|
.field public final statusUnreadMessagesText$delegate:Lkotlin/properties/ReadOnlyProperty;
|
|
|
|
|
|
|
|
|
|
|
|
# direct methods
|
|
|
|
.method public static constructor <clinit>()V
|
|
|
|
.locals 5
|
|
|
|
|
|
|
|
const/4 v0, 0x3
|
|
|
|
|
|
|
|
new-array v0, v0, [Lkotlin/reflect/KProperty;
|
|
|
|
|
|
|
|
const-class v1, Lcom/discord/widgets/status/WidgetChatStatus;
|
|
|
|
|
|
|
|
const-string v2, "statusUnreadMessages"
|
|
|
|
|
|
|
|
const-string v3, "getStatusUnreadMessages()Landroid/widget/LinearLayout;"
|
|
|
|
|
|
|
|
const/4 v4, 0x0
|
|
|
|
|
|
|
|
invoke-static {v1, v2, v3, v4}, Lf/e/b/a/a;->L(Ljava/lang/Class;Ljava/lang/String;Ljava/lang/String;I)Lk0/n/c/r;
|
|
|
|
|
|
|
|
move-result-object v1
|
|
|
|
|
|
|
|
aput-object v1, v0, v4
|
|
|
|
|
|
|
|
const-class v1, Lcom/discord/widgets/status/WidgetChatStatus;
|
|
|
|
|
|
|
|
const-string v2, "statusUnreadMessagesText"
|
|
|
|
|
|
|
|
const-string v3, "getStatusUnreadMessagesText()Landroid/widget/TextView;"
|
|
|
|
|
|
|
|
invoke-static {v1, v2, v3, v4}, Lf/e/b/a/a;->L(Ljava/lang/Class;Ljava/lang/String;Ljava/lang/String;I)Lk0/n/c/r;
|
|
|
|
|
|
|
|
move-result-object v1
|
|
|
|
|
|
|
|
const/4 v2, 0x1
|
|
|
|
|
|
|
|
aput-object v1, v0, v2
|
|
|
|
|
|
|
|
const-class v1, Lcom/discord/widgets/status/WidgetChatStatus;
|
|
|
|
|
|
|
|
const-string v2, "statusUnreadMessagesMark"
|
|
|
|
|
|
|
|
const-string v3, "getStatusUnreadMessagesMark()Landroid/view/View;"
|
|
|
|
|
|
|
|
invoke-static {v1, v2, v3, v4}, Lf/e/b/a/a;->L(Ljava/lang/Class;Ljava/lang/String;Ljava/lang/String;I)Lk0/n/c/r;
|
|
|
|
|
|
|
|
move-result-object v1
|
|
|
|
|
|
|
|
const/4 v2, 0x2
|
|
|
|
|
|
|
|
aput-object v1, v0, v2
|
|
|
|
|
|
|
|
sput-object v0, Lcom/discord/widgets/status/WidgetChatStatus;->$$delegatedProperties:[Lkotlin/reflect/KProperty;
|
|
|
|
|
|
|
|
return-void
|
|
|
|
.end method
|
|
|
|
|
|
|
|
.method public constructor <init>()V
|
|
|
|
.locals 1
|
|
|
|
|
|
|
|
invoke-direct {p0}, Lcom/discord/app/AppFragment;-><init>()V
|
|
|
|
|
2020-09-10 21:23:57 +00:00
|
|
|
const v0, 0x7f0a026e
|
2020-09-09 19:21:20 +00:00
|
|
|
|
|
|
|
invoke-static {p0, v0}, Lk0/j/a;->i(Landroidx/fragment/app/Fragment;I)Lkotlin/properties/ReadOnlyProperty;
|
|
|
|
|
|
|
|
move-result-object v0
|
|
|
|
|
|
|
|
iput-object v0, p0, Lcom/discord/widgets/status/WidgetChatStatus;->statusUnreadMessages$delegate:Lkotlin/properties/ReadOnlyProperty;
|
|
|
|
|
2020-09-10 21:23:57 +00:00
|
|
|
const v0, 0x7f0a0270
|
2020-09-09 19:21:20 +00:00
|
|
|
|
|
|
|
invoke-static {p0, v0}, Lk0/j/a;->i(Landroidx/fragment/app/Fragment;I)Lkotlin/properties/ReadOnlyProperty;
|
|
|
|
|
|
|
|
move-result-object v0
|
|
|
|
|
|
|
|
iput-object v0, p0, Lcom/discord/widgets/status/WidgetChatStatus;->statusUnreadMessagesText$delegate:Lkotlin/properties/ReadOnlyProperty;
|
|
|
|
|
2020-09-10 21:23:57 +00:00
|
|
|
const v0, 0x7f0a026f
|
2020-09-09 19:21:20 +00:00
|
|
|
|
|
|
|
invoke-static {p0, v0}, Lk0/j/a;->i(Landroidx/fragment/app/Fragment;I)Lkotlin/properties/ReadOnlyProperty;
|
|
|
|
|
|
|
|
move-result-object v0
|
|
|
|
|
|
|
|
iput-object v0, p0, Lcom/discord/widgets/status/WidgetChatStatus;->statusUnreadMessagesMark$delegate:Lkotlin/properties/ReadOnlyProperty;
|
|
|
|
|
|
|
|
return-void
|
|
|
|
.end method
|
|
|
|
|
|
|
|
.method public static final synthetic access$configureUI(Lcom/discord/widgets/status/WidgetChatStatus;Lcom/discord/widgets/status/WidgetChatStatus$Model;)V
|
|
|
|
.locals 0
|
|
|
|
|
|
|
|
invoke-direct {p0, p1}, Lcom/discord/widgets/status/WidgetChatStatus;->configureUI(Lcom/discord/widgets/status/WidgetChatStatus$Model;)V
|
|
|
|
|
|
|
|
return-void
|
|
|
|
.end method
|
|
|
|
|
|
|
|
.method private final configureUI(Lcom/discord/widgets/status/WidgetChatStatus$Model;)V
|
|
|
|
.locals 5
|
|
|
|
.annotation build Landroidx/annotation/UiThread;
|
|
|
|
.end annotation
|
|
|
|
|
|
|
|
invoke-direct {p0}, Lcom/discord/widgets/status/WidgetChatStatus;->getStatusUnreadMessages()Landroid/widget/LinearLayout;
|
|
|
|
|
|
|
|
move-result-object v0
|
|
|
|
|
|
|
|
invoke-virtual {p1}, Lcom/discord/widgets/status/WidgetChatStatus$Model;->getUnreadVisible()Z
|
|
|
|
|
|
|
|
move-result v1
|
|
|
|
|
|
|
|
if-eqz v1, :cond_0
|
|
|
|
|
|
|
|
const/4 v1, 0x0
|
|
|
|
|
|
|
|
goto :goto_0
|
|
|
|
|
|
|
|
:cond_0
|
|
|
|
const/16 v1, 0x8
|
|
|
|
|
|
|
|
:goto_0
|
|
|
|
invoke-virtual {v0, v1}, Landroid/view/View;->setVisibility(I)V
|
|
|
|
|
|
|
|
invoke-direct {p0}, Lcom/discord/widgets/status/WidgetChatStatus;->getStatusUnreadMessages()Landroid/widget/LinearLayout;
|
|
|
|
|
|
|
|
move-result-object v0
|
|
|
|
|
|
|
|
new-instance v1, Lcom/discord/widgets/status/WidgetChatStatus$configureUI$1;
|
|
|
|
|
|
|
|
invoke-direct {v1, p1}, Lcom/discord/widgets/status/WidgetChatStatus$configureUI$1;-><init>(Lcom/discord/widgets/status/WidgetChatStatus$Model;)V
|
|
|
|
|
|
|
|
invoke-virtual {v0, v1}, Landroid/widget/LinearLayout;->setOnClickListener(Landroid/view/View$OnClickListener;)V
|
|
|
|
|
|
|
|
invoke-direct {p0}, Lcom/discord/widgets/status/WidgetChatStatus;->getStatusUnreadMessagesText()Landroid/widget/TextView;
|
|
|
|
|
|
|
|
move-result-object v0
|
|
|
|
|
|
|
|
invoke-virtual {p1}, Lcom/discord/widgets/status/WidgetChatStatus$Model;->isUnreadEstimate()Z
|
|
|
|
|
|
|
|
move-result v1
|
|
|
|
|
|
|
|
invoke-virtual {p1}, Lcom/discord/widgets/status/WidgetChatStatus$Model;->getUnreadCount()I
|
|
|
|
|
|
|
|
move-result v2
|
|
|
|
|
|
|
|
invoke-virtual {p1}, Lcom/discord/widgets/status/WidgetChatStatus$Model;->getUnreadMessageId()J
|
|
|
|
|
|
|
|
move-result-wide v3
|
|
|
|
|
|
|
|
invoke-direct {p0, v1, v2, v3, v4}, Lcom/discord/widgets/status/WidgetChatStatus;->getUnreadMessageText(ZIJ)Ljava/lang/String;
|
|
|
|
|
|
|
|
move-result-object v1
|
|
|
|
|
|
|
|
invoke-virtual {v0, v1}, Landroid/widget/TextView;->setText(Ljava/lang/CharSequence;)V
|
|
|
|
|
|
|
|
invoke-direct {p0}, Lcom/discord/widgets/status/WidgetChatStatus;->getStatusUnreadMessagesMark()Landroid/view/View;
|
|
|
|
|
|
|
|
move-result-object v0
|
|
|
|
|
|
|
|
new-instance v1, Lcom/discord/widgets/status/WidgetChatStatus$configureUI$2;
|
|
|
|
|
|
|
|
invoke-direct {v1, p1}, Lcom/discord/widgets/status/WidgetChatStatus$configureUI$2;-><init>(Lcom/discord/widgets/status/WidgetChatStatus$Model;)V
|
|
|
|
|
|
|
|
invoke-virtual {v0, v1}, Landroid/view/View;->setOnClickListener(Landroid/view/View$OnClickListener;)V
|
|
|
|
|
|
|
|
return-void
|
|
|
|
.end method
|
|
|
|
|
|
|
|
.method private final getStatusUnreadMessages()Landroid/widget/LinearLayout;
|
|
|
|
.locals 3
|
|
|
|
|
|
|
|
iget-object v0, p0, Lcom/discord/widgets/status/WidgetChatStatus;->statusUnreadMessages$delegate:Lkotlin/properties/ReadOnlyProperty;
|
|
|
|
|
|
|
|
sget-object v1, Lcom/discord/widgets/status/WidgetChatStatus;->$$delegatedProperties:[Lkotlin/reflect/KProperty;
|
|
|
|
|
|
|
|
const/4 v2, 0x0
|
|
|
|
|
|
|
|
aget-object v1, v1, v2
|
|
|
|
|
|
|
|
invoke-interface {v0, p0, v1}, Lkotlin/properties/ReadOnlyProperty;->getValue(Ljava/lang/Object;Lkotlin/reflect/KProperty;)Ljava/lang/Object;
|
|
|
|
|
|
|
|
move-result-object v0
|
|
|
|
|
|
|
|
check-cast v0, Landroid/widget/LinearLayout;
|
|
|
|
|
|
|
|
return-object v0
|
|
|
|
.end method
|
|
|
|
|
|
|
|
.method private final getStatusUnreadMessagesMark()Landroid/view/View;
|
|
|
|
.locals 3
|
|
|
|
|
|
|
|
iget-object v0, p0, Lcom/discord/widgets/status/WidgetChatStatus;->statusUnreadMessagesMark$delegate:Lkotlin/properties/ReadOnlyProperty;
|
|
|
|
|
|
|
|
sget-object v1, Lcom/discord/widgets/status/WidgetChatStatus;->$$delegatedProperties:[Lkotlin/reflect/KProperty;
|
|
|
|
|
|
|
|
const/4 v2, 0x2
|
|
|
|
|
|
|
|
aget-object v1, v1, v2
|
|
|
|
|
|
|
|
invoke-interface {v0, p0, v1}, Lkotlin/properties/ReadOnlyProperty;->getValue(Ljava/lang/Object;Lkotlin/reflect/KProperty;)Ljava/lang/Object;
|
|
|
|
|
|
|
|
move-result-object v0
|
|
|
|
|
|
|
|
check-cast v0, Landroid/view/View;
|
|
|
|
|
|
|
|
return-object v0
|
|
|
|
.end method
|
|
|
|
|
|
|
|
.method private final getStatusUnreadMessagesText()Landroid/widget/TextView;
|
|
|
|
.locals 3
|
|
|
|
|
|
|
|
iget-object v0, p0, Lcom/discord/widgets/status/WidgetChatStatus;->statusUnreadMessagesText$delegate:Lkotlin/properties/ReadOnlyProperty;
|
|
|
|
|
|
|
|
sget-object v1, Lcom/discord/widgets/status/WidgetChatStatus;->$$delegatedProperties:[Lkotlin/reflect/KProperty;
|
|
|
|
|
|
|
|
const/4 v2, 0x1
|
|
|
|
|
|
|
|
aget-object v1, v1, v2
|
|
|
|
|
|
|
|
invoke-interface {v0, p0, v1}, Lkotlin/properties/ReadOnlyProperty;->getValue(Ljava/lang/Object;Lkotlin/reflect/KProperty;)Ljava/lang/Object;
|
|
|
|
|
|
|
|
move-result-object v0
|
|
|
|
|
|
|
|
check-cast v0, Landroid/widget/TextView;
|
|
|
|
|
|
|
|
return-object v0
|
|
|
|
.end method
|
|
|
|
|
|
|
|
.method private final getUnreadMessageText(ZIJ)Ljava/lang/String;
|
|
|
|
.locals 7
|
|
|
|
|
|
|
|
invoke-static {p3, p4}, Ljava/lang/Long;->valueOf(J)Ljava/lang/Long;
|
|
|
|
|
|
|
|
move-result-object p3
|
|
|
|
|
|
|
|
invoke-static {p3}, Lcom/discord/utilities/time/TimeUtils;->parseSnowflake(Ljava/lang/Long;)J
|
|
|
|
|
|
|
|
move-result-wide v1
|
|
|
|
|
|
|
|
sget-object v0, Lcom/discord/utilities/time/TimeUtils;->INSTANCE:Lcom/discord/utilities/time/TimeUtils;
|
|
|
|
|
|
|
|
invoke-virtual {p0}, Landroidx/fragment/app/Fragment;->requireContext()Landroid/content/Context;
|
|
|
|
|
|
|
|
move-result-object v3
|
|
|
|
|
|
|
|
const-string p3, "requireContext()"
|
|
|
|
|
|
|
|
invoke-static {v3, p3}, Lk0/n/c/i;->checkNotNullExpressionValue(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
|
|
|
|
const/4 v4, 0x0
|
|
|
|
|
|
|
|
const/4 v5, 0x4
|
|
|
|
|
|
|
|
const/4 v6, 0x0
|
|
|
|
|
|
|
|
invoke-static/range {v0 .. v6}, Lcom/discord/utilities/time/TimeUtils;->renderUtcDate$default(Lcom/discord/utilities/time/TimeUtils;JLandroid/content/Context;IILjava/lang/Object;)Ljava/lang/String;
|
|
|
|
|
|
|
|
move-result-object p4
|
|
|
|
|
|
|
|
const/4 v0, 0x2
|
|
|
|
|
|
|
|
const/4 v1, 0x0
|
|
|
|
|
|
|
|
const/4 v2, 0x1
|
|
|
|
|
|
|
|
if-eqz p1, :cond_0
|
|
|
|
|
|
|
|
invoke-virtual {p0}, Landroidx/fragment/app/Fragment;->getResources()Landroid/content/res/Resources;
|
|
|
|
|
|
|
|
move-result-object p1
|
|
|
|
|
2020-09-15 01:38:31 +00:00
|
|
|
const p3, 0x7f120fc1
|
2020-09-09 19:21:20 +00:00
|
|
|
|
|
|
|
new-array v0, v0, [Ljava/lang/Object;
|
|
|
|
|
|
|
|
invoke-static {p2}, Ljava/lang/String;->valueOf(I)Ljava/lang/String;
|
|
|
|
|
|
|
|
move-result-object p2
|
|
|
|
|
|
|
|
aput-object p2, v0, v1
|
|
|
|
|
|
|
|
aput-object p4, v0, v2
|
|
|
|
|
|
|
|
invoke-virtual {p1, p3, v0}, Landroid/content/res/Resources;->getString(I[Ljava/lang/Object;)Ljava/lang/String;
|
|
|
|
|
|
|
|
move-result-object p1
|
|
|
|
|
|
|
|
const-string p2, "resources.getString(R.st\u2026.toString(), utcDateTime)"
|
|
|
|
|
|
|
|
invoke-static {p1, p2}, Lk0/n/c/i;->checkNotNullExpressionValue(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
|
|
|
|
goto :goto_0
|
|
|
|
|
|
|
|
:cond_0
|
|
|
|
invoke-virtual {p0}, Landroidx/fragment/app/Fragment;->getResources()Landroid/content/res/Resources;
|
|
|
|
|
|
|
|
move-result-object p1
|
|
|
|
|
|
|
|
const-string v3, "resources"
|
|
|
|
|
|
|
|
invoke-static {p1, v3}, Lk0/n/c/i;->checkNotNullExpressionValue(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
|
|
|
|
invoke-virtual {p0}, Landroidx/fragment/app/Fragment;->requireContext()Landroid/content/Context;
|
|
|
|
|
|
|
|
move-result-object v3
|
|
|
|
|
|
|
|
invoke-static {v3, p3}, Lk0/n/c/i;->checkNotNullExpressionValue(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
|
|
|
|
const p3, 0x7f1000b8
|
|
|
|
|
|
|
|
new-array v4, v2, [Ljava/lang/Object;
|
|
|
|
|
|
|
|
invoke-static {p2}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;
|
|
|
|
|
|
|
|
move-result-object v5
|
|
|
|
|
|
|
|
aput-object v5, v4, v1
|
|
|
|
|
|
|
|
invoke-static {p1, v3, p3, p2, v4}, Lcom/discord/utilities/resources/StringResourceUtilsKt;->getQuantityString(Landroid/content/res/Resources;Landroid/content/Context;II[Ljava/lang/Object;)Ljava/lang/String;
|
|
|
|
|
|
|
|
move-result-object p1
|
|
|
|
|
|
|
|
invoke-virtual {p0}, Landroidx/fragment/app/Fragment;->getResources()Landroid/content/res/Resources;
|
|
|
|
|
|
|
|
move-result-object p2
|
|
|
|
|
2020-09-15 01:38:31 +00:00
|
|
|
const p3, 0x7f120fbf
|
2020-09-09 19:21:20 +00:00
|
|
|
|
|
|
|
new-array v0, v0, [Ljava/lang/Object;
|
|
|
|
|
|
|
|
aput-object p1, v0, v1
|
|
|
|
|
|
|
|
aput-object p4, v0, v2
|
|
|
|
|
|
|
|
invoke-virtual {p2, p3, v0}, Landroid/content/res/Resources;->getString(I[Ljava/lang/Object;)Ljava/lang/String;
|
|
|
|
|
|
|
|
move-result-object p1
|
|
|
|
|
|
|
|
const-string p2, "resources.getString(R.st\u2026countPlural, utcDateTime)"
|
|
|
|
|
|
|
|
invoke-static {p1, p2}, Lk0/n/c/i;->checkNotNullExpressionValue(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
|
|
|
|
:goto_0
|
|
|
|
return-object p1
|
|
|
|
.end method
|
|
|
|
|
|
|
|
|
|
|
|
# virtual methods
|
|
|
|
.method public getContentViewResId()I
|
|
|
|
.locals 1
|
|
|
|
|
2020-09-14 18:37:20 +00:00
|
|
|
const v0, 0x7f0d01c3
|
2020-09-09 19:21:20 +00:00
|
|
|
|
|
|
|
return v0
|
|
|
|
.end method
|
|
|
|
|
|
|
|
.method public onViewBoundOrOnResume()V
|
|
|
|
.locals 12
|
|
|
|
|
|
|
|
invoke-super {p0}, Lcom/discord/app/AppFragment;->onViewBoundOrOnResume()V
|
|
|
|
|
|
|
|
sget-object v0, Lcom/discord/widgets/status/WidgetChatStatus$Model;->Companion:Lcom/discord/widgets/status/WidgetChatStatus$Model$Companion;
|
|
|
|
|
|
|
|
invoke-virtual {v0}, Lcom/discord/widgets/status/WidgetChatStatus$Model$Companion;->get()Lrx/Observable;
|
|
|
|
|
|
|
|
move-result-object v0
|
|
|
|
|
|
|
|
const/4 v1, 0x0
|
|
|
|
|
|
|
|
const/4 v2, 0x2
|
|
|
|
|
|
|
|
invoke-static {v0, p0, v1, v2, v1}, Lcom/discord/utilities/rx/ObservableExtensionsKt;->ui$default(Lrx/Observable;Lcom/discord/app/AppComponent;Lcom/discord/utilities/mg_recycler/MGRecyclerAdapterSimple;ILjava/lang/Object;)Lrx/Observable;
|
|
|
|
|
|
|
|
move-result-object v3
|
|
|
|
|
|
|
|
const-class v4, Lcom/discord/widgets/status/WidgetChatStatus;
|
|
|
|
|
|
|
|
new-instance v9, Lcom/discord/widgets/status/WidgetChatStatus$onViewBoundOrOnResume$1;
|
|
|
|
|
|
|
|
invoke-direct {v9, p0}, Lcom/discord/widgets/status/WidgetChatStatus$onViewBoundOrOnResume$1;-><init>(Lcom/discord/widgets/status/WidgetChatStatus;)V
|
|
|
|
|
|
|
|
const/4 v5, 0x0
|
|
|
|
|
|
|
|
const/4 v6, 0x0
|
|
|
|
|
|
|
|
const/4 v7, 0x0
|
|
|
|
|
|
|
|
const/4 v8, 0x0
|
|
|
|
|
|
|
|
const/16 v10, 0x1e
|
|
|
|
|
|
|
|
const/4 v11, 0x0
|
|
|
|
|
|
|
|
invoke-static/range {v3 .. v11}, Lcom/discord/utilities/rx/ObservableExtensionsKt;->appSubscribe$default(Lrx/Observable;Ljava/lang/Class;Landroid/content/Context;Lkotlin/jvm/functions/Function1;Lkotlin/jvm/functions/Function1;Lkotlin/jvm/functions/Function0;Lkotlin/jvm/functions/Function1;ILjava/lang/Object;)V
|
|
|
|
|
|
|
|
return-void
|
|
|
|
.end method
|