437 lines
12 KiB
Smali
437 lines
12 KiB
Smali
.class public final Lcom/discord/dialogs/ImageUploadDialog;
|
|
.super Lcom/discord/app/AppDialog;
|
|
.source "ImageUploadDialog.kt"
|
|
|
|
|
|
# annotations
|
|
.annotation system Ldalvik/annotation/MemberClasses;
|
|
value = {
|
|
Lcom/discord/dialogs/ImageUploadDialog$PreviewType;,
|
|
Lcom/discord/dialogs/ImageUploadDialog$b;
|
|
}
|
|
.end annotation
|
|
|
|
|
|
# static fields
|
|
.field public static final synthetic m:[Lkotlin/reflect/KProperty;
|
|
|
|
.field public static final n:Lcom/discord/dialogs/ImageUploadDialog$b;
|
|
|
|
|
|
# instance fields
|
|
.field public final d:Lkotlin/properties/ReadOnlyProperty;
|
|
|
|
.field public final e:Lkotlin/properties/ReadOnlyProperty;
|
|
|
|
.field public final f:Lkotlin/properties/ReadOnlyProperty;
|
|
|
|
.field public final g:Lkotlin/properties/ReadOnlyProperty;
|
|
|
|
.field public h:Landroid/net/Uri;
|
|
|
|
.field public i:Lcom/miguelgaeta/media_picker/MediaPicker$Provider;
|
|
|
|
.field public j:Ljava/lang/String;
|
|
|
|
.field public k:Lrx/functions/Action1;
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"Lrx/functions/Action1<",
|
|
"Ljava/lang/String;",
|
|
">;"
|
|
}
|
|
.end annotation
|
|
.end field
|
|
|
|
.field public l:Lcom/discord/dialogs/ImageUploadDialog$PreviewType;
|
|
|
|
|
|
# direct methods
|
|
.method public static constructor <clinit>()V
|
|
.locals 5
|
|
|
|
const/4 v0, 0x4
|
|
|
|
new-array v0, v0, [Lkotlin/reflect/KProperty;
|
|
|
|
new-instance v1, Lj0/n/c/q;
|
|
|
|
const-class v2, Lcom/discord/dialogs/ImageUploadDialog;
|
|
|
|
invoke-static {v2}, Lj0/n/c/s;->getOrCreateKotlinClass(Ljava/lang/Class;)Lj0/r/b;
|
|
|
|
move-result-object v2
|
|
|
|
const-string v3, "upload"
|
|
|
|
const-string v4, "getUpload()Landroid/view/View;"
|
|
|
|
invoke-direct {v1, v2, v3, v4}, Lj0/n/c/q;-><init>(Lkotlin/reflect/KDeclarationContainer;Ljava/lang/String;Ljava/lang/String;)V
|
|
|
|
invoke-static {v1}, Lj0/n/c/s;->property1(Lj0/n/c/p;)Lj0/r/d;
|
|
|
|
const/4 v2, 0x0
|
|
|
|
aput-object v1, v0, v2
|
|
|
|
new-instance v1, Lj0/n/c/q;
|
|
|
|
const-class v2, Lcom/discord/dialogs/ImageUploadDialog;
|
|
|
|
invoke-static {v2}, Lj0/n/c/s;->getOrCreateKotlinClass(Ljava/lang/Class;)Lj0/r/b;
|
|
|
|
move-result-object v2
|
|
|
|
const-string v3, "crop"
|
|
|
|
const-string v4, "getCrop()Landroid/view/View;"
|
|
|
|
invoke-direct {v1, v2, v3, v4}, Lj0/n/c/q;-><init>(Lkotlin/reflect/KDeclarationContainer;Ljava/lang/String;Ljava/lang/String;)V
|
|
|
|
invoke-static {v1}, Lj0/n/c/s;->property1(Lj0/n/c/p;)Lj0/r/d;
|
|
|
|
const/4 v2, 0x1
|
|
|
|
aput-object v1, v0, v2
|
|
|
|
new-instance v1, Lj0/n/c/q;
|
|
|
|
const-class v2, Lcom/discord/dialogs/ImageUploadDialog;
|
|
|
|
invoke-static {v2}, Lj0/n/c/s;->getOrCreateKotlinClass(Ljava/lang/Class;)Lj0/r/b;
|
|
|
|
move-result-object v2
|
|
|
|
const-string v3, "cancel"
|
|
|
|
const-string v4, "getCancel()Landroid/view/View;"
|
|
|
|
invoke-direct {v1, v2, v3, v4}, Lj0/n/c/q;-><init>(Lkotlin/reflect/KDeclarationContainer;Ljava/lang/String;Ljava/lang/String;)V
|
|
|
|
invoke-static {v1}, Lj0/n/c/s;->property1(Lj0/n/c/p;)Lj0/r/d;
|
|
|
|
const/4 v2, 0x2
|
|
|
|
aput-object v1, v0, v2
|
|
|
|
new-instance v1, Lj0/n/c/q;
|
|
|
|
const-class v2, Lcom/discord/dialogs/ImageUploadDialog;
|
|
|
|
invoke-static {v2}, Lj0/n/c/s;->getOrCreateKotlinClass(Ljava/lang/Class;)Lj0/r/b;
|
|
|
|
move-result-object v2
|
|
|
|
const-string v3, "image"
|
|
|
|
const-string v4, "getImage()Lcom/facebook/drawee/view/SimpleDraweeView;"
|
|
|
|
invoke-direct {v1, v2, v3, v4}, Lj0/n/c/q;-><init>(Lkotlin/reflect/KDeclarationContainer;Ljava/lang/String;Ljava/lang/String;)V
|
|
|
|
invoke-static {v1}, Lj0/n/c/s;->property1(Lj0/n/c/p;)Lj0/r/d;
|
|
|
|
const/4 v2, 0x3
|
|
|
|
aput-object v1, v0, v2
|
|
|
|
sput-object v0, Lcom/discord/dialogs/ImageUploadDialog;->m:[Lkotlin/reflect/KProperty;
|
|
|
|
new-instance v0, Lcom/discord/dialogs/ImageUploadDialog$b;
|
|
|
|
const/4 v1, 0x0
|
|
|
|
invoke-direct {v0, v1}, Lcom/discord/dialogs/ImageUploadDialog$b;-><init>(Lkotlin/jvm/internal/DefaultConstructorMarker;)V
|
|
|
|
sput-object v0, Lcom/discord/dialogs/ImageUploadDialog;->n:Lcom/discord/dialogs/ImageUploadDialog$b;
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public constructor <init>()V
|
|
.locals 1
|
|
|
|
invoke-direct {p0}, Lcom/discord/app/AppDialog;-><init>()V
|
|
|
|
const v0, 0x7f0a0630
|
|
|
|
invoke-static {p0, v0}, Lf/n/a/k/a;->i(Landroidx/fragment/app/DialogFragment;I)Lkotlin/properties/ReadOnlyProperty;
|
|
|
|
move-result-object v0
|
|
|
|
iput-object v0, p0, Lcom/discord/dialogs/ImageUploadDialog;->d:Lkotlin/properties/ReadOnlyProperty;
|
|
|
|
const v0, 0x7f0a062b
|
|
|
|
invoke-static {p0, v0}, Lf/n/a/k/a;->i(Landroidx/fragment/app/DialogFragment;I)Lkotlin/properties/ReadOnlyProperty;
|
|
|
|
move-result-object v0
|
|
|
|
iput-object v0, p0, Lcom/discord/dialogs/ImageUploadDialog;->e:Lkotlin/properties/ReadOnlyProperty;
|
|
|
|
const v0, 0x7f0a062a
|
|
|
|
invoke-static {p0, v0}, Lf/n/a/k/a;->i(Landroidx/fragment/app/DialogFragment;I)Lkotlin/properties/ReadOnlyProperty;
|
|
|
|
move-result-object v0
|
|
|
|
iput-object v0, p0, Lcom/discord/dialogs/ImageUploadDialog;->f:Lkotlin/properties/ReadOnlyProperty;
|
|
|
|
const v0, 0x7f0a062e
|
|
|
|
invoke-static {p0, v0}, Lf/n/a/k/a;->i(Landroidx/fragment/app/DialogFragment;I)Lkotlin/properties/ReadOnlyProperty;
|
|
|
|
move-result-object v0
|
|
|
|
iput-object v0, p0, Lcom/discord/dialogs/ImageUploadDialog;->g:Lkotlin/properties/ReadOnlyProperty;
|
|
|
|
return-void
|
|
.end method
|
|
|
|
|
|
# virtual methods
|
|
.method public final f()Lcom/facebook/drawee/view/SimpleDraweeView;
|
|
.locals 3
|
|
|
|
iget-object v0, p0, Lcom/discord/dialogs/ImageUploadDialog;->g:Lkotlin/properties/ReadOnlyProperty;
|
|
|
|
sget-object v1, Lcom/discord/dialogs/ImageUploadDialog;->m:[Lkotlin/reflect/KProperty;
|
|
|
|
const/4 v2, 0x3
|
|
|
|
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, Lcom/facebook/drawee/view/SimpleDraweeView;
|
|
|
|
return-object v0
|
|
.end method
|
|
|
|
.method public getContentViewResId()I
|
|
.locals 1
|
|
|
|
const v0, 0x7f0d0066
|
|
|
|
return v0
|
|
.end method
|
|
|
|
.method public onViewBound(Landroid/view/View;)V
|
|
.locals 16
|
|
|
|
move-object/from16 v0, p0
|
|
|
|
invoke-super/range {p0 .. p1}, Lcom/discord/app/AppDialog;->onViewBound(Landroid/view/View;)V
|
|
|
|
iget-object v1, v0, Lcom/discord/dialogs/ImageUploadDialog;->l:Lcom/discord/dialogs/ImageUploadDialog$PreviewType;
|
|
|
|
iget-object v2, v0, Lcom/discord/dialogs/ImageUploadDialog;->j:Ljava/lang/String;
|
|
|
|
if-eqz v1, :cond_5
|
|
|
|
if-nez v2, :cond_0
|
|
|
|
goto/16 :goto_2
|
|
|
|
:cond_0
|
|
const-string v3, "image/gif"
|
|
|
|
invoke-static {v2, v3}, Lj0/n/c/h;->areEqual(Ljava/lang/Object;Ljava/lang/Object;)Z
|
|
|
|
move-result v3
|
|
|
|
iget-object v4, v0, Lcom/discord/dialogs/ImageUploadDialog;->d:Lkotlin/properties/ReadOnlyProperty;
|
|
|
|
sget-object v5, Lcom/discord/dialogs/ImageUploadDialog;->m:[Lkotlin/reflect/KProperty;
|
|
|
|
const/4 v6, 0x0
|
|
|
|
aget-object v5, v5, v6
|
|
|
|
invoke-interface {v4, v0, v5}, Lkotlin/properties/ReadOnlyProperty;->getValue(Ljava/lang/Object;Lkotlin/reflect/KProperty;)Ljava/lang/Object;
|
|
|
|
move-result-object v4
|
|
|
|
check-cast v4, Landroid/view/View;
|
|
|
|
new-instance v5, Lcom/discord/dialogs/ImageUploadDialog$c;
|
|
|
|
invoke-direct {v5, v0, v2}, Lcom/discord/dialogs/ImageUploadDialog$c;-><init>(Lcom/discord/dialogs/ImageUploadDialog;Ljava/lang/String;)V
|
|
|
|
invoke-virtual {v4, v5}, Landroid/view/View;->setOnClickListener(Landroid/view/View$OnClickListener;)V
|
|
|
|
iget-object v2, v0, Lcom/discord/dialogs/ImageUploadDialog;->e:Lkotlin/properties/ReadOnlyProperty;
|
|
|
|
sget-object v4, Lcom/discord/dialogs/ImageUploadDialog;->m:[Lkotlin/reflect/KProperty;
|
|
|
|
const/4 v5, 0x1
|
|
|
|
aget-object v4, v4, v5
|
|
|
|
invoke-interface {v2, v0, v4}, Lkotlin/properties/ReadOnlyProperty;->getValue(Ljava/lang/Object;Lkotlin/reflect/KProperty;)Ljava/lang/Object;
|
|
|
|
move-result-object v2
|
|
|
|
check-cast v2, Landroid/view/View;
|
|
|
|
if-eqz v3, :cond_1
|
|
|
|
const/4 v4, 0x4
|
|
|
|
goto :goto_0
|
|
|
|
:cond_1
|
|
const/4 v4, 0x0
|
|
|
|
:goto_0
|
|
invoke-virtual {v2, v4}, Landroid/view/View;->setVisibility(I)V
|
|
|
|
if-nez v3, :cond_2
|
|
|
|
iget-object v2, v0, Lcom/discord/dialogs/ImageUploadDialog;->e:Lkotlin/properties/ReadOnlyProperty;
|
|
|
|
sget-object v3, Lcom/discord/dialogs/ImageUploadDialog;->m:[Lkotlin/reflect/KProperty;
|
|
|
|
aget-object v3, v3, v5
|
|
|
|
invoke-interface {v2, v0, v3}, Lkotlin/properties/ReadOnlyProperty;->getValue(Ljava/lang/Object;Lkotlin/reflect/KProperty;)Ljava/lang/Object;
|
|
|
|
move-result-object v2
|
|
|
|
check-cast v2, Landroid/view/View;
|
|
|
|
new-instance v3, Lcom/discord/dialogs/ImageUploadDialog$a;
|
|
|
|
invoke-direct {v3, v6, v0}, Lcom/discord/dialogs/ImageUploadDialog$a;-><init>(ILjava/lang/Object;)V
|
|
|
|
invoke-virtual {v2, v3}, Landroid/view/View;->setOnClickListener(Landroid/view/View$OnClickListener;)V
|
|
|
|
:cond_2
|
|
iget-object v2, v0, Lcom/discord/dialogs/ImageUploadDialog;->f:Lkotlin/properties/ReadOnlyProperty;
|
|
|
|
sget-object v3, Lcom/discord/dialogs/ImageUploadDialog;->m:[Lkotlin/reflect/KProperty;
|
|
|
|
const/4 v4, 0x2
|
|
|
|
aget-object v3, v3, v4
|
|
|
|
invoke-interface {v2, v0, v3}, Lkotlin/properties/ReadOnlyProperty;->getValue(Ljava/lang/Object;Lkotlin/reflect/KProperty;)Ljava/lang/Object;
|
|
|
|
move-result-object v2
|
|
|
|
check-cast v2, Landroid/view/View;
|
|
|
|
new-instance v3, Lcom/discord/dialogs/ImageUploadDialog$a;
|
|
|
|
invoke-direct {v3, v5, v0}, Lcom/discord/dialogs/ImageUploadDialog$a;-><init>(ILjava/lang/Object;)V
|
|
|
|
invoke-virtual {v2, v3}, Landroid/view/View;->setOnClickListener(Landroid/view/View$OnClickListener;)V
|
|
|
|
invoke-virtual/range {p0 .. p0}, Landroidx/fragment/app/Fragment;->getResources()Landroid/content/res/Resources;
|
|
|
|
move-result-object v2
|
|
|
|
invoke-virtual {v1}, Lcom/discord/dialogs/ImageUploadDialog$PreviewType;->getPreviewSizeDimenId()I
|
|
|
|
move-result v3
|
|
|
|
invoke-virtual {v2, v3}, Landroid/content/res/Resources;->getDimensionPixelSize(I)I
|
|
|
|
move-result v9
|
|
|
|
invoke-virtual/range {p0 .. p0}, Lcom/discord/dialogs/ImageUploadDialog;->f()Lcom/facebook/drawee/view/SimpleDraweeView;
|
|
|
|
move-result-object v2
|
|
|
|
invoke-virtual {v2}, Landroid/widget/ImageView;->getLayoutParams()Landroid/view/ViewGroup$LayoutParams;
|
|
|
|
move-result-object v2
|
|
|
|
iput v9, v2, Landroid/view/ViewGroup$LayoutParams;->height:I
|
|
|
|
iput v9, v2, Landroid/view/ViewGroup$LayoutParams;->width:I
|
|
|
|
invoke-virtual/range {p0 .. p0}, Lcom/discord/dialogs/ImageUploadDialog;->f()Lcom/facebook/drawee/view/SimpleDraweeView;
|
|
|
|
move-result-object v3
|
|
|
|
invoke-virtual {v3, v2}, Landroid/widget/ImageView;->setLayoutParams(Landroid/view/ViewGroup$LayoutParams;)V
|
|
|
|
invoke-virtual {v1}, Ljava/lang/Enum;->ordinal()I
|
|
|
|
move-result v1
|
|
|
|
if-eq v1, v5, :cond_3
|
|
|
|
if-eq v1, v4, :cond_3
|
|
|
|
goto :goto_1
|
|
|
|
:cond_3
|
|
invoke-virtual/range {p0 .. p0}, Lcom/discord/dialogs/ImageUploadDialog;->f()Lcom/facebook/drawee/view/SimpleDraweeView;
|
|
|
|
move-result-object v1
|
|
|
|
int-to-float v2, v9
|
|
|
|
const v3, 0x7f040429
|
|
|
|
move-object/from16 v4, p1
|
|
|
|
invoke-static {v4, v3}, Lcom/discord/utilities/color/ColorCompat;->getThemedColor(Landroid/view/View;I)I
|
|
|
|
move-result v3
|
|
|
|
invoke-static {v3}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;
|
|
|
|
move-result-object v3
|
|
|
|
invoke-static {v1, v2, v5, v3}, Lcom/discord/utilities/images/MGImages;->setCornerRadius(Landroid/widget/ImageView;FZLjava/lang/Integer;)V
|
|
|
|
:goto_1
|
|
invoke-virtual/range {p0 .. p0}, Lcom/discord/dialogs/ImageUploadDialog;->f()Lcom/facebook/drawee/view/SimpleDraweeView;
|
|
|
|
move-result-object v6
|
|
|
|
iget-object v1, v0, Lcom/discord/dialogs/ImageUploadDialog;->h:Landroid/net/Uri;
|
|
|
|
if-eqz v1, :cond_4
|
|
|
|
invoke-virtual {v1}, Landroid/net/Uri;->toString()Ljava/lang/String;
|
|
|
|
move-result-object v7
|
|
|
|
const/4 v10, 0x0
|
|
|
|
const/4 v11, 0x0
|
|
|
|
const/4 v12, 0x0
|
|
|
|
const/4 v13, 0x0
|
|
|
|
const/16 v14, 0xf0
|
|
|
|
const/4 v15, 0x0
|
|
|
|
move v8, v9
|
|
|
|
invoke-static/range {v6 .. v15}, Lcom/discord/utilities/images/MGImages;->setImage$default(Landroid/widget/ImageView;Ljava/lang/String;IIZLkotlin/jvm/functions/Function1;Lcom/discord/utilities/images/MGImages$ChangeDetector;Ljava/util/List;ILjava/lang/Object;)V
|
|
|
|
return-void
|
|
|
|
:cond_4
|
|
const-string v1, "uri"
|
|
|
|
invoke-static {v1}, Lj0/n/c/h;->throwUninitializedPropertyAccessException(Ljava/lang/String;)V
|
|
|
|
const/4 v1, 0x0
|
|
|
|
throw v1
|
|
|
|
:cond_5
|
|
:goto_2
|
|
invoke-virtual/range {p0 .. p0}, Lcom/discord/app/AppDialog;->dismiss()V
|
|
|
|
return-void
|
|
.end method
|