apkfuckery/com.discord/smali/com/discord/widgets/chat/input/WidgetChatInputAttachments.smali

275 lines
12 KiB
Smali
Raw Normal View History

2020-05-17 12:40:10 +00:00
.class public final Lcom/discord/widgets/chat/input/WidgetChatInputAttachments;
.super Ljava/lang/Object;
.source "WidgetChatInputAttachments.kt"
# annotations
.annotation system Ldalvik/annotation/MemberClasses;
value = {
Lcom/discord/widgets/chat/input/WidgetChatInputAttachments$PermissionsEmptyListAdapter;,
Lcom/discord/widgets/chat/input/WidgetChatInputAttachments$DiscordFilesFragment;,
2020-07-23 01:06:17 +00:00
Lcom/discord/widgets/chat/input/WidgetChatInputAttachments$DiscordPhotosFragment;
2020-05-17 12:40:10 +00:00
}
.end annotation
# instance fields
2020-07-08 16:44:49 +00:00
.field public final flexInputFragment:Lcom/lytefast/flexinput/fragment/FlexInputFragment;
2020-05-17 12:40:10 +00:00
# direct methods
2020-08-26 17:47:03 +00:00
.method public constructor <init>(Lcom/lytefast/flexinput/fragment/FlexInputFragment;)V
2020-09-09 19:21:20 +00:00
.locals 1
2020-09-02 04:07:20 +00:00
2020-09-09 19:21:20 +00:00
const-string v0, "flexInputFragment"
invoke-static {p1, v0}, Lk0/n/c/i;->checkNotNullParameter(Ljava/lang/Object;Ljava/lang/String;)V
2020-05-17 12:40:10 +00:00
2020-08-26 17:47:03 +00:00
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
2020-05-17 12:40:10 +00:00
iput-object p1, p0, Lcom/discord/widgets/chat/input/WidgetChatInputAttachments;->flexInputFragment:Lcom/lytefast/flexinput/fragment/FlexInputFragment;
return-void
.end method
2020-08-26 17:47:03 +00:00
.method public static final synthetic access$createAndConfigureExpressionFragment(Lcom/discord/widgets/chat/input/WidgetChatInputAttachments;Landroidx/fragment/app/FragmentManager;Landroid/widget/TextView;)Landroidx/fragment/app/Fragment;
2020-07-08 16:44:49 +00:00
.locals 0
2020-05-17 12:40:10 +00:00
2020-08-26 17:47:03 +00:00
invoke-direct {p0, p1, p2}, Lcom/discord/widgets/chat/input/WidgetChatInputAttachments;->createAndConfigureExpressionFragment(Landroidx/fragment/app/FragmentManager;Landroid/widget/TextView;)Landroidx/fragment/app/Fragment;
2020-05-17 12:40:10 +00:00
2020-07-08 16:44:49 +00:00
move-result-object p0
2020-05-17 12:40:10 +00:00
2020-07-08 16:44:49 +00:00
return-object p0
.end method
2020-05-17 12:40:10 +00:00
2020-08-26 17:47:03 +00:00
.method public static final synthetic access$createPreviewAdapter(Lcom/discord/widgets/chat/input/WidgetChatInputAttachments;Landroid/content/Context;)Lcom/lytefast/flexinput/adapters/AttachmentPreviewAdapter;
2020-07-08 16:44:49 +00:00
.locals 0
2020-05-17 12:40:10 +00:00
2020-08-26 17:47:03 +00:00
invoke-direct {p0, p1}, Lcom/discord/widgets/chat/input/WidgetChatInputAttachments;->createPreviewAdapter(Landroid/content/Context;)Lcom/lytefast/flexinput/adapters/AttachmentPreviewAdapter;
2020-05-17 12:40:10 +00:00
2020-07-08 16:44:49 +00:00
move-result-object p0
2020-05-17 12:40:10 +00:00
2020-07-08 16:44:49 +00:00
return-object p0
.end method
2020-05-17 12:40:10 +00:00
2020-07-08 16:44:49 +00:00
.method public static final synthetic access$getFlexInputFragment$p(Lcom/discord/widgets/chat/input/WidgetChatInputAttachments;)Lcom/lytefast/flexinput/fragment/FlexInputFragment;
.locals 0
2020-05-17 12:40:10 +00:00
2020-07-08 16:44:49 +00:00
iget-object p0, p0, Lcom/discord/widgets/chat/input/WidgetChatInputAttachments;->flexInputFragment:Lcom/lytefast/flexinput/fragment/FlexInputFragment;
2020-05-17 12:40:10 +00:00
2020-07-08 16:44:49 +00:00
return-object p0
.end method
2020-05-17 12:40:10 +00:00
2020-08-26 17:47:03 +00:00
.method public static final synthetic access$setAttachmentFromPicker(Lcom/discord/widgets/chat/input/WidgetChatInputAttachments;Landroid/content/Context;Landroidx/core/view/inputmethod/InputContentInfoCompat;)V
2020-07-08 16:44:49 +00:00
.locals 0
2020-05-17 12:40:10 +00:00
2020-08-26 17:47:03 +00:00
invoke-direct {p0, p1, p2}, Lcom/discord/widgets/chat/input/WidgetChatInputAttachments;->setAttachmentFromPicker(Landroid/content/Context;Landroidx/core/view/inputmethod/InputContentInfoCompat;)V
2020-05-17 12:40:10 +00:00
2020-07-08 16:44:49 +00:00
return-void
.end method
2020-05-17 12:40:10 +00:00
2020-08-26 17:47:03 +00:00
.method private final createAndConfigureExpressionFragment(Landroidx/fragment/app/FragmentManager;Landroid/widget/TextView;)Landroidx/fragment/app/Fragment;
2020-08-20 22:29:33 +00:00
.locals 2
2020-05-17 12:40:10 +00:00
2020-07-08 16:44:49 +00:00
new-instance v0, Lcom/discord/widgets/chat/input/WidgetChatInputAttachments$createAndConfigureExpressionFragment$emojiPickerListener$1;
2020-05-17 12:40:10 +00:00
2020-07-08 16:44:49 +00:00
invoke-direct {v0, p0}, Lcom/discord/widgets/chat/input/WidgetChatInputAttachments$createAndConfigureExpressionFragment$emojiPickerListener$1;-><init>(Lcom/discord/widgets/chat/input/WidgetChatInputAttachments;)V
2020-05-17 12:40:10 +00:00
2020-07-08 16:44:49 +00:00
new-instance v1, Lcom/discord/widgets/chat/input/WidgetChatInputAttachments$createAndConfigureExpressionFragment$onBackspacePressedListener$1;
2020-05-17 12:40:10 +00:00
2020-08-26 17:47:03 +00:00
invoke-direct {v1, p2}, Lcom/discord/widgets/chat/input/WidgetChatInputAttachments$createAndConfigureExpressionFragment$onBackspacePressedListener$1;-><init>(Landroid/widget/TextView;)V
2020-05-17 12:40:10 +00:00
2020-09-09 19:21:20 +00:00
const p2, 0x7f0a03de
2020-08-20 19:28:48 +00:00
2020-08-20 22:29:33 +00:00
invoke-virtual {p1, p2}, Landroidx/fragment/app/FragmentManager;->findFragmentById(I)Landroidx/fragment/app/Fragment;
2020-05-17 12:40:10 +00:00
2020-07-08 16:44:49 +00:00
move-result-object p1
2020-05-17 12:40:10 +00:00
2020-07-08 16:44:49 +00:00
instance-of p2, p1, Lcom/discord/widgets/chat/input/expression/WidgetExpressionTray;
2020-05-17 12:40:10 +00:00
2020-07-08 16:44:49 +00:00
if-nez p2, :cond_0
2020-05-17 12:40:10 +00:00
2020-08-20 22:29:33 +00:00
const/4 p1, 0x0
2020-05-17 12:40:10 +00:00
2020-07-08 16:44:49 +00:00
:cond_0
2020-08-20 22:29:33 +00:00
check-cast p1, Lcom/discord/widgets/chat/input/expression/WidgetExpressionTray;
2020-05-17 12:40:10 +00:00
2020-08-20 22:29:33 +00:00
if-eqz p1, :cond_1
2020-05-17 12:40:10 +00:00
2020-08-20 22:29:33 +00:00
goto :goto_0
2020-05-17 12:40:10 +00:00
2020-07-08 16:44:49 +00:00
:cond_1
2020-08-20 22:29:33 +00:00
new-instance p1, Lcom/discord/widgets/chat/input/expression/WidgetExpressionTray;
2020-08-20 19:28:48 +00:00
2020-08-20 22:29:33 +00:00
invoke-direct {p1}, Lcom/discord/widgets/chat/input/expression/WidgetExpressionTray;-><init>()V
2020-08-20 19:28:48 +00:00
2020-08-20 22:29:33 +00:00
:goto_0
invoke-virtual {p1, v0}, Lcom/discord/widgets/chat/input/expression/WidgetExpressionTray;->setEmojiPickerListener(Lcom/discord/widgets/chat/input/emoji/EmojiPickerListener;)V
2020-05-17 12:40:10 +00:00
2020-08-20 22:29:33 +00:00
invoke-virtual {p1, v1}, Lcom/discord/widgets/chat/input/expression/WidgetExpressionTray;->setOnBackspacePressedListener(Lcom/discord/widgets/chat/input/emoji/OnBackspacePressedListener;)V
2020-05-17 12:40:10 +00:00
2020-08-20 22:29:33 +00:00
new-instance p2, Lcom/discord/widgets/chat/input/WidgetChatInputAttachments$createAndConfigureExpressionFragment$1;
2020-05-17 12:40:10 +00:00
2020-08-20 22:29:33 +00:00
invoke-direct {p2, p0}, Lcom/discord/widgets/chat/input/WidgetChatInputAttachments$createAndConfigureExpressionFragment$1;-><init>(Lcom/discord/widgets/chat/input/WidgetChatInputAttachments;)V
2020-05-17 12:40:10 +00:00
2020-08-20 22:29:33 +00:00
invoke-virtual {p1, p2}, Lcom/discord/widgets/chat/input/expression/WidgetExpressionTray;->setOnEmojiSearchOpenedListener(Lkotlin/jvm/functions/Function0;)V
2020-05-17 12:40:10 +00:00
2020-08-20 22:29:33 +00:00
return-object p1
2020-07-08 16:44:49 +00:00
.end method
2020-05-17 12:40:10 +00:00
2020-08-26 17:47:03 +00:00
.method private final createPreviewAdapter(Landroid/content/Context;)Lcom/lytefast/flexinput/adapters/AttachmentPreviewAdapter;
2020-07-08 16:44:49 +00:00
.locals 2
.annotation system Ldalvik/annotation/Signature;
value = {
"<T:",
"Lcom/lytefast/flexinput/model/Attachment<",
"+",
"Ljava/lang/Object;",
2020-08-26 17:47:03 +00:00
">;>(",
"Landroid/content/Context;",
")",
2020-07-08 16:44:49 +00:00
"Lcom/lytefast/flexinput/adapters/AttachmentPreviewAdapter<",
"TT;>;"
}
.end annotation
new-instance v0, Lcom/lytefast/flexinput/adapters/AttachmentPreviewAdapter;
2020-05-17 12:40:10 +00:00
2020-07-08 16:44:49 +00:00
new-instance v1, Lcom/discord/widgets/chat/input/WidgetChatInputAttachments$createPreviewAdapter$1;
2020-05-17 12:40:10 +00:00
2020-08-26 17:47:03 +00:00
invoke-direct {v1, p0, p1}, Lcom/discord/widgets/chat/input/WidgetChatInputAttachments$createPreviewAdapter$1;-><init>(Lcom/discord/widgets/chat/input/WidgetChatInputAttachments;Landroid/content/Context;)V
2020-05-17 12:40:10 +00:00
2020-07-08 16:44:49 +00:00
invoke-direct {v0, v1}, Lcom/lytefast/flexinput/adapters/AttachmentPreviewAdapter;-><init>(Lkotlin/jvm/functions/Function1;)V
2020-05-17 12:40:10 +00:00
2020-07-08 16:44:49 +00:00
return-object v0
.end method
2020-08-26 17:47:03 +00:00
.method private final setAttachmentFromPicker(Landroid/content/Context;Landroidx/core/view/inputmethod/InputContentInfoCompat;)V
.locals 3
2020-05-17 12:40:10 +00:00
2020-08-26 17:47:03 +00:00
invoke-virtual {p1}, Landroid/content/Context;->getContentResolver()Landroid/content/ContentResolver;
2020-05-17 12:40:10 +00:00
2020-07-08 16:44:49 +00:00
move-result-object v0
2020-05-17 12:40:10 +00:00
2020-08-26 17:47:03 +00:00
if-eqz v0, :cond_0
2020-05-17 12:40:10 +00:00
2020-08-26 17:47:03 +00:00
const v1, 0x7f12024c
2020-05-17 12:40:10 +00:00
2020-08-26 17:47:03 +00:00
invoke-virtual {p1, v1}, Landroid/content/Context;->getString(I)Ljava/lang/String;
2020-05-17 12:40:10 +00:00
2020-08-26 17:47:03 +00:00
move-result-object p1
2020-05-17 12:40:10 +00:00
2020-08-26 17:47:03 +00:00
const-string v1, "context.getString(R.stri\u2026achment_filename_unknown)"
2020-05-17 12:40:10 +00:00
2020-09-09 19:21:20 +00:00
invoke-static {p1, v1}, Lk0/n/c/i;->checkNotNullExpressionValue(Ljava/lang/Object;Ljava/lang/String;)V
2020-05-17 12:40:10 +00:00
2020-08-26 17:47:03 +00:00
sget-object v1, Lcom/lytefast/flexinput/model/Attachment;->Companion:Lcom/lytefast/flexinput/model/Attachment$Companion;
2020-05-17 12:40:10 +00:00
2020-08-26 17:47:03 +00:00
const/4 v2, 0x1
2020-05-17 12:40:10 +00:00
2020-08-26 17:47:03 +00:00
invoke-virtual {v1, p2, v0, v2, p1}, Lcom/lytefast/flexinput/model/Attachment$Companion;->b(Landroidx/core/view/inputmethod/InputContentInfoCompat;Landroid/content/ContentResolver;ZLjava/lang/String;)Lcom/lytefast/flexinput/model/Attachment;
2020-05-17 12:40:10 +00:00
2020-07-08 16:44:49 +00:00
move-result-object p1
2020-05-17 12:40:10 +00:00
2020-08-26 17:47:03 +00:00
new-instance p2, Lcom/discord/widgets/chat/input/SourcedAttachment;
2020-05-17 12:40:10 +00:00
2020-08-26 17:47:03 +00:00
const-string v0, "keyboard"
2020-05-17 12:40:10 +00:00
2020-08-26 17:47:03 +00:00
invoke-direct {p2, p1, v0}, Lcom/discord/widgets/chat/input/SourcedAttachment;-><init>(Lcom/lytefast/flexinput/model/Attachment;Ljava/lang/String;)V
2020-07-08 16:44:49 +00:00
iget-object p1, p0, Lcom/discord/widgets/chat/input/WidgetChatInputAttachments;->flexInputFragment:Lcom/lytefast/flexinput/fragment/FlexInputFragment;
2020-05-17 12:40:10 +00:00
2020-08-26 17:47:03 +00:00
invoke-virtual {p1, p2}, Lcom/lytefast/flexinput/fragment/FlexInputFragment;->e(Lcom/lytefast/flexinput/model/Attachment;)V
2020-05-17 12:40:10 +00:00
2020-08-26 17:47:03 +00:00
:cond_0
2020-07-08 16:44:49 +00:00
return-void
.end method
# virtual methods
2020-07-14 22:43:59 +00:00
.method public final addExternalAttachment(Lcom/lytefast/flexinput/model/Attachment;)V
.locals 2
.annotation system Ldalvik/annotation/Signature;
value = {
"(",
"Lcom/lytefast/flexinput/model/Attachment<",
"+",
"Ljava/lang/Object;",
">;)V"
}
.end annotation
2020-09-09 19:21:20 +00:00
const-string v0, "attachment"
invoke-static {p1, v0}, Lk0/n/c/i;->checkNotNullParameter(Ljava/lang/Object;Ljava/lang/String;)V
2020-07-14 22:43:59 +00:00
iget-object v0, p0, Lcom/discord/widgets/chat/input/WidgetChatInputAttachments;->flexInputFragment:Lcom/lytefast/flexinput/fragment/FlexInputFragment;
new-instance v1, Lcom/discord/widgets/chat/input/WidgetChatInputAttachments$addExternalAttachment$1;
invoke-direct {v1, p0, p1}, Lcom/discord/widgets/chat/input/WidgetChatInputAttachments$addExternalAttachment$1;-><init>(Lcom/discord/widgets/chat/input/WidgetChatInputAttachments;Lcom/lytefast/flexinput/model/Attachment;)V
2020-08-26 17:47:03 +00:00
invoke-virtual {v0, v1}, Lcom/lytefast/flexinput/fragment/FlexInputFragment;->n(Lkotlin/jvm/functions/Function0;)V
2020-07-14 22:43:59 +00:00
return-void
.end method
2020-08-26 17:47:03 +00:00
.method public final configureFlexInputFragment(Lcom/discord/app/AppFragment;)V
2020-07-08 16:44:49 +00:00
.locals 2
2020-09-09 19:21:20 +00:00
const-string v0, "fragment"
invoke-static {p1, v0}, Lk0/n/c/i;->checkNotNullParameter(Ljava/lang/Object;Ljava/lang/String;)V
2020-07-08 16:44:49 +00:00
iget-object v0, p0, Lcom/discord/widgets/chat/input/WidgetChatInputAttachments;->flexInputFragment:Lcom/lytefast/flexinput/fragment/FlexInputFragment;
2020-08-26 17:47:03 +00:00
new-instance v1, Lcom/discord/widgets/chat/input/WidgetChatInputAttachments$configureFlexInputFragment$1;
2020-07-08 16:44:49 +00:00
2020-08-26 17:47:03 +00:00
invoke-direct {v1, p0, p1}, Lcom/discord/widgets/chat/input/WidgetChatInputAttachments$configureFlexInputFragment$1;-><init>(Lcom/discord/widgets/chat/input/WidgetChatInputAttachments;Lcom/discord/app/AppFragment;)V
2020-07-08 16:44:49 +00:00
2020-08-26 17:47:03 +00:00
invoke-virtual {v0, v1}, Lcom/lytefast/flexinput/fragment/FlexInputFragment;->n(Lkotlin/jvm/functions/Function0;)V
2020-07-08 16:44:49 +00:00
2020-08-26 17:47:03 +00:00
new-instance v0, Lcom/discord/widgets/chat/input/WidgetChatInputAttachments$configureFlexInputFragment$2;
2020-05-17 12:40:10 +00:00
2020-08-26 17:47:03 +00:00
invoke-direct {v0, p0}, Lcom/discord/widgets/chat/input/WidgetChatInputAttachments$configureFlexInputFragment$2;-><init>(Lcom/discord/widgets/chat/input/WidgetChatInputAttachments;)V
2020-05-17 12:40:10 +00:00
2020-08-26 17:47:03 +00:00
const/4 v1, 0x1
2020-07-08 16:44:49 +00:00
2020-08-26 17:47:03 +00:00
invoke-virtual {p1, v0, v1}, Lcom/discord/app/AppFragment;->setOnBackPressed(Lrx/functions/Func0;I)V
2020-05-17 12:40:10 +00:00
return-void
2020-09-09 19:21:20 +00:00
.end method
2020-05-17 12:40:10 +00:00
2020-09-09 19:21:20 +00:00
.method public final setInputListener(Lcom/lytefast/flexinput/InputListener;)V
.locals 2
2020-05-17 12:40:10 +00:00
2020-09-09 19:21:20 +00:00
const-string v0, "inputListener"
2020-08-26 17:47:03 +00:00
2020-09-09 19:21:20 +00:00
invoke-static {p1, v0}, Lk0/n/c/i;->checkNotNullParameter(Ljava/lang/Object;Ljava/lang/String;)V
2020-05-17 12:40:10 +00:00
2020-09-09 19:21:20 +00:00
iget-object v1, p0, Lcom/discord/widgets/chat/input/WidgetChatInputAttachments;->flexInputFragment:Lcom/lytefast/flexinput/fragment/FlexInputFragment;
2020-05-17 12:40:10 +00:00
2020-09-09 19:21:20 +00:00
if-eqz v1, :cond_0
2020-05-17 12:40:10 +00:00
2020-09-09 19:21:20 +00:00
invoke-static {p1, v0}, Lk0/n/c/i;->checkNotNullParameter(Ljava/lang/Object;Ljava/lang/String;)V
2020-05-17 12:40:10 +00:00
2020-09-09 19:21:20 +00:00
iput-object p1, v1, Lcom/lytefast/flexinput/fragment/FlexInputFragment;->u:Lcom/lytefast/flexinput/InputListener;
2020-05-17 12:40:10 +00:00
return-void
2020-07-08 16:44:49 +00:00
:cond_0
2020-05-17 12:40:10 +00:00
const/4 p1, 0x0
throw p1
.end method
.method public final setViewModel(Lcom/lytefast/flexinput/viewmodel/FlexInputViewModel;)V
.locals 1
iget-object v0, p0, Lcom/discord/widgets/chat/input/WidgetChatInputAttachments;->flexInputFragment:Lcom/lytefast/flexinput/fragment/FlexInputFragment;
2020-07-08 16:44:49 +00:00
iput-object p1, v0, Lcom/lytefast/flexinput/fragment/FlexInputFragment;->y:Lcom/lytefast/flexinput/viewmodel/FlexInputViewModel;
2020-05-17 12:40:10 +00:00
return-void
.end method