458 lines
13 KiB
Smali
458 lines
13 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 6
|
|
|
|
const/4 v0, 0x4
|
|
|
|
new-array v0, v0, [Lkotlin/reflect/KProperty;
|
|
|
|
new-instance v1, Ly/u/b/u;
|
|
|
|
const-class v2, Lcom/discord/dialogs/ImageUploadDialog;
|
|
|
|
invoke-static {v2}, Ly/u/b/w;->getOrCreateKotlinClass(Ljava/lang/Class;)Ly/y/b;
|
|
|
|
move-result-object v2
|
|
|
|
const-string v3, "upload"
|
|
|
|
const-string v4, "getUpload()Landroid/view/View;"
|
|
|
|
invoke-direct {v1, v2, v3, v4}, Ly/u/b/u;-><init>(Lkotlin/reflect/KDeclarationContainer;Ljava/lang/String;Ljava/lang/String;)V
|
|
|
|
sget-object v2, Ly/u/b/w;->a:Ly/u/b/x;
|
|
|
|
invoke-virtual {v2, v1}, Ly/u/b/x;->property1(Ly/u/b/t;)Ly/y/d;
|
|
|
|
const/4 v2, 0x0
|
|
|
|
aput-object v1, v0, v2
|
|
|
|
const/4 v1, 0x1
|
|
|
|
new-instance v2, Ly/u/b/u;
|
|
|
|
const-class v3, Lcom/discord/dialogs/ImageUploadDialog;
|
|
|
|
invoke-static {v3}, Ly/u/b/w;->getOrCreateKotlinClass(Ljava/lang/Class;)Ly/y/b;
|
|
|
|
move-result-object v3
|
|
|
|
const-string v4, "crop"
|
|
|
|
const-string v5, "getCrop()Landroid/view/View;"
|
|
|
|
invoke-direct {v2, v3, v4, v5}, Ly/u/b/u;-><init>(Lkotlin/reflect/KDeclarationContainer;Ljava/lang/String;Ljava/lang/String;)V
|
|
|
|
sget-object v3, Ly/u/b/w;->a:Ly/u/b/x;
|
|
|
|
invoke-virtual {v3, v2}, Ly/u/b/x;->property1(Ly/u/b/t;)Ly/y/d;
|
|
|
|
aput-object v2, v0, v1
|
|
|
|
const/4 v1, 0x2
|
|
|
|
new-instance v2, Ly/u/b/u;
|
|
|
|
const-class v3, Lcom/discord/dialogs/ImageUploadDialog;
|
|
|
|
invoke-static {v3}, Ly/u/b/w;->getOrCreateKotlinClass(Ljava/lang/Class;)Ly/y/b;
|
|
|
|
move-result-object v3
|
|
|
|
const-string v4, "cancel"
|
|
|
|
const-string v5, "getCancel()Landroid/view/View;"
|
|
|
|
invoke-direct {v2, v3, v4, v5}, Ly/u/b/u;-><init>(Lkotlin/reflect/KDeclarationContainer;Ljava/lang/String;Ljava/lang/String;)V
|
|
|
|
sget-object v3, Ly/u/b/w;->a:Ly/u/b/x;
|
|
|
|
invoke-virtual {v3, v2}, Ly/u/b/x;->property1(Ly/u/b/t;)Ly/y/d;
|
|
|
|
aput-object v2, v0, v1
|
|
|
|
const/4 v1, 0x3
|
|
|
|
new-instance v2, Ly/u/b/u;
|
|
|
|
const-class v3, Lcom/discord/dialogs/ImageUploadDialog;
|
|
|
|
invoke-static {v3}, Ly/u/b/w;->getOrCreateKotlinClass(Ljava/lang/Class;)Ly/y/b;
|
|
|
|
move-result-object v3
|
|
|
|
const-string v4, "image"
|
|
|
|
const-string v5, "getImage()Lcom/facebook/drawee/view/SimpleDraweeView;"
|
|
|
|
invoke-direct {v2, v3, v4, v5}, Ly/u/b/u;-><init>(Lkotlin/reflect/KDeclarationContainer;Ljava/lang/String;Ljava/lang/String;)V
|
|
|
|
sget-object v3, Ly/u/b/w;->a:Ly/u/b/x;
|
|
|
|
invoke-virtual {v3, v2}, Ly/u/b/x;->property1(Ly/u/b/t;)Ly/y/d;
|
|
|
|
aput-object v2, v0, v1
|
|
|
|
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, 0x7f0a057e
|
|
|
|
invoke-static {p0, v0}, Ly/z/l;->a(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, 0x7f0a0579
|
|
|
|
invoke-static {p0, v0}, Ly/z/l;->a(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, 0x7f0a0578
|
|
|
|
invoke-static {p0, v0}, Ly/z/l;->a(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, 0x7f0a057c
|
|
|
|
invoke-static {p0, v0}, Ly/z/l;->a(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 c()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, 0x7f0d0048
|
|
|
|
return v0
|
|
.end method
|
|
|
|
.method public onViewBound(Landroid/view/View;)V
|
|
.locals 17
|
|
|
|
move-object/from16 v0, p0
|
|
|
|
move-object/from16 v1, p1
|
|
|
|
const/4 v2, 0x0
|
|
|
|
if-eqz v1, :cond_6
|
|
|
|
invoke-super/range {p0 .. p1}, Lcom/discord/app/AppDialog;->onViewBound(Landroid/view/View;)V
|
|
|
|
const/4 v3, 0x1
|
|
|
|
invoke-virtual {v0, v3}, Landroidx/fragment/app/Fragment;->setRetainInstance(Z)V
|
|
|
|
iget-object v4, v0, Lcom/discord/dialogs/ImageUploadDialog;->l:Lcom/discord/dialogs/ImageUploadDialog$PreviewType;
|
|
|
|
iget-object v5, v0, Lcom/discord/dialogs/ImageUploadDialog;->j:Ljava/lang/String;
|
|
|
|
if-eqz v4, :cond_5
|
|
|
|
if-nez v5, :cond_0
|
|
|
|
goto/16 :goto_2
|
|
|
|
:cond_0
|
|
const-string v6, "image/gif"
|
|
|
|
invoke-static {v5, v6}, Ly/u/b/j;->areEqual(Ljava/lang/Object;Ljava/lang/Object;)Z
|
|
|
|
move-result v6
|
|
|
|
iget-object v7, v0, Lcom/discord/dialogs/ImageUploadDialog;->d:Lkotlin/properties/ReadOnlyProperty;
|
|
|
|
sget-object v8, Lcom/discord/dialogs/ImageUploadDialog;->m:[Lkotlin/reflect/KProperty;
|
|
|
|
const/4 v9, 0x0
|
|
|
|
aget-object v8, v8, v9
|
|
|
|
invoke-interface {v7, v0, v8}, Lkotlin/properties/ReadOnlyProperty;->getValue(Ljava/lang/Object;Lkotlin/reflect/KProperty;)Ljava/lang/Object;
|
|
|
|
move-result-object v7
|
|
|
|
check-cast v7, Landroid/view/View;
|
|
|
|
new-instance v8, Lcom/discord/dialogs/ImageUploadDialog$c;
|
|
|
|
invoke-direct {v8, v0, v5}, Lcom/discord/dialogs/ImageUploadDialog$c;-><init>(Lcom/discord/dialogs/ImageUploadDialog;Ljava/lang/String;)V
|
|
|
|
invoke-virtual {v7, v8}, Landroid/view/View;->setOnClickListener(Landroid/view/View$OnClickListener;)V
|
|
|
|
iget-object v5, v0, Lcom/discord/dialogs/ImageUploadDialog;->e:Lkotlin/properties/ReadOnlyProperty;
|
|
|
|
sget-object v7, Lcom/discord/dialogs/ImageUploadDialog;->m:[Lkotlin/reflect/KProperty;
|
|
|
|
aget-object v7, v7, v3
|
|
|
|
invoke-interface {v5, v0, v7}, Lkotlin/properties/ReadOnlyProperty;->getValue(Ljava/lang/Object;Lkotlin/reflect/KProperty;)Ljava/lang/Object;
|
|
|
|
move-result-object v5
|
|
|
|
check-cast v5, Landroid/view/View;
|
|
|
|
if-eqz v6, :cond_1
|
|
|
|
const/4 v7, 0x4
|
|
|
|
goto :goto_0
|
|
|
|
:cond_1
|
|
const/4 v7, 0x0
|
|
|
|
:goto_0
|
|
invoke-virtual {v5, v7}, Landroid/view/View;->setVisibility(I)V
|
|
|
|
if-nez v6, :cond_2
|
|
|
|
iget-object v5, v0, Lcom/discord/dialogs/ImageUploadDialog;->e:Lkotlin/properties/ReadOnlyProperty;
|
|
|
|
sget-object v6, Lcom/discord/dialogs/ImageUploadDialog;->m:[Lkotlin/reflect/KProperty;
|
|
|
|
aget-object v6, v6, v3
|
|
|
|
invoke-interface {v5, v0, v6}, Lkotlin/properties/ReadOnlyProperty;->getValue(Ljava/lang/Object;Lkotlin/reflect/KProperty;)Ljava/lang/Object;
|
|
|
|
move-result-object v5
|
|
|
|
check-cast v5, Landroid/view/View;
|
|
|
|
new-instance v6, Lcom/discord/dialogs/ImageUploadDialog$a;
|
|
|
|
invoke-direct {v6, v9, v0}, Lcom/discord/dialogs/ImageUploadDialog$a;-><init>(ILjava/lang/Object;)V
|
|
|
|
invoke-virtual {v5, v6}, Landroid/view/View;->setOnClickListener(Landroid/view/View$OnClickListener;)V
|
|
|
|
:cond_2
|
|
iget-object v5, v0, Lcom/discord/dialogs/ImageUploadDialog;->f:Lkotlin/properties/ReadOnlyProperty;
|
|
|
|
sget-object v6, Lcom/discord/dialogs/ImageUploadDialog;->m:[Lkotlin/reflect/KProperty;
|
|
|
|
const/4 v7, 0x2
|
|
|
|
aget-object v6, v6, v7
|
|
|
|
invoke-interface {v5, v0, v6}, Lkotlin/properties/ReadOnlyProperty;->getValue(Ljava/lang/Object;Lkotlin/reflect/KProperty;)Ljava/lang/Object;
|
|
|
|
move-result-object v5
|
|
|
|
check-cast v5, Landroid/view/View;
|
|
|
|
new-instance v6, Lcom/discord/dialogs/ImageUploadDialog$a;
|
|
|
|
invoke-direct {v6, v3, v0}, Lcom/discord/dialogs/ImageUploadDialog$a;-><init>(ILjava/lang/Object;)V
|
|
|
|
invoke-virtual {v5, v6}, 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 v5
|
|
|
|
invoke-virtual {v4}, Lcom/discord/dialogs/ImageUploadDialog$PreviewType;->getPreviewSizeDimenId()I
|
|
|
|
move-result v6
|
|
|
|
invoke-virtual {v5, v6}, Landroid/content/res/Resources;->getDimensionPixelSize(I)I
|
|
|
|
move-result v11
|
|
|
|
invoke-virtual/range {p0 .. p0}, Lcom/discord/dialogs/ImageUploadDialog;->c()Lcom/facebook/drawee/view/SimpleDraweeView;
|
|
|
|
move-result-object v5
|
|
|
|
invoke-virtual {v5}, Landroid/widget/ImageView;->getLayoutParams()Landroid/view/ViewGroup$LayoutParams;
|
|
|
|
move-result-object v5
|
|
|
|
iput v11, v5, Landroid/view/ViewGroup$LayoutParams;->height:I
|
|
|
|
iput v11, v5, Landroid/view/ViewGroup$LayoutParams;->width:I
|
|
|
|
invoke-virtual/range {p0 .. p0}, Lcom/discord/dialogs/ImageUploadDialog;->c()Lcom/facebook/drawee/view/SimpleDraweeView;
|
|
|
|
move-result-object v6
|
|
|
|
invoke-virtual {v6, v5}, Landroid/widget/ImageView;->setLayoutParams(Landroid/view/ViewGroup$LayoutParams;)V
|
|
|
|
sget-object v5, Le/a/a/l;->a:[I
|
|
|
|
invoke-virtual {v4}, Ljava/lang/Enum;->ordinal()I
|
|
|
|
move-result v4
|
|
|
|
aget v4, v5, v4
|
|
|
|
if-eq v4, v3, :cond_3
|
|
|
|
if-eq v4, v7, :cond_3
|
|
|
|
goto :goto_1
|
|
|
|
:cond_3
|
|
invoke-virtual/range {p0 .. p0}, Lcom/discord/dialogs/ImageUploadDialog;->c()Lcom/facebook/drawee/view/SimpleDraweeView;
|
|
|
|
move-result-object v4
|
|
|
|
int-to-float v5, v11
|
|
|
|
const v6, 0x7f04039f
|
|
|
|
invoke-static {v1, v6}, Lcom/discord/utilities/color/ColorCompat;->getThemedColor(Landroid/view/View;I)I
|
|
|
|
move-result v1
|
|
|
|
invoke-static {v1}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;
|
|
|
|
move-result-object v1
|
|
|
|
invoke-static {v4, v5, v3, v1}, Lcom/discord/utilities/images/MGImages;->setCornerRadius(Landroid/widget/ImageView;FZLjava/lang/Integer;)V
|
|
|
|
:goto_1
|
|
invoke-virtual/range {p0 .. p0}, Lcom/discord/dialogs/ImageUploadDialog;->c()Lcom/facebook/drawee/view/SimpleDraweeView;
|
|
|
|
move-result-object v8
|
|
|
|
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 v9
|
|
|
|
const/4 v12, 0x0
|
|
|
|
const/4 v13, 0x0
|
|
|
|
const/4 v14, 0x0
|
|
|
|
const/16 v15, 0x70
|
|
|
|
const/16 v16, 0x0
|
|
|
|
move v10, v11
|
|
|
|
invoke-static/range {v8 .. v16}, Lcom/discord/utilities/images/MGImages;->setImage$default(Landroid/widget/ImageView;Ljava/lang/String;IIZLkotlin/jvm/functions/Function1;Lcom/discord/utilities/images/MGImages$ChangeDetector;ILjava/lang/Object;)V
|
|
|
|
return-void
|
|
|
|
:cond_4
|
|
const-string v1, "uri"
|
|
|
|
invoke-static {v1}, Ly/u/b/j;->throwUninitializedPropertyAccessException(Ljava/lang/String;)V
|
|
|
|
throw v2
|
|
|
|
:cond_5
|
|
:goto_2
|
|
invoke-virtual/range {p0 .. p0}, Lcom/discord/app/AppDialog;->dismiss()V
|
|
|
|
return-void
|
|
|
|
:cond_6
|
|
const-string v1, "view"
|
|
|
|
invoke-static {v1}, Ly/u/b/j;->a(Ljava/lang/String;)V
|
|
|
|
throw v2
|
|
.end method
|