2019-02-04 20:08:30 +00:00
|
|
|
.class public final Lcom/discord/widgets/chat/list/WidgetChatListAdapterItemUploadProgress;
|
|
|
|
.super Lcom/discord/widgets/chat/list/WidgetChatListItem;
|
2019-02-04 20:29:01 +00:00
|
|
|
.source "WidgetChatListAdapterItemUploadProgress.kt"
|
2019-02-04 20:08:30 +00:00
|
|
|
|
|
|
|
|
2019-02-04 20:17:36 +00:00
|
|
|
# annotations
|
|
|
|
.annotation system Ldalvik/annotation/MemberClasses;
|
|
|
|
value = {
|
|
|
|
Lcom/discord/widgets/chat/list/WidgetChatListAdapterItemUploadProgress$Model;,
|
|
|
|
Lcom/discord/widgets/chat/list/WidgetChatListAdapterItemUploadProgress$ModelProvider;,
|
|
|
|
Lcom/discord/widgets/chat/list/WidgetChatListAdapterItemUploadProgress$Companion;
|
|
|
|
}
|
|
|
|
.end annotation
|
|
|
|
|
|
|
|
|
|
|
|
# static fields
|
|
|
|
.field public static final Companion:Lcom/discord/widgets/chat/list/WidgetChatListAdapterItemUploadProgress$Companion;
|
|
|
|
|
|
|
|
.field private static final MODEL_THROTTLE_MS:J = 0x64L
|
|
|
|
|
|
|
|
|
2019-02-04 20:08:30 +00:00
|
|
|
# instance fields
|
|
|
|
.field private final cancelButtonCentered:Landroid/view/View;
|
|
|
|
|
|
|
|
.field private final cancelButtonTop:Landroid/view/View;
|
|
|
|
|
|
|
|
.field private subscription:Lrx/Subscription;
|
|
|
|
|
|
|
|
.field private final uploadProgressView1:Lcom/discord/views/UploadProgressView;
|
|
|
|
|
|
|
|
.field private final uploadProgressView2:Lcom/discord/views/UploadProgressView;
|
|
|
|
|
|
|
|
.field private final uploadProgressView3:Lcom/discord/views/UploadProgressView;
|
|
|
|
|
|
|
|
|
|
|
|
# direct methods
|
2019-02-04 20:17:36 +00:00
|
|
|
.method static constructor <clinit>()V
|
|
|
|
.locals 2
|
|
|
|
|
|
|
|
new-instance v0, Lcom/discord/widgets/chat/list/WidgetChatListAdapterItemUploadProgress$Companion;
|
|
|
|
|
|
|
|
const/4 v1, 0x0
|
|
|
|
|
|
|
|
invoke-direct {v0, v1}, Lcom/discord/widgets/chat/list/WidgetChatListAdapterItemUploadProgress$Companion;-><init>(Lkotlin/jvm/internal/DefaultConstructorMarker;)V
|
|
|
|
|
|
|
|
sput-object v0, Lcom/discord/widgets/chat/list/WidgetChatListAdapterItemUploadProgress;->Companion:Lcom/discord/widgets/chat/list/WidgetChatListAdapterItemUploadProgress$Companion;
|
|
|
|
|
|
|
|
return-void
|
|
|
|
.end method
|
|
|
|
|
2019-02-04 20:08:30 +00:00
|
|
|
.method public constructor <init>(Lcom/discord/widgets/chat/list/WidgetChatListAdapter;)V
|
|
|
|
.locals 1
|
|
|
|
|
|
|
|
const-string v0, "adapter"
|
|
|
|
|
|
|
|
invoke-static {p1, v0}, Lkotlin/jvm/internal/j;->h(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
|
2019-03-30 08:05:33 +00:00
|
|
|
const v0, 0x7f0d00ed
|
2019-02-04 20:08:30 +00:00
|
|
|
|
|
|
|
invoke-direct {p0, v0, p1}, Lcom/discord/widgets/chat/list/WidgetChatListItem;-><init>(ILcom/discord/widgets/chat/list/WidgetChatListAdapter;)V
|
|
|
|
|
|
|
|
iget-object p1, p0, Lcom/discord/widgets/chat/list/WidgetChatListAdapterItemUploadProgress;->itemView:Landroid/view/View;
|
|
|
|
|
2019-03-30 08:05:33 +00:00
|
|
|
const v0, 0x7f0a067a
|
2019-02-04 20:08:30 +00:00
|
|
|
|
|
|
|
invoke-virtual {p1, v0}, Landroid/view/View;->findViewById(I)Landroid/view/View;
|
|
|
|
|
|
|
|
move-result-object p1
|
|
|
|
|
|
|
|
const-string v0, "itemView.findViewById(R.id.upload_progress_1)"
|
|
|
|
|
|
|
|
invoke-static {p1, v0}, Lkotlin/jvm/internal/j;->g(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
|
|
|
|
check-cast p1, Lcom/discord/views/UploadProgressView;
|
|
|
|
|
|
|
|
iput-object p1, p0, Lcom/discord/widgets/chat/list/WidgetChatListAdapterItemUploadProgress;->uploadProgressView1:Lcom/discord/views/UploadProgressView;
|
|
|
|
|
|
|
|
iget-object p1, p0, Lcom/discord/widgets/chat/list/WidgetChatListAdapterItemUploadProgress;->itemView:Landroid/view/View;
|
|
|
|
|
2019-03-30 08:05:33 +00:00
|
|
|
const v0, 0x7f0a067b
|
2019-02-04 20:08:30 +00:00
|
|
|
|
|
|
|
invoke-virtual {p1, v0}, Landroid/view/View;->findViewById(I)Landroid/view/View;
|
|
|
|
|
|
|
|
move-result-object p1
|
|
|
|
|
|
|
|
const-string v0, "itemView.findViewById(R.id.upload_progress_2)"
|
|
|
|
|
|
|
|
invoke-static {p1, v0}, Lkotlin/jvm/internal/j;->g(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
|
|
|
|
check-cast p1, Lcom/discord/views/UploadProgressView;
|
|
|
|
|
|
|
|
iput-object p1, p0, Lcom/discord/widgets/chat/list/WidgetChatListAdapterItemUploadProgress;->uploadProgressView2:Lcom/discord/views/UploadProgressView;
|
|
|
|
|
|
|
|
iget-object p1, p0, Lcom/discord/widgets/chat/list/WidgetChatListAdapterItemUploadProgress;->itemView:Landroid/view/View;
|
|
|
|
|
2019-03-30 08:05:33 +00:00
|
|
|
const v0, 0x7f0a067c
|
2019-02-04 20:08:30 +00:00
|
|
|
|
|
|
|
invoke-virtual {p1, v0}, Landroid/view/View;->findViewById(I)Landroid/view/View;
|
|
|
|
|
|
|
|
move-result-object p1
|
|
|
|
|
|
|
|
const-string v0, "itemView.findViewById(R.id.upload_progress_3)"
|
|
|
|
|
|
|
|
invoke-static {p1, v0}, Lkotlin/jvm/internal/j;->g(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
|
|
|
|
check-cast p1, Lcom/discord/views/UploadProgressView;
|
|
|
|
|
|
|
|
iput-object p1, p0, Lcom/discord/widgets/chat/list/WidgetChatListAdapterItemUploadProgress;->uploadProgressView3:Lcom/discord/views/UploadProgressView;
|
|
|
|
|
|
|
|
iget-object p1, p0, Lcom/discord/widgets/chat/list/WidgetChatListAdapterItemUploadProgress;->itemView:Landroid/view/View;
|
|
|
|
|
2019-03-30 08:05:33 +00:00
|
|
|
const v0, 0x7f0a0488
|
2019-02-04 20:08:30 +00:00
|
|
|
|
|
|
|
invoke-virtual {p1, v0}, Landroid/view/View;->findViewById(I)Landroid/view/View;
|
|
|
|
|
|
|
|
move-result-object p1
|
|
|
|
|
|
|
|
const-string v0, "itemView.findViewById(R.id.progress_cancel_top)"
|
|
|
|
|
|
|
|
invoke-static {p1, v0}, Lkotlin/jvm/internal/j;->g(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
|
|
|
|
iput-object p1, p0, Lcom/discord/widgets/chat/list/WidgetChatListAdapterItemUploadProgress;->cancelButtonTop:Landroid/view/View;
|
|
|
|
|
|
|
|
iget-object p1, p0, Lcom/discord/widgets/chat/list/WidgetChatListAdapterItemUploadProgress;->itemView:Landroid/view/View;
|
|
|
|
|
2019-03-30 08:05:33 +00:00
|
|
|
const v0, 0x7f0a0487
|
2019-02-04 20:08:30 +00:00
|
|
|
|
|
|
|
invoke-virtual {p1, v0}, Landroid/view/View;->findViewById(I)Landroid/view/View;
|
|
|
|
|
|
|
|
move-result-object p1
|
|
|
|
|
|
|
|
const-string v0, "itemView.findViewById(R.\u2026progress_cancel_centered)"
|
|
|
|
|
|
|
|
invoke-static {p1, v0}, Lkotlin/jvm/internal/j;->g(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
|
|
|
|
iput-object p1, p0, Lcom/discord/widgets/chat/list/WidgetChatListAdapterItemUploadProgress;->cancelButtonCentered:Landroid/view/View;
|
|
|
|
|
|
|
|
return-void
|
|
|
|
.end method
|
|
|
|
|
2019-02-04 20:17:36 +00:00
|
|
|
.method public static final synthetic access$configureUI(Lcom/discord/widgets/chat/list/WidgetChatListAdapterItemUploadProgress;Lcom/discord/widgets/chat/list/WidgetChatListAdapterItemUploadProgress$Model;)V
|
2019-02-04 20:08:30 +00:00
|
|
|
.locals 0
|
|
|
|
|
2019-02-04 20:17:36 +00:00
|
|
|
invoke-direct {p0, p1}, Lcom/discord/widgets/chat/list/WidgetChatListAdapterItemUploadProgress;->configureUI(Lcom/discord/widgets/chat/list/WidgetChatListAdapterItemUploadProgress$Model;)V
|
2019-02-04 20:08:30 +00:00
|
|
|
|
|
|
|
return-void
|
|
|
|
.end method
|
|
|
|
|
|
|
|
.method public static final synthetic access$getSubscription$p(Lcom/discord/widgets/chat/list/WidgetChatListAdapterItemUploadProgress;)Lrx/Subscription;
|
|
|
|
.locals 0
|
|
|
|
|
|
|
|
iget-object p0, p0, Lcom/discord/widgets/chat/list/WidgetChatListAdapterItemUploadProgress;->subscription:Lrx/Subscription;
|
|
|
|
|
|
|
|
return-object p0
|
|
|
|
.end method
|
|
|
|
|
|
|
|
.method public static final synthetic access$setSubscription$p(Lcom/discord/widgets/chat/list/WidgetChatListAdapterItemUploadProgress;Lrx/Subscription;)V
|
|
|
|
.locals 0
|
|
|
|
|
|
|
|
iput-object p1, p0, Lcom/discord/widgets/chat/list/WidgetChatListAdapterItemUploadProgress;->subscription:Lrx/Subscription;
|
|
|
|
|
|
|
|
return-void
|
|
|
|
.end method
|
|
|
|
|
2019-02-04 20:17:36 +00:00
|
|
|
.method private final configureUI(Lcom/discord/widgets/chat/list/WidgetChatListAdapterItemUploadProgress$Model;)V
|
2019-03-08 06:19:26 +00:00
|
|
|
.locals 8
|
2019-02-04 20:08:30 +00:00
|
|
|
|
2019-02-04 20:17:36 +00:00
|
|
|
instance-of v0, p1, Lcom/discord/widgets/chat/list/WidgetChatListAdapterItemUploadProgress$Model$Few;
|
2019-02-04 20:08:30 +00:00
|
|
|
|
2019-03-08 06:19:26 +00:00
|
|
|
const/4 v1, 0x2
|
2019-02-04 20:08:30 +00:00
|
|
|
|
2019-03-08 06:19:26 +00:00
|
|
|
const/16 v2, 0x8
|
2019-02-04 20:08:30 +00:00
|
|
|
|
2019-03-08 06:19:26 +00:00
|
|
|
const/4 v3, 0x1
|
|
|
|
|
|
|
|
const/4 v4, 0x0
|
2019-02-04 20:08:30 +00:00
|
|
|
|
|
|
|
if-nez v0, :cond_0
|
|
|
|
|
2019-03-08 06:19:26 +00:00
|
|
|
iget-object v5, p0, Lcom/discord/widgets/chat/list/WidgetChatListAdapterItemUploadProgress;->uploadProgressView1:Lcom/discord/views/UploadProgressView;
|
2019-02-04 20:08:30 +00:00
|
|
|
|
2019-03-08 06:19:26 +00:00
|
|
|
invoke-direct {p0, v5, p1}, Lcom/discord/widgets/chat/list/WidgetChatListAdapterItemUploadProgress;->setUploadState(Lcom/discord/views/UploadProgressView;Lcom/discord/widgets/chat/list/WidgetChatListAdapterItemUploadProgress$Model;)V
|
2019-02-04 20:08:30 +00:00
|
|
|
|
2019-03-08 06:19:26 +00:00
|
|
|
iget-object v5, p0, Lcom/discord/widgets/chat/list/WidgetChatListAdapterItemUploadProgress;->uploadProgressView2:Lcom/discord/views/UploadProgressView;
|
2019-02-04 20:08:30 +00:00
|
|
|
|
2019-03-08 06:19:26 +00:00
|
|
|
invoke-virtual {v5, v2}, Lcom/discord/views/UploadProgressView;->setVisibility(I)V
|
2019-02-04 20:08:30 +00:00
|
|
|
|
|
|
|
goto :goto_0
|
|
|
|
|
|
|
|
:cond_0
|
2019-03-08 06:19:26 +00:00
|
|
|
iget-object v5, p0, Lcom/discord/widgets/chat/list/WidgetChatListAdapterItemUploadProgress;->uploadProgressView1:Lcom/discord/views/UploadProgressView;
|
2019-02-04 20:08:30 +00:00
|
|
|
|
2019-03-08 06:19:26 +00:00
|
|
|
move-object v6, p1
|
2019-02-04 20:08:30 +00:00
|
|
|
|
2019-03-08 06:19:26 +00:00
|
|
|
check-cast v6, Lcom/discord/widgets/chat/list/WidgetChatListAdapterItemUploadProgress$Model$Few;
|
2019-02-04 20:08:30 +00:00
|
|
|
|
2019-03-08 06:19:26 +00:00
|
|
|
invoke-virtual {v6}, Lcom/discord/widgets/chat/list/WidgetChatListAdapterItemUploadProgress$Model$Few;->getUploads()Ljava/util/List;
|
2019-02-04 20:08:30 +00:00
|
|
|
|
2019-03-08 06:19:26 +00:00
|
|
|
move-result-object v7
|
2019-02-04 20:08:30 +00:00
|
|
|
|
2019-03-08 06:19:26 +00:00
|
|
|
invoke-interface {v7, v4}, Ljava/util/List;->get(I)Ljava/lang/Object;
|
2019-02-04 20:08:30 +00:00
|
|
|
|
2019-03-08 06:19:26 +00:00
|
|
|
move-result-object v7
|
2019-02-04 20:08:30 +00:00
|
|
|
|
2019-03-08 06:19:26 +00:00
|
|
|
check-cast v7, Lcom/discord/widgets/chat/list/WidgetChatListAdapterItemUploadProgress$Model;
|
2019-02-04 20:08:30 +00:00
|
|
|
|
2019-03-08 06:19:26 +00:00
|
|
|
invoke-direct {p0, v5, v7}, Lcom/discord/widgets/chat/list/WidgetChatListAdapterItemUploadProgress;->setUploadState(Lcom/discord/views/UploadProgressView;Lcom/discord/widgets/chat/list/WidgetChatListAdapterItemUploadProgress$Model;)V
|
2019-02-04 20:08:30 +00:00
|
|
|
|
2019-03-08 06:19:26 +00:00
|
|
|
iget-object v5, p0, Lcom/discord/widgets/chat/list/WidgetChatListAdapterItemUploadProgress;->uploadProgressView2:Lcom/discord/views/UploadProgressView;
|
2019-02-04 20:08:30 +00:00
|
|
|
|
2019-03-08 06:19:26 +00:00
|
|
|
invoke-virtual {v6}, Lcom/discord/widgets/chat/list/WidgetChatListAdapterItemUploadProgress$Model$Few;->getUploads()Ljava/util/List;
|
2019-02-04 20:08:30 +00:00
|
|
|
|
2019-03-08 06:19:26 +00:00
|
|
|
move-result-object v7
|
2019-02-04 20:08:30 +00:00
|
|
|
|
2019-03-08 06:19:26 +00:00
|
|
|
invoke-interface {v7, v3}, Ljava/util/List;->get(I)Ljava/lang/Object;
|
2019-02-04 20:08:30 +00:00
|
|
|
|
2019-03-08 06:19:26 +00:00
|
|
|
move-result-object v7
|
2019-02-04 20:08:30 +00:00
|
|
|
|
2019-03-08 06:19:26 +00:00
|
|
|
check-cast v7, Lcom/discord/widgets/chat/list/WidgetChatListAdapterItemUploadProgress$Model;
|
2019-02-04 20:08:30 +00:00
|
|
|
|
2019-03-08 06:19:26 +00:00
|
|
|
invoke-direct {p0, v5, v7}, Lcom/discord/widgets/chat/list/WidgetChatListAdapterItemUploadProgress;->setUploadState(Lcom/discord/views/UploadProgressView;Lcom/discord/widgets/chat/list/WidgetChatListAdapterItemUploadProgress$Model;)V
|
2019-02-04 20:08:30 +00:00
|
|
|
|
2019-03-08 06:19:26 +00:00
|
|
|
iget-object v5, p0, Lcom/discord/widgets/chat/list/WidgetChatListAdapterItemUploadProgress;->uploadProgressView2:Lcom/discord/views/UploadProgressView;
|
2019-02-04 20:08:30 +00:00
|
|
|
|
2019-03-08 06:19:26 +00:00
|
|
|
invoke-virtual {v5, v4}, Lcom/discord/views/UploadProgressView;->setVisibility(I)V
|
2019-02-04 20:08:30 +00:00
|
|
|
|
2019-03-08 06:19:26 +00:00
|
|
|
invoke-virtual {v6}, Lcom/discord/widgets/chat/list/WidgetChatListAdapterItemUploadProgress$Model$Few;->getUploads()Ljava/util/List;
|
2019-02-04 20:08:30 +00:00
|
|
|
|
2019-03-08 06:19:26 +00:00
|
|
|
move-result-object v5
|
2019-02-04 20:08:30 +00:00
|
|
|
|
2019-03-08 06:19:26 +00:00
|
|
|
invoke-interface {v5}, Ljava/util/List;->size()I
|
2019-02-04 20:08:30 +00:00
|
|
|
|
2019-03-08 06:19:26 +00:00
|
|
|
move-result v5
|
2019-02-04 20:08:30 +00:00
|
|
|
|
2019-03-08 06:19:26 +00:00
|
|
|
const/4 v7, 0x3
|
2019-02-04 20:08:30 +00:00
|
|
|
|
2019-03-08 06:19:26 +00:00
|
|
|
if-ne v5, v7, :cond_1
|
2019-02-04 20:08:30 +00:00
|
|
|
|
2019-03-08 06:19:26 +00:00
|
|
|
iget-object v5, p0, Lcom/discord/widgets/chat/list/WidgetChatListAdapterItemUploadProgress;->uploadProgressView3:Lcom/discord/views/UploadProgressView;
|
2019-02-04 20:08:30 +00:00
|
|
|
|
2019-03-08 06:19:26 +00:00
|
|
|
invoke-virtual {v5, v4}, Lcom/discord/views/UploadProgressView;->setVisibility(I)V
|
2019-02-04 20:08:30 +00:00
|
|
|
|
2019-03-08 06:19:26 +00:00
|
|
|
iget-object v5, p0, Lcom/discord/widgets/chat/list/WidgetChatListAdapterItemUploadProgress;->uploadProgressView3:Lcom/discord/views/UploadProgressView;
|
2019-02-04 20:08:30 +00:00
|
|
|
|
2019-03-08 06:19:26 +00:00
|
|
|
invoke-virtual {v6}, Lcom/discord/widgets/chat/list/WidgetChatListAdapterItemUploadProgress$Model$Few;->getUploads()Ljava/util/List;
|
2019-02-04 20:08:30 +00:00
|
|
|
|
2019-03-08 06:19:26 +00:00
|
|
|
move-result-object v6
|
2019-02-04 20:08:30 +00:00
|
|
|
|
2019-03-08 06:19:26 +00:00
|
|
|
invoke-interface {v6, v1}, Ljava/util/List;->get(I)Ljava/lang/Object;
|
2019-02-04 20:08:30 +00:00
|
|
|
|
2019-03-08 06:19:26 +00:00
|
|
|
move-result-object v6
|
2019-02-04 20:08:30 +00:00
|
|
|
|
2019-03-08 06:19:26 +00:00
|
|
|
check-cast v6, Lcom/discord/widgets/chat/list/WidgetChatListAdapterItemUploadProgress$Model;
|
2019-02-04 20:08:30 +00:00
|
|
|
|
2019-03-08 06:19:26 +00:00
|
|
|
invoke-direct {p0, v5, v6}, Lcom/discord/widgets/chat/list/WidgetChatListAdapterItemUploadProgress;->setUploadState(Lcom/discord/views/UploadProgressView;Lcom/discord/widgets/chat/list/WidgetChatListAdapterItemUploadProgress$Model;)V
|
2019-02-04 20:08:30 +00:00
|
|
|
|
|
|
|
goto :goto_1
|
|
|
|
|
|
|
|
:cond_1
|
|
|
|
:goto_0
|
2019-03-08 06:19:26 +00:00
|
|
|
iget-object v5, p0, Lcom/discord/widgets/chat/list/WidgetChatListAdapterItemUploadProgress;->uploadProgressView3:Lcom/discord/views/UploadProgressView;
|
2019-02-04 20:08:30 +00:00
|
|
|
|
2019-03-08 06:19:26 +00:00
|
|
|
invoke-virtual {v5, v2}, Lcom/discord/views/UploadProgressView;->setVisibility(I)V
|
2019-02-04 20:08:30 +00:00
|
|
|
|
|
|
|
:goto_1
|
2019-03-08 06:19:26 +00:00
|
|
|
instance-of v5, p1, Lcom/discord/widgets/chat/list/WidgetChatListAdapterItemUploadProgress$Model$Preprocessing;
|
2019-02-04 20:08:30 +00:00
|
|
|
|
2019-03-08 06:19:26 +00:00
|
|
|
if-nez v5, :cond_9
|
2019-02-04 20:08:30 +00:00
|
|
|
|
2019-03-08 06:19:26 +00:00
|
|
|
instance-of v5, p1, Lcom/discord/widgets/chat/list/WidgetChatListAdapterItemUploadProgress$Model$Single;
|
2019-02-04 20:08:30 +00:00
|
|
|
|
2019-03-08 06:19:26 +00:00
|
|
|
const/16 v6, 0x64
|
2019-02-04 20:08:30 +00:00
|
|
|
|
2019-03-08 06:19:26 +00:00
|
|
|
if-eqz v5, :cond_2
|
2019-02-04 20:08:30 +00:00
|
|
|
|
2019-03-08 06:19:26 +00:00
|
|
|
move-object v5, p1
|
2019-02-04 20:08:30 +00:00
|
|
|
|
2019-03-08 06:19:26 +00:00
|
|
|
check-cast v5, Lcom/discord/widgets/chat/list/WidgetChatListAdapterItemUploadProgress$Model$Single;
|
2019-02-04 20:08:30 +00:00
|
|
|
|
2019-03-08 06:19:26 +00:00
|
|
|
invoke-virtual {v5}, Lcom/discord/widgets/chat/list/WidgetChatListAdapterItemUploadProgress$Model$Single;->getProgress()I
|
2019-02-04 20:08:30 +00:00
|
|
|
|
2019-03-08 06:19:26 +00:00
|
|
|
move-result v5
|
2019-02-04 20:08:30 +00:00
|
|
|
|
2019-03-08 06:19:26 +00:00
|
|
|
if-lt v5, v6, :cond_9
|
2019-02-04 20:08:30 +00:00
|
|
|
|
|
|
|
:cond_2
|
|
|
|
if-eqz v0, :cond_7
|
|
|
|
|
2019-03-08 06:19:26 +00:00
|
|
|
move-object v5, p1
|
2019-02-04 20:08:30 +00:00
|
|
|
|
2019-03-08 06:19:26 +00:00
|
|
|
check-cast v5, Lcom/discord/widgets/chat/list/WidgetChatListAdapterItemUploadProgress$Model$Few;
|
2019-02-04 20:08:30 +00:00
|
|
|
|
2019-03-08 06:19:26 +00:00
|
|
|
invoke-virtual {v5}, Lcom/discord/widgets/chat/list/WidgetChatListAdapterItemUploadProgress$Model$Few;->getUploads()Ljava/util/List;
|
2019-02-04 20:08:30 +00:00
|
|
|
|
2019-03-08 06:19:26 +00:00
|
|
|
move-result-object v5
|
2019-02-04 20:08:30 +00:00
|
|
|
|
2019-03-08 06:19:26 +00:00
|
|
|
check-cast v5, Ljava/lang/Iterable;
|
2019-02-04 20:08:30 +00:00
|
|
|
|
2019-03-08 06:19:26 +00:00
|
|
|
instance-of v7, v5, Ljava/util/Collection;
|
2019-02-04 20:08:30 +00:00
|
|
|
|
2019-03-08 06:19:26 +00:00
|
|
|
if-eqz v7, :cond_3
|
2019-02-04 20:08:30 +00:00
|
|
|
|
2019-03-08 06:19:26 +00:00
|
|
|
move-object v7, v5
|
2019-02-04 20:08:30 +00:00
|
|
|
|
2019-03-08 06:19:26 +00:00
|
|
|
check-cast v7, Ljava/util/Collection;
|
2019-02-04 20:08:30 +00:00
|
|
|
|
2019-03-08 06:19:26 +00:00
|
|
|
invoke-interface {v7}, Ljava/util/Collection;->isEmpty()Z
|
2019-02-04 20:08:30 +00:00
|
|
|
|
2019-03-08 06:19:26 +00:00
|
|
|
move-result v7
|
2019-02-04 20:08:30 +00:00
|
|
|
|
2019-03-08 06:19:26 +00:00
|
|
|
if-nez v7, :cond_6
|
2019-02-04 20:08:30 +00:00
|
|
|
|
|
|
|
:cond_3
|
2019-03-08 06:19:26 +00:00
|
|
|
invoke-interface {v5}, Ljava/lang/Iterable;->iterator()Ljava/util/Iterator;
|
2019-02-04 20:08:30 +00:00
|
|
|
|
2019-03-08 06:19:26 +00:00
|
|
|
move-result-object v5
|
2019-02-04 20:08:30 +00:00
|
|
|
|
|
|
|
:cond_4
|
2019-03-08 06:19:26 +00:00
|
|
|
invoke-interface {v5}, Ljava/util/Iterator;->hasNext()Z
|
2019-02-04 20:08:30 +00:00
|
|
|
|
2019-03-08 06:19:26 +00:00
|
|
|
move-result v7
|
2019-02-04 20:08:30 +00:00
|
|
|
|
2019-03-08 06:19:26 +00:00
|
|
|
if-eqz v7, :cond_6
|
2019-02-04 20:08:30 +00:00
|
|
|
|
2019-03-08 06:19:26 +00:00
|
|
|
invoke-interface {v5}, Ljava/util/Iterator;->next()Ljava/lang/Object;
|
2019-02-04 20:08:30 +00:00
|
|
|
|
2019-03-08 06:19:26 +00:00
|
|
|
move-result-object v7
|
2019-02-04 20:08:30 +00:00
|
|
|
|
2019-03-08 06:19:26 +00:00
|
|
|
check-cast v7, Lcom/discord/widgets/chat/list/WidgetChatListAdapterItemUploadProgress$Model$Single;
|
2019-02-04 20:08:30 +00:00
|
|
|
|
2019-03-08 06:19:26 +00:00
|
|
|
invoke-virtual {v7}, Lcom/discord/widgets/chat/list/WidgetChatListAdapterItemUploadProgress$Model$Single;->getProgress()I
|
2019-02-04 20:08:30 +00:00
|
|
|
|
2019-03-08 06:19:26 +00:00
|
|
|
move-result v7
|
2019-02-04 20:08:30 +00:00
|
|
|
|
2019-03-08 06:19:26 +00:00
|
|
|
if-ge v7, v6, :cond_5
|
2019-02-04 20:08:30 +00:00
|
|
|
|
2019-03-08 06:19:26 +00:00
|
|
|
const/4 v7, 0x1
|
2019-02-04 20:08:30 +00:00
|
|
|
|
|
|
|
goto :goto_2
|
|
|
|
|
|
|
|
:cond_5
|
2019-03-08 06:19:26 +00:00
|
|
|
const/4 v7, 0x0
|
2019-02-04 20:08:30 +00:00
|
|
|
|
|
|
|
:goto_2
|
2019-03-08 06:19:26 +00:00
|
|
|
if-eqz v7, :cond_4
|
2019-02-04 20:08:30 +00:00
|
|
|
|
2019-03-08 06:19:26 +00:00
|
|
|
const/4 v5, 0x1
|
2019-02-04 20:08:30 +00:00
|
|
|
|
|
|
|
goto :goto_3
|
|
|
|
|
|
|
|
:cond_6
|
2019-03-08 06:19:26 +00:00
|
|
|
const/4 v5, 0x0
|
2019-02-04 20:08:30 +00:00
|
|
|
|
|
|
|
:goto_3
|
2019-03-08 06:19:26 +00:00
|
|
|
if-nez v5, :cond_9
|
2019-02-04 20:08:30 +00:00
|
|
|
|
|
|
|
:cond_7
|
2019-03-08 06:19:26 +00:00
|
|
|
instance-of v5, p1, Lcom/discord/widgets/chat/list/WidgetChatListAdapterItemUploadProgress$Model$Many;
|
2019-02-04 20:08:30 +00:00
|
|
|
|
2019-03-08 06:19:26 +00:00
|
|
|
if-eqz v5, :cond_8
|
2019-02-04 20:08:30 +00:00
|
|
|
|
2019-02-04 20:17:36 +00:00
|
|
|
check-cast p1, Lcom/discord/widgets/chat/list/WidgetChatListAdapterItemUploadProgress$Model$Many;
|
2019-02-04 20:08:30 +00:00
|
|
|
|
2019-02-04 20:17:36 +00:00
|
|
|
invoke-virtual {p1}, Lcom/discord/widgets/chat/list/WidgetChatListAdapterItemUploadProgress$Model$Many;->getProgress()I
|
2019-02-04 20:08:30 +00:00
|
|
|
|
|
|
|
move-result p1
|
|
|
|
|
2019-03-08 06:19:26 +00:00
|
|
|
if-ge p1, v6, :cond_8
|
2019-02-04 20:08:30 +00:00
|
|
|
|
|
|
|
goto :goto_4
|
|
|
|
|
|
|
|
:cond_8
|
|
|
|
const/4 p1, 0x0
|
|
|
|
|
|
|
|
goto :goto_5
|
|
|
|
|
|
|
|
:cond_9
|
|
|
|
:goto_4
|
|
|
|
const/4 p1, 0x1
|
|
|
|
|
|
|
|
:goto_5
|
|
|
|
if-eqz p1, :cond_b
|
|
|
|
|
|
|
|
iget-object p1, p0, Lcom/discord/widgets/chat/list/WidgetChatListAdapterItemUploadProgress;->cancelButtonTop:Landroid/view/View;
|
|
|
|
|
2019-03-08 06:19:26 +00:00
|
|
|
const/4 v2, 0x0
|
|
|
|
|
|
|
|
invoke-static {p1, v0, v4, v1, v2}, Lcom/discord/utilities/view/extensions/ViewExtensions;->setVisibilityBy$default(Landroid/view/View;ZIILjava/lang/Object;)V
|
2019-02-04 20:08:30 +00:00
|
|
|
|
|
|
|
iget-object p1, p0, Lcom/discord/widgets/chat/list/WidgetChatListAdapterItemUploadProgress;->cancelButtonCentered:Landroid/view/View;
|
|
|
|
|
|
|
|
if-nez v0, :cond_a
|
|
|
|
|
|
|
|
goto :goto_6
|
|
|
|
|
|
|
|
:cond_a
|
2019-03-08 06:19:26 +00:00
|
|
|
const/4 v3, 0x0
|
2019-02-04 20:08:30 +00:00
|
|
|
|
|
|
|
:goto_6
|
2019-03-08 06:19:26 +00:00
|
|
|
invoke-static {p1, v3, v4, v1, v2}, Lcom/discord/utilities/view/extensions/ViewExtensions;->setVisibilityBy$default(Landroid/view/View;ZIILjava/lang/Object;)V
|
2019-02-04 20:08:30 +00:00
|
|
|
|
|
|
|
return-void
|
|
|
|
|
|
|
|
:cond_b
|
|
|
|
iget-object p1, p0, Lcom/discord/widgets/chat/list/WidgetChatListAdapterItemUploadProgress;->cancelButtonTop:Landroid/view/View;
|
|
|
|
|
2019-03-08 06:19:26 +00:00
|
|
|
invoke-virtual {p1, v2}, Landroid/view/View;->setVisibility(I)V
|
2019-02-04 20:08:30 +00:00
|
|
|
|
|
|
|
iget-object p1, p0, Lcom/discord/widgets/chat/list/WidgetChatListAdapterItemUploadProgress;->cancelButtonCentered:Landroid/view/View;
|
|
|
|
|
2019-03-08 06:19:26 +00:00
|
|
|
invoke-virtual {p1, v2}, Landroid/view/View;->setVisibility(I)V
|
2019-02-04 20:08:30 +00:00
|
|
|
|
|
|
|
return-void
|
|
|
|
.end method
|
|
|
|
|
|
|
|
.method private final getHumanReadableByteCount(J)Ljava/lang/String;
|
|
|
|
.locals 10
|
|
|
|
|
|
|
|
const-wide/16 v0, 0x400
|
|
|
|
|
|
|
|
cmp-long v2, p1, v0
|
|
|
|
|
|
|
|
if-gez v2, :cond_0
|
|
|
|
|
|
|
|
new-instance v0, Ljava/lang/StringBuilder;
|
|
|
|
|
|
|
|
invoke-direct {v0}, Ljava/lang/StringBuilder;-><init>()V
|
|
|
|
|
|
|
|
invoke-static {p1, p2}, Ljava/lang/String;->valueOf(J)Ljava/lang/String;
|
|
|
|
|
|
|
|
move-result-object p1
|
|
|
|
|
|
|
|
invoke-virtual {v0, p1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
|
|
|
|
const-string p1, " B"
|
|
|
|
|
|
|
|
invoke-virtual {v0, p1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
|
|
|
|
invoke-virtual {v0}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
|
|
|
|
|
|
|
|
move-result-object p1
|
|
|
|
|
|
|
|
return-object p1
|
|
|
|
|
|
|
|
:cond_0
|
|
|
|
long-to-double p1, p1
|
|
|
|
|
|
|
|
invoke-static {p1, p2}, Ljava/lang/Math;->log(D)D
|
|
|
|
|
|
|
|
move-result-wide v0
|
|
|
|
|
|
|
|
const-wide/high16 v2, 0x4090000000000000L # 1024.0
|
|
|
|
|
|
|
|
invoke-static {v2, v3}, Ljava/lang/Math;->log(D)D
|
|
|
|
|
|
|
|
move-result-wide v4
|
|
|
|
|
|
|
|
div-double/2addr v0, v4
|
|
|
|
|
|
|
|
double-to-int v0, v0
|
|
|
|
|
|
|
|
const-string v1, "KMGTPE"
|
|
|
|
|
|
|
|
add-int/lit8 v4, v0, -0x1
|
|
|
|
|
|
|
|
invoke-virtual {v1, v4}, Ljava/lang/String;->charAt(I)C
|
|
|
|
|
|
|
|
move-result v1
|
|
|
|
|
2019-03-30 08:05:33 +00:00
|
|
|
sget-object v4, Lkotlin/jvm/internal/y;->ber:Lkotlin/jvm/internal/y;
|
2019-02-04 20:08:30 +00:00
|
|
|
|
|
|
|
const-string v4, "%.1f %sB"
|
|
|
|
|
|
|
|
const/4 v5, 0x2
|
|
|
|
|
|
|
|
new-array v6, v5, [Ljava/lang/Object;
|
|
|
|
|
|
|
|
const/4 v7, 0x0
|
|
|
|
|
|
|
|
int-to-double v8, v0
|
|
|
|
|
|
|
|
invoke-static {v2, v3, v8, v9}, Ljava/lang/Math;->pow(DD)D
|
|
|
|
|
|
|
|
move-result-wide v2
|
|
|
|
|
|
|
|
invoke-static {p1, p2}, Ljava/lang/Double;->isNaN(D)Z
|
|
|
|
|
|
|
|
div-double/2addr p1, v2
|
|
|
|
|
|
|
|
invoke-static {p1, p2}, Ljava/lang/Double;->valueOf(D)Ljava/lang/Double;
|
|
|
|
|
|
|
|
move-result-object p1
|
|
|
|
|
|
|
|
aput-object p1, v6, v7
|
|
|
|
|
|
|
|
invoke-static {v1}, Ljava/lang/Character;->valueOf(C)Ljava/lang/Character;
|
|
|
|
|
|
|
|
move-result-object p1
|
|
|
|
|
|
|
|
const/4 p2, 0x1
|
|
|
|
|
|
|
|
aput-object p1, v6, p2
|
|
|
|
|
|
|
|
invoke-static {v6, v5}, Ljava/util/Arrays;->copyOf([Ljava/lang/Object;I)[Ljava/lang/Object;
|
|
|
|
|
|
|
|
move-result-object p1
|
|
|
|
|
|
|
|
invoke-static {v4, p1}, Ljava/lang/String;->format(Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/String;
|
|
|
|
|
|
|
|
move-result-object p1
|
|
|
|
|
|
|
|
const-string p2, "java.lang.String.format(format, *args)"
|
|
|
|
|
|
|
|
invoke-static {p1, p2}, Lkotlin/jvm/internal/j;->g(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
|
|
|
|
return-object p1
|
|
|
|
.end method
|
|
|
|
|
|
|
|
.method private final getIconForFiletype(Landroid/content/Context;Ljava/lang/String;)I
|
|
|
|
.locals 3
|
|
|
|
.annotation build Landroidx/annotation/DrawableRes;
|
|
|
|
.end annotation
|
|
|
|
|
|
|
|
const-string v0, "image"
|
|
|
|
|
|
|
|
const/4 v1, 0x0
|
|
|
|
|
|
|
|
invoke-static {p2, v0, v1}, Lkotlin/text/l;->b(Ljava/lang/String;Ljava/lang/String;Z)Z
|
|
|
|
|
|
|
|
move-result v0
|
|
|
|
|
|
|
|
if-eqz v0, :cond_0
|
|
|
|
|
2019-03-02 21:05:12 +00:00
|
|
|
const p2, 0x7f0401a9
|
2019-02-04 20:08:30 +00:00
|
|
|
|
|
|
|
goto :goto_0
|
|
|
|
|
|
|
|
:cond_0
|
|
|
|
const-string v0, "video"
|
|
|
|
|
|
|
|
invoke-static {p2, v0, v1}, Lkotlin/text/l;->b(Ljava/lang/String;Ljava/lang/String;Z)Z
|
|
|
|
|
|
|
|
move-result p2
|
|
|
|
|
|
|
|
if-eqz p2, :cond_1
|
|
|
|
|
2019-03-02 21:05:12 +00:00
|
|
|
const p2, 0x7f0401aa
|
2019-02-04 20:08:30 +00:00
|
|
|
|
|
|
|
goto :goto_0
|
|
|
|
|
|
|
|
:cond_1
|
2019-03-02 21:05:12 +00:00
|
|
|
const p2, 0x7f0401a7
|
2019-02-04 20:08:30 +00:00
|
|
|
|
|
|
|
:goto_0
|
|
|
|
const/4 v0, 0x2
|
|
|
|
|
|
|
|
const/4 v2, 0x0
|
|
|
|
|
|
|
|
invoke-static {p1, p2, v1, v0, v2}, Lcom/discord/utilities/drawable/DrawableCompat;->getThemedDrawableRes$default(Landroid/content/Context;IIILjava/lang/Object;)I
|
|
|
|
|
|
|
|
move-result p1
|
|
|
|
|
|
|
|
return p1
|
|
|
|
.end method
|
|
|
|
|
|
|
|
.method private final getSizeSubtitle(J)Ljava/lang/String;
|
|
|
|
.locals 3
|
|
|
|
|
|
|
|
const-wide/16 v0, -0x1
|
|
|
|
|
|
|
|
cmp-long v2, p1, v0
|
|
|
|
|
|
|
|
if-eqz v2, :cond_0
|
|
|
|
|
|
|
|
new-instance v0, Ljava/lang/StringBuilder;
|
|
|
|
|
|
|
|
const-string v1, "\u2014 "
|
|
|
|
|
|
|
|
invoke-direct {v0, v1}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V
|
|
|
|
|
|
|
|
invoke-direct {p0, p1, p2}, Lcom/discord/widgets/chat/list/WidgetChatListAdapterItemUploadProgress;->getHumanReadableByteCount(J)Ljava/lang/String;
|
|
|
|
|
|
|
|
move-result-object p1
|
|
|
|
|
|
|
|
invoke-virtual {v0, p1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
|
|
|
|
invoke-virtual {v0}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
|
|
|
|
|
|
|
|
move-result-object p1
|
|
|
|
|
|
|
|
return-object p1
|
|
|
|
|
|
|
|
:cond_0
|
|
|
|
const/4 p1, 0x0
|
|
|
|
|
|
|
|
return-object p1
|
|
|
|
.end method
|
|
|
|
|
2019-02-04 20:17:36 +00:00
|
|
|
.method private final setUploadState(Lcom/discord/views/UploadProgressView;Lcom/discord/widgets/chat/list/WidgetChatListAdapterItemUploadProgress$Model;)V
|
2019-02-04 20:08:30 +00:00
|
|
|
.locals 10
|
|
|
|
|
2019-02-04 20:17:36 +00:00
|
|
|
sget-object v0, Lcom/discord/widgets/chat/list/WidgetChatListAdapterItemUploadProgress$Model$None;->INSTANCE:Lcom/discord/widgets/chat/list/WidgetChatListAdapterItemUploadProgress$Model$None;
|
2019-02-04 20:08:30 +00:00
|
|
|
|
2019-02-04 20:32:01 +00:00
|
|
|
invoke-static {p2, v0}, Lkotlin/jvm/internal/j;->n(Ljava/lang/Object;Ljava/lang/Object;)Z
|
2019-02-04 20:08:30 +00:00
|
|
|
|
|
|
|
move-result v0
|
|
|
|
|
|
|
|
const/4 v1, 0x0
|
|
|
|
|
|
|
|
const/4 v2, 0x2
|
|
|
|
|
2019-03-02 21:05:12 +00:00
|
|
|
const v3, 0x7f0401a8
|
2019-02-04 20:08:30 +00:00
|
|
|
|
|
|
|
const/4 v4, 0x0
|
|
|
|
|
2019-02-04 20:29:01 +00:00
|
|
|
if-eqz v0, :cond_0
|
2019-02-04 20:08:30 +00:00
|
|
|
|
|
|
|
move-object p2, p1
|
|
|
|
|
|
|
|
check-cast p2, Landroid/view/View;
|
|
|
|
|
2019-03-30 08:05:33 +00:00
|
|
|
const v0, 0x7f120fbf
|
2019-02-04 20:08:30 +00:00
|
|
|
|
|
|
|
invoke-static {p2, v0}, Lcom/discord/utilities/view/extensions/ViewExtensions;->getString(Landroid/view/View;I)Ljava/lang/String;
|
|
|
|
|
|
|
|
move-result-object p2
|
|
|
|
|
|
|
|
invoke-static {p1, p2, v4}, Lcom/discord/views/UploadProgressView;->a(Lcom/discord/views/UploadProgressView;Ljava/lang/String;I)V
|
|
|
|
|
|
|
|
invoke-virtual {p1}, Lcom/discord/views/UploadProgressView;->getContext()Landroid/content/Context;
|
|
|
|
|
|
|
|
move-result-object p2
|
|
|
|
|
|
|
|
const-string v0, "context"
|
|
|
|
|
|
|
|
invoke-static {p2, v0}, Lkotlin/jvm/internal/j;->g(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
|
|
|
|
invoke-static {p2, v3, v4, v2, v1}, Lcom/discord/utilities/drawable/DrawableCompat;->getThemedDrawableRes$default(Landroid/content/Context;IIILjava/lang/Object;)I
|
|
|
|
|
|
|
|
move-result p2
|
|
|
|
|
|
|
|
invoke-virtual {p1, p2}, Lcom/discord/views/UploadProgressView;->setIcon(I)V
|
|
|
|
|
|
|
|
return-void
|
|
|
|
|
2019-02-04 20:29:01 +00:00
|
|
|
:cond_0
|
2019-02-04 20:17:36 +00:00
|
|
|
instance-of v0, p2, Lcom/discord/widgets/chat/list/WidgetChatListAdapterItemUploadProgress$Model$Preprocessing;
|
2019-02-04 20:08:30 +00:00
|
|
|
|
|
|
|
const/4 v5, 0x1
|
|
|
|
|
2019-03-26 19:13:28 +00:00
|
|
|
const v6, 0x7f100096
|
2019-02-04 20:08:30 +00:00
|
|
|
|
|
|
|
const/4 v7, -0x1
|
|
|
|
|
|
|
|
if-eqz v0, :cond_3
|
|
|
|
|
2019-02-04 20:17:36 +00:00
|
|
|
check-cast p2, Lcom/discord/widgets/chat/list/WidgetChatListAdapterItemUploadProgress$Model$Preprocessing;
|
2019-02-04 20:08:30 +00:00
|
|
|
|
2019-02-04 20:17:36 +00:00
|
|
|
invoke-virtual {p2}, Lcom/discord/widgets/chat/list/WidgetChatListAdapterItemUploadProgress$Model$Preprocessing;->getDisplayName()Ljava/lang/String;
|
2019-02-04 20:08:30 +00:00
|
|
|
|
|
|
|
move-result-object v0
|
|
|
|
|
2019-02-04 20:29:01 +00:00
|
|
|
if-nez v0, :cond_1
|
2019-02-04 20:08:30 +00:00
|
|
|
|
|
|
|
invoke-virtual {p1}, Lcom/discord/views/UploadProgressView;->getResources()Landroid/content/res/Resources;
|
|
|
|
|
|
|
|
move-result-object v0
|
|
|
|
|
2019-02-04 20:17:36 +00:00
|
|
|
invoke-virtual {p2}, Lcom/discord/widgets/chat/list/WidgetChatListAdapterItemUploadProgress$Model$Preprocessing;->getNumFiles()I
|
2019-02-04 20:08:30 +00:00
|
|
|
|
|
|
|
move-result v8
|
|
|
|
|
|
|
|
new-array v5, v5, [Ljava/lang/Object;
|
|
|
|
|
2019-02-04 20:17:36 +00:00
|
|
|
invoke-virtual {p2}, Lcom/discord/widgets/chat/list/WidgetChatListAdapterItemUploadProgress$Model$Preprocessing;->getNumFiles()I
|
2019-02-04 20:08:30 +00:00
|
|
|
|
|
|
|
move-result v9
|
|
|
|
|
|
|
|
invoke-static {v9}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;
|
|
|
|
|
|
|
|
move-result-object v9
|
|
|
|
|
|
|
|
aput-object v9, v5, v4
|
|
|
|
|
|
|
|
invoke-virtual {v0, v6, v8, v5}, Landroid/content/res/Resources;->getQuantityString(II[Ljava/lang/Object;)Ljava/lang/String;
|
|
|
|
|
|
|
|
move-result-object v0
|
|
|
|
|
2019-02-04 20:29:01 +00:00
|
|
|
:cond_1
|
2019-02-04 20:08:30 +00:00
|
|
|
const-string v5, "title"
|
|
|
|
|
|
|
|
invoke-static {v0, v5}, Lkotlin/jvm/internal/j;->g(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
|
|
|
|
invoke-static {p1, v0, v7}, Lcom/discord/views/UploadProgressView;->a(Lcom/discord/views/UploadProgressView;Ljava/lang/String;I)V
|
|
|
|
|
2019-02-04 20:17:36 +00:00
|
|
|
invoke-virtual {p2}, Lcom/discord/widgets/chat/list/WidgetChatListAdapterItemUploadProgress$Model$Preprocessing;->getMimeType()Ljava/lang/String;
|
2019-02-04 20:08:30 +00:00
|
|
|
|
|
|
|
move-result-object v0
|
|
|
|
|
2019-02-04 20:29:01 +00:00
|
|
|
if-eqz v0, :cond_2
|
2019-02-04 20:08:30 +00:00
|
|
|
|
|
|
|
invoke-virtual {p1}, Lcom/discord/views/UploadProgressView;->getContext()Landroid/content/Context;
|
|
|
|
|
|
|
|
move-result-object v0
|
|
|
|
|
|
|
|
const-string v1, "context"
|
|
|
|
|
|
|
|
invoke-static {v0, v1}, Lkotlin/jvm/internal/j;->g(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
|
2019-02-04 20:17:36 +00:00
|
|
|
invoke-virtual {p2}, Lcom/discord/widgets/chat/list/WidgetChatListAdapterItemUploadProgress$Model$Preprocessing;->getMimeType()Ljava/lang/String;
|
2019-02-04 20:08:30 +00:00
|
|
|
|
|
|
|
move-result-object p2
|
|
|
|
|
|
|
|
invoke-direct {p0, v0, p2}, Lcom/discord/widgets/chat/list/WidgetChatListAdapterItemUploadProgress;->getIconForFiletype(Landroid/content/Context;Ljava/lang/String;)I
|
|
|
|
|
|
|
|
move-result p2
|
|
|
|
|
2019-02-04 20:29:01 +00:00
|
|
|
invoke-virtual {p1, p2}, Lcom/discord/views/UploadProgressView;->setIcon(I)V
|
|
|
|
|
|
|
|
return-void
|
|
|
|
|
|
|
|
:cond_2
|
|
|
|
invoke-virtual {p1}, Lcom/discord/views/UploadProgressView;->getContext()Landroid/content/Context;
|
|
|
|
|
|
|
|
move-result-object p2
|
|
|
|
|
|
|
|
const-string v0, "context"
|
|
|
|
|
|
|
|
invoke-static {p2, v0}, Lkotlin/jvm/internal/j;->g(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
|
|
|
|
invoke-static {p2, v3, v4, v2, v1}, Lcom/discord/utilities/drawable/DrawableCompat;->getThemedDrawableRes$default(Landroid/content/Context;IIILjava/lang/Object;)I
|
|
|
|
|
|
|
|
move-result p2
|
|
|
|
|
|
|
|
invoke-virtual {p1, p2}, Lcom/discord/views/UploadProgressView;->setIcon(I)V
|
|
|
|
|
|
|
|
return-void
|
2019-02-04 20:08:30 +00:00
|
|
|
|
|
|
|
:cond_3
|
2019-02-04 20:17:36 +00:00
|
|
|
instance-of v0, p2, Lcom/discord/widgets/chat/list/WidgetChatListAdapterItemUploadProgress$Model$Single;
|
2019-02-04 20:08:30 +00:00
|
|
|
|
|
|
|
if-eqz v0, :cond_5
|
|
|
|
|
2019-02-04 20:17:36 +00:00
|
|
|
check-cast p2, Lcom/discord/widgets/chat/list/WidgetChatListAdapterItemUploadProgress$Model$Single;
|
2019-02-04 20:08:30 +00:00
|
|
|
|
2019-02-04 20:17:36 +00:00
|
|
|
invoke-virtual {p2}, Lcom/discord/widgets/chat/list/WidgetChatListAdapterItemUploadProgress$Model$Single;->getName()Ljava/lang/String;
|
2019-02-04 20:08:30 +00:00
|
|
|
|
|
|
|
move-result-object v0
|
|
|
|
|
2019-02-04 20:17:36 +00:00
|
|
|
invoke-virtual {p2}, Lcom/discord/widgets/chat/list/WidgetChatListAdapterItemUploadProgress$Model$Single;->getProgress()I
|
2019-02-04 20:08:30 +00:00
|
|
|
|
|
|
|
move-result v1
|
|
|
|
|
|
|
|
if-ne v1, v7, :cond_4
|
|
|
|
|
2019-02-04 20:29:01 +00:00
|
|
|
goto :goto_0
|
2019-02-04 20:08:30 +00:00
|
|
|
|
|
|
|
:cond_4
|
2019-02-04 20:17:36 +00:00
|
|
|
invoke-virtual {p2}, Lcom/discord/widgets/chat/list/WidgetChatListAdapterItemUploadProgress$Model$Single;->getProgress()I
|
2019-02-04 20:08:30 +00:00
|
|
|
|
|
|
|
move-result v7
|
|
|
|
|
2019-02-04 20:29:01 +00:00
|
|
|
:goto_0
|
2019-02-04 20:17:36 +00:00
|
|
|
invoke-virtual {p2}, Lcom/discord/widgets/chat/list/WidgetChatListAdapterItemUploadProgress$Model$Single;->getSizeBytes()J
|
2019-02-04 20:08:30 +00:00
|
|
|
|
|
|
|
move-result-wide v1
|
|
|
|
|
|
|
|
invoke-direct {p0, v1, v2}, Lcom/discord/widgets/chat/list/WidgetChatListAdapterItemUploadProgress;->getSizeSubtitle(J)Ljava/lang/String;
|
|
|
|
|
|
|
|
move-result-object v1
|
|
|
|
|
|
|
|
invoke-virtual {p1, v0, v7, v1}, Lcom/discord/views/UploadProgressView;->a(Ljava/lang/String;ILjava/lang/String;)V
|
|
|
|
|
|
|
|
invoke-virtual {p1}, Lcom/discord/views/UploadProgressView;->getContext()Landroid/content/Context;
|
|
|
|
|
|
|
|
move-result-object v0
|
|
|
|
|
|
|
|
const-string v1, "context"
|
|
|
|
|
|
|
|
invoke-static {v0, v1}, Lkotlin/jvm/internal/j;->g(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
|
2019-02-04 20:17:36 +00:00
|
|
|
invoke-virtual {p2}, Lcom/discord/widgets/chat/list/WidgetChatListAdapterItemUploadProgress$Model$Single;->getMimeType()Ljava/lang/String;
|
2019-02-04 20:08:30 +00:00
|
|
|
|
|
|
|
move-result-object p2
|
|
|
|
|
2019-02-04 20:29:01 +00:00
|
|
|
invoke-direct {p0, v0, p2}, Lcom/discord/widgets/chat/list/WidgetChatListAdapterItemUploadProgress;->getIconForFiletype(Landroid/content/Context;Ljava/lang/String;)I
|
|
|
|
|
|
|
|
move-result p2
|
|
|
|
|
|
|
|
invoke-virtual {p1, p2}, Lcom/discord/views/UploadProgressView;->setIcon(I)V
|
|
|
|
|
|
|
|
return-void
|
2019-02-04 20:08:30 +00:00
|
|
|
|
|
|
|
:cond_5
|
2019-02-04 20:17:36 +00:00
|
|
|
instance-of v0, p2, Lcom/discord/widgets/chat/list/WidgetChatListAdapterItemUploadProgress$Model$Many;
|
2019-02-04 20:08:30 +00:00
|
|
|
|
|
|
|
if-eqz v0, :cond_7
|
|
|
|
|
|
|
|
invoke-virtual {p1}, Lcom/discord/views/UploadProgressView;->getResources()Landroid/content/res/Resources;
|
|
|
|
|
|
|
|
move-result-object v0
|
|
|
|
|
2019-02-04 20:17:36 +00:00
|
|
|
check-cast p2, Lcom/discord/widgets/chat/list/WidgetChatListAdapterItemUploadProgress$Model$Many;
|
2019-02-04 20:08:30 +00:00
|
|
|
|
2019-02-04 20:17:36 +00:00
|
|
|
invoke-virtual {p2}, Lcom/discord/widgets/chat/list/WidgetChatListAdapterItemUploadProgress$Model$Many;->getNumFiles()I
|
2019-02-04 20:08:30 +00:00
|
|
|
|
|
|
|
move-result v8
|
|
|
|
|
|
|
|
new-array v5, v5, [Ljava/lang/Object;
|
|
|
|
|
2019-02-04 20:17:36 +00:00
|
|
|
invoke-virtual {p2}, Lcom/discord/widgets/chat/list/WidgetChatListAdapterItemUploadProgress$Model$Many;->getNumFiles()I
|
2019-02-04 20:08:30 +00:00
|
|
|
|
|
|
|
move-result v9
|
|
|
|
|
|
|
|
invoke-static {v9}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;
|
|
|
|
|
|
|
|
move-result-object v9
|
|
|
|
|
|
|
|
aput-object v9, v5, v4
|
|
|
|
|
|
|
|
invoke-virtual {v0, v6, v8, v5}, Landroid/content/res/Resources;->getQuantityString(II[Ljava/lang/Object;)Ljava/lang/String;
|
|
|
|
|
|
|
|
move-result-object v0
|
|
|
|
|
2019-02-04 20:17:36 +00:00
|
|
|
invoke-virtual {p2}, Lcom/discord/widgets/chat/list/WidgetChatListAdapterItemUploadProgress$Model$Many;->getProgress()I
|
2019-02-04 20:08:30 +00:00
|
|
|
|
|
|
|
move-result v5
|
|
|
|
|
|
|
|
if-ne v5, v7, :cond_6
|
|
|
|
|
2019-02-04 20:29:01 +00:00
|
|
|
goto :goto_1
|
2019-02-04 20:08:30 +00:00
|
|
|
|
|
|
|
:cond_6
|
2019-02-04 20:17:36 +00:00
|
|
|
invoke-virtual {p2}, Lcom/discord/widgets/chat/list/WidgetChatListAdapterItemUploadProgress$Model$Many;->getProgress()I
|
2019-02-04 20:08:30 +00:00
|
|
|
|
|
|
|
move-result v7
|
|
|
|
|
2019-02-04 20:29:01 +00:00
|
|
|
:goto_1
|
2019-02-04 20:17:36 +00:00
|
|
|
invoke-virtual {p2}, Lcom/discord/widgets/chat/list/WidgetChatListAdapterItemUploadProgress$Model$Many;->getSizeBytes()J
|
2019-02-04 20:08:30 +00:00
|
|
|
|
|
|
|
move-result-wide v5
|
|
|
|
|
|
|
|
invoke-direct {p0, v5, v6}, Lcom/discord/widgets/chat/list/WidgetChatListAdapterItemUploadProgress;->getSizeSubtitle(J)Ljava/lang/String;
|
|
|
|
|
|
|
|
move-result-object p2
|
|
|
|
|
|
|
|
const-string v5, "title"
|
|
|
|
|
|
|
|
invoke-static {v0, v5}, Lkotlin/jvm/internal/j;->g(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
|
|
|
|
invoke-virtual {p1, v0, v7, p2}, Lcom/discord/views/UploadProgressView;->a(Ljava/lang/String;ILjava/lang/String;)V
|
|
|
|
|
|
|
|
invoke-virtual {p1}, Lcom/discord/views/UploadProgressView;->getContext()Landroid/content/Context;
|
|
|
|
|
|
|
|
move-result-object p2
|
|
|
|
|
|
|
|
const-string v0, "context"
|
|
|
|
|
|
|
|
invoke-static {p2, v0}, Lkotlin/jvm/internal/j;->g(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
|
|
|
|
invoke-static {p2, v3, v4, v2, v1}, Lcom/discord/utilities/drawable/DrawableCompat;->getThemedDrawableRes$default(Landroid/content/Context;IIILjava/lang/Object;)I
|
|
|
|
|
|
|
|
move-result p2
|
|
|
|
|
|
|
|
invoke-virtual {p1, p2}, Lcom/discord/views/UploadProgressView;->setIcon(I)V
|
|
|
|
|
|
|
|
:cond_7
|
|
|
|
return-void
|
|
|
|
.end method
|
|
|
|
|
|
|
|
|
|
|
|
# virtual methods
|
|
|
|
.method public final getSubscription()Lrx/Subscription;
|
|
|
|
.locals 1
|
|
|
|
|
|
|
|
iget-object v0, p0, Lcom/discord/widgets/chat/list/WidgetChatListAdapterItemUploadProgress;->subscription:Lrx/Subscription;
|
|
|
|
|
|
|
|
return-object v0
|
|
|
|
.end method
|
|
|
|
|
|
|
|
.method protected final onConfigure(ILcom/discord/widgets/chat/list/entries/ChatListEntry;)V
|
|
|
|
.locals 8
|
|
|
|
|
|
|
|
const-string v0, "data"
|
|
|
|
|
|
|
|
invoke-static {p2, v0}, Lkotlin/jvm/internal/j;->h(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
|
|
|
|
invoke-super {p0, p1, p2}, Lcom/discord/widgets/chat/list/WidgetChatListItem;->onConfigure(ILcom/discord/widgets/chat/list/entries/ChatListEntry;)V
|
|
|
|
|
2019-02-04 20:17:36 +00:00
|
|
|
sget-object p1, Lcom/discord/widgets/chat/list/WidgetChatListAdapterItemUploadProgress$ModelProvider;->INSTANCE:Lcom/discord/widgets/chat/list/WidgetChatListAdapterItemUploadProgress$ModelProvider;
|
2019-02-04 20:08:30 +00:00
|
|
|
|
|
|
|
move-object v0, p2
|
|
|
|
|
|
|
|
check-cast v0, Lcom/discord/widgets/chat/list/entries/UploadProgressEntry;
|
|
|
|
|
|
|
|
invoke-virtual {v0}, Lcom/discord/widgets/chat/list/entries/UploadProgressEntry;->getMessageNonce()Ljava/lang/String;
|
|
|
|
|
|
|
|
move-result-object v0
|
|
|
|
|
2019-02-04 20:17:36 +00:00
|
|
|
const-wide/16 v1, 0x64
|
2019-02-04 20:08:30 +00:00
|
|
|
|
2019-02-04 20:17:36 +00:00
|
|
|
invoke-virtual {p1, v0, v1, v2}, Lcom/discord/widgets/chat/list/WidgetChatListAdapterItemUploadProgress$ModelProvider;->get(Ljava/lang/String;J)Lrx/Observable;
|
2019-02-04 20:08:30 +00:00
|
|
|
|
|
|
|
move-result-object p1
|
|
|
|
|
2019-03-22 22:04:12 +00:00
|
|
|
invoke-virtual {p1}, Lrx/Observable;->DE()Lrx/Observable;
|
2019-02-04 20:08:30 +00:00
|
|
|
|
|
|
|
move-result-object p1
|
|
|
|
|
2019-03-30 08:05:33 +00:00
|
|
|
invoke-static {}, Lcom/discord/app/h;->dt()Lrx/Observable$Transformer;
|
2019-02-04 20:08:30 +00:00
|
|
|
|
|
|
|
move-result-object v0
|
|
|
|
|
|
|
|
invoke-virtual {p1, v0}, Lrx/Observable;->a(Lrx/Observable$Transformer;)Lrx/Observable;
|
|
|
|
|
|
|
|
move-result-object p1
|
|
|
|
|
2019-03-30 08:05:33 +00:00
|
|
|
sget-object v0, Lcom/discord/app/h;->tA:Lcom/discord/app/h;
|
2019-02-04 20:08:30 +00:00
|
|
|
|
|
|
|
new-instance v0, Lcom/discord/widgets/chat/list/WidgetChatListAdapterItemUploadProgress$onConfigure$1;
|
|
|
|
|
|
|
|
move-object v1, p0
|
|
|
|
|
|
|
|
check-cast v1, Lcom/discord/widgets/chat/list/WidgetChatListAdapterItemUploadProgress;
|
|
|
|
|
|
|
|
invoke-direct {v0, v1}, Lcom/discord/widgets/chat/list/WidgetChatListAdapterItemUploadProgress$onConfigure$1;-><init>(Lcom/discord/widgets/chat/list/WidgetChatListAdapterItemUploadProgress;)V
|
|
|
|
|
|
|
|
move-object v2, v0
|
|
|
|
|
|
|
|
check-cast v2, Lkotlin/jvm/functions/Function1;
|
|
|
|
|
|
|
|
invoke-virtual {p0}, Ljava/lang/Object;->getClass()Ljava/lang/Class;
|
|
|
|
|
|
|
|
move-result-object v0
|
|
|
|
|
|
|
|
invoke-virtual {v0}, Ljava/lang/Class;->getSimpleName()Ljava/lang/String;
|
|
|
|
|
|
|
|
move-result-object v3
|
|
|
|
|
|
|
|
const-string v0, "javaClass.simpleName"
|
|
|
|
|
|
|
|
invoke-static {v3, v0}, Lkotlin/jvm/internal/j;->g(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
|
|
|
|
new-instance v0, Lcom/discord/widgets/chat/list/WidgetChatListAdapterItemUploadProgress$onConfigure$2;
|
|
|
|
|
|
|
|
invoke-direct {v0, p0}, Lcom/discord/widgets/chat/list/WidgetChatListAdapterItemUploadProgress$onConfigure$2;-><init>(Lcom/discord/widgets/chat/list/WidgetChatListAdapterItemUploadProgress;)V
|
|
|
|
|
|
|
|
move-object v5, v0
|
|
|
|
|
|
|
|
check-cast v5, Lkotlin/jvm/functions/Function1;
|
|
|
|
|
|
|
|
const/4 v4, 0x0
|
|
|
|
|
|
|
|
const/4 v6, 0x0
|
|
|
|
|
|
|
|
const/16 v7, 0x34
|
|
|
|
|
2019-03-30 08:05:33 +00:00
|
|
|
invoke-static/range {v2 .. v7}, Lcom/discord/app/h;->a(Lkotlin/jvm/functions/Function1;Ljava/lang/String;Lkotlin/jvm/functions/Function1;Lkotlin/jvm/functions/Function1;Landroid/content/Context;I)Lrx/Observable$Transformer;
|
2019-02-04 20:08:30 +00:00
|
|
|
|
|
|
|
move-result-object v0
|
|
|
|
|
|
|
|
invoke-virtual {p1, v0}, Lrx/Observable;->a(Lrx/Observable$Transformer;)Lrx/Observable;
|
|
|
|
|
|
|
|
new-instance p1, Lcom/discord/widgets/chat/list/WidgetChatListAdapterItemUploadProgress$onConfigure$cancel$1;
|
|
|
|
|
|
|
|
invoke-direct {p1, p2}, Lcom/discord/widgets/chat/list/WidgetChatListAdapterItemUploadProgress$onConfigure$cancel$1;-><init>(Lcom/discord/widgets/chat/list/entries/ChatListEntry;)V
|
|
|
|
|
|
|
|
check-cast p1, Lkotlin/jvm/functions/Function0;
|
|
|
|
|
|
|
|
iget-object p2, p0, Lcom/discord/widgets/chat/list/WidgetChatListAdapterItemUploadProgress;->cancelButtonTop:Landroid/view/View;
|
|
|
|
|
|
|
|
new-instance v0, Lcom/discord/widgets/chat/list/WidgetChatListAdapterItemUploadProgress$onConfigure$3;
|
|
|
|
|
|
|
|
invoke-direct {v0, p1}, Lcom/discord/widgets/chat/list/WidgetChatListAdapterItemUploadProgress$onConfigure$3;-><init>(Lkotlin/jvm/functions/Function0;)V
|
|
|
|
|
|
|
|
check-cast v0, Landroid/view/View$OnClickListener;
|
|
|
|
|
|
|
|
invoke-virtual {p2, v0}, Landroid/view/View;->setOnClickListener(Landroid/view/View$OnClickListener;)V
|
|
|
|
|
|
|
|
iget-object p2, p0, Lcom/discord/widgets/chat/list/WidgetChatListAdapterItemUploadProgress;->cancelButtonCentered:Landroid/view/View;
|
|
|
|
|
|
|
|
new-instance v0, Lcom/discord/widgets/chat/list/WidgetChatListAdapterItemUploadProgress$onConfigure$4;
|
|
|
|
|
|
|
|
invoke-direct {v0, p1}, Lcom/discord/widgets/chat/list/WidgetChatListAdapterItemUploadProgress$onConfigure$4;-><init>(Lkotlin/jvm/functions/Function0;)V
|
|
|
|
|
|
|
|
check-cast v0, Landroid/view/View$OnClickListener;
|
|
|
|
|
|
|
|
invoke-virtual {p2, v0}, Landroid/view/View;->setOnClickListener(Landroid/view/View$OnClickListener;)V
|
|
|
|
|
|
|
|
return-void
|
|
|
|
.end method
|
|
|
|
|
|
|
|
.method public final bridge synthetic onConfigure(ILjava/lang/Object;)V
|
|
|
|
.locals 0
|
|
|
|
|
|
|
|
check-cast p2, Lcom/discord/widgets/chat/list/entries/ChatListEntry;
|
|
|
|
|
|
|
|
invoke-virtual {p0, p1, p2}, Lcom/discord/widgets/chat/list/WidgetChatListAdapterItemUploadProgress;->onConfigure(ILcom/discord/widgets/chat/list/entries/ChatListEntry;)V
|
|
|
|
|
|
|
|
return-void
|
|
|
|
.end method
|