372 lines
11 KiB
Smali
372 lines
11 KiB
Smali
.class public final Lcom/discord/widgets/chat/input/emoji/WidgetEmojiPickerSheet;
|
|
.super Lcom/discord/app/AppBottomSheet;
|
|
.source "WidgetEmojiPickerSheet.kt"
|
|
|
|
# interfaces
|
|
.implements Lcom/discord/widgets/chat/input/emoji/EmojiPickerListener;
|
|
|
|
|
|
# annotations
|
|
.annotation system Ldalvik/annotation/MemberClasses;
|
|
value = {
|
|
Lcom/discord/widgets/chat/input/emoji/WidgetEmojiPickerSheet$Companion;
|
|
}
|
|
.end annotation
|
|
|
|
|
|
# static fields
|
|
.field public static final ARG_EMOJI_CONTEXT_TYPE:Ljava/lang/String; = "ARG_EMOJI_CONTEXT_TYPE"
|
|
|
|
.field public static final Companion:Lcom/discord/widgets/chat/input/emoji/WidgetEmojiPickerSheet$Companion;
|
|
|
|
|
|
# instance fields
|
|
.field public container:Landroid/view/View;
|
|
|
|
.field public emojiPickerFragment:Lcom/discord/widgets/chat/input/emoji/WidgetEmojiPickerV2;
|
|
|
|
.field public emojiPickerListenerDelegate:Lcom/discord/widgets/chat/input/emoji/EmojiPickerListener;
|
|
|
|
.field public onCancel:Lkotlin/jvm/functions/Function0;
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"Lkotlin/jvm/functions/Function0<",
|
|
"Lkotlin/Unit;",
|
|
">;"
|
|
}
|
|
.end annotation
|
|
.end field
|
|
|
|
|
|
# direct methods
|
|
.method public static constructor <clinit>()V
|
|
.locals 2
|
|
|
|
new-instance v0, Lcom/discord/widgets/chat/input/emoji/WidgetEmojiPickerSheet$Companion;
|
|
|
|
const/4 v1, 0x0
|
|
|
|
invoke-direct {v0, v1}, Lcom/discord/widgets/chat/input/emoji/WidgetEmojiPickerSheet$Companion;-><init>(Lkotlin/jvm/internal/DefaultConstructorMarker;)V
|
|
|
|
sput-object v0, Lcom/discord/widgets/chat/input/emoji/WidgetEmojiPickerSheet;->Companion:Lcom/discord/widgets/chat/input/emoji/WidgetEmojiPickerSheet$Companion;
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public constructor <init>()V
|
|
.locals 0
|
|
|
|
invoke-direct {p0}, Lcom/discord/app/AppBottomSheet;-><init>()V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public static final synthetic access$getContainer$p(Lcom/discord/widgets/chat/input/emoji/WidgetEmojiPickerSheet;)Landroid/view/View;
|
|
.locals 0
|
|
|
|
iget-object p0, p0, Lcom/discord/widgets/chat/input/emoji/WidgetEmojiPickerSheet;->container:Landroid/view/View;
|
|
|
|
if-eqz p0, :cond_0
|
|
|
|
return-object p0
|
|
|
|
:cond_0
|
|
const-string p0, "container"
|
|
|
|
invoke-static {p0}, Lj0/n/c/h;->throwUninitializedPropertyAccessException(Ljava/lang/String;)V
|
|
|
|
const/4 p0, 0x0
|
|
|
|
throw p0
|
|
.end method
|
|
|
|
.method public static final synthetic access$setContainer$p(Lcom/discord/widgets/chat/input/emoji/WidgetEmojiPickerSheet;Landroid/view/View;)V
|
|
.locals 0
|
|
|
|
iput-object p1, p0, Lcom/discord/widgets/chat/input/emoji/WidgetEmojiPickerSheet;->container:Landroid/view/View;
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public static synthetic setOnCancel$default(Lcom/discord/widgets/chat/input/emoji/WidgetEmojiPickerSheet;Lkotlin/jvm/functions/Function0;ILjava/lang/Object;)V
|
|
.locals 0
|
|
|
|
and-int/lit8 p2, p2, 0x1
|
|
|
|
if-eqz p2, :cond_0
|
|
|
|
const/4 p1, 0x0
|
|
|
|
:cond_0
|
|
invoke-virtual {p0, p1}, Lcom/discord/widgets/chat/input/emoji/WidgetEmojiPickerSheet;->setOnCancel(Lkotlin/jvm/functions/Function0;)V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
|
|
# virtual methods
|
|
.method public getContentViewResId()I
|
|
.locals 1
|
|
|
|
const v0, 0x7f0d01af
|
|
|
|
return v0
|
|
.end method
|
|
|
|
.method public onCancel(Landroid/content/DialogInterface;)V
|
|
.locals 1
|
|
|
|
const/4 v0, 0x0
|
|
|
|
if-eqz p1, :cond_2
|
|
|
|
invoke-super {p0, p1}, Landroidx/fragment/app/DialogFragment;->onCancel(Landroid/content/DialogInterface;)V
|
|
|
|
iget-object p1, p0, Lcom/discord/widgets/chat/input/emoji/WidgetEmojiPickerSheet;->emojiPickerFragment:Lcom/discord/widgets/chat/input/emoji/WidgetEmojiPickerV2;
|
|
|
|
if-eqz p1, :cond_1
|
|
|
|
invoke-virtual {p1}, Lcom/discord/widgets/chat/input/emoji/WidgetEmojiPickerV2;->clearSearchInput()V
|
|
|
|
iget-object p1, p0, Lcom/discord/widgets/chat/input/emoji/WidgetEmojiPickerSheet;->onCancel:Lkotlin/jvm/functions/Function0;
|
|
|
|
if-eqz p1, :cond_0
|
|
|
|
invoke-interface {p1}, Lkotlin/jvm/functions/Function0;->invoke()Ljava/lang/Object;
|
|
|
|
move-result-object p1
|
|
|
|
check-cast p1, Lkotlin/Unit;
|
|
|
|
:cond_0
|
|
return-void
|
|
|
|
:cond_1
|
|
const-string p1, "emojiPickerFragment"
|
|
|
|
invoke-static {p1}, Lj0/n/c/h;->throwUninitializedPropertyAccessException(Ljava/lang/String;)V
|
|
|
|
throw v0
|
|
|
|
:cond_2
|
|
const-string p1, "dialog"
|
|
|
|
invoke-static {p1}, Lj0/n/c/h;->c(Ljava/lang/String;)V
|
|
|
|
throw v0
|
|
.end method
|
|
|
|
.method public onCreateDialog(Landroid/os/Bundle;)Landroid/app/Dialog;
|
|
.locals 2
|
|
|
|
invoke-super {p0, p1}, Lcom/discord/app/AppBottomSheet;->onCreateDialog(Landroid/os/Bundle;)Landroid/app/Dialog;
|
|
|
|
move-result-object p1
|
|
|
|
invoke-virtual {p1}, Landroid/app/Dialog;->getWindow()Landroid/view/Window;
|
|
|
|
move-result-object v0
|
|
|
|
if-eqz v0, :cond_0
|
|
|
|
const/16 v1, 0x10
|
|
|
|
invoke-virtual {v0, v1}, Landroid/view/Window;->setSoftInputMode(I)V
|
|
|
|
:cond_0
|
|
new-instance v0, Lcom/discord/widgets/chat/input/emoji/WidgetEmojiPickerSheet$onCreateDialog$1;
|
|
|
|
invoke-direct {v0, p1}, Lcom/discord/widgets/chat/input/emoji/WidgetEmojiPickerSheet$onCreateDialog$1;-><init>(Landroid/app/Dialog;)V
|
|
|
|
invoke-virtual {p1, v0}, Landroid/app/Dialog;->setOnShowListener(Landroid/content/DialogInterface$OnShowListener;)V
|
|
|
|
return-object p1
|
|
.end method
|
|
|
|
.method public onEmojiPicked(Lcom/discord/models/domain/emoji/Emoji;)V
|
|
.locals 1
|
|
|
|
if-eqz p1, :cond_1
|
|
|
|
iget-object v0, p0, Lcom/discord/widgets/chat/input/emoji/WidgetEmojiPickerSheet;->emojiPickerListenerDelegate:Lcom/discord/widgets/chat/input/emoji/EmojiPickerListener;
|
|
|
|
if-eqz v0, :cond_0
|
|
|
|
invoke-interface {v0, p1}, Lcom/discord/widgets/chat/input/emoji/EmojiPickerListener;->onEmojiPicked(Lcom/discord/models/domain/emoji/Emoji;)V
|
|
|
|
:cond_0
|
|
invoke-virtual {p0}, Lcom/discord/app/AppBottomSheet;->dismiss()V
|
|
|
|
return-void
|
|
|
|
:cond_1
|
|
const-string p1, "emoji"
|
|
|
|
invoke-static {p1}, Lj0/n/c/h;->c(Ljava/lang/String;)V
|
|
|
|
const/4 p1, 0x0
|
|
|
|
throw p1
|
|
.end method
|
|
|
|
.method public onViewCreated(Landroid/view/View;Landroid/os/Bundle;)V
|
|
.locals 5
|
|
|
|
const/4 v0, 0x0
|
|
|
|
if-eqz p1, :cond_6
|
|
|
|
invoke-super {p0, p1, p2}, Lcom/discord/app/AppBottomSheet;->onViewCreated(Landroid/view/View;Landroid/os/Bundle;)V
|
|
|
|
iput-object p1, p0, Lcom/discord/widgets/chat/input/emoji/WidgetEmojiPickerSheet;->container:Landroid/view/View;
|
|
|
|
invoke-virtual {p0}, Landroidx/fragment/app/Fragment;->getArguments()Landroid/os/Bundle;
|
|
|
|
move-result-object p1
|
|
|
|
if-eqz p1, :cond_0
|
|
|
|
const-string p2, "ARG_EMOJI_CONTEXT_TYPE"
|
|
|
|
invoke-virtual {p1, p2}, Landroid/os/Bundle;->getSerializable(Ljava/lang/String;)Ljava/io/Serializable;
|
|
|
|
move-result-object p1
|
|
|
|
goto :goto_0
|
|
|
|
:cond_0
|
|
move-object p1, v0
|
|
|
|
:goto_0
|
|
instance-of p2, p1, Lcom/discord/widgets/chat/input/emoji/EmojiContextType;
|
|
|
|
if-nez p2, :cond_1
|
|
|
|
move-object p1, v0
|
|
|
|
:cond_1
|
|
check-cast p1, Lcom/discord/widgets/chat/input/emoji/EmojiContextType;
|
|
|
|
new-instance p2, Lcom/discord/widgets/chat/input/emoji/WidgetEmojiPickerV2;
|
|
|
|
invoke-direct {p2}, Lcom/discord/widgets/chat/input/emoji/WidgetEmojiPickerV2;-><init>()V
|
|
|
|
iput-object p2, p0, Lcom/discord/widgets/chat/input/emoji/WidgetEmojiPickerSheet;->emojiPickerFragment:Lcom/discord/widgets/chat/input/emoji/WidgetEmojiPickerV2;
|
|
|
|
const-string v1, "emojiPickerFragment"
|
|
|
|
if-eqz p2, :cond_5
|
|
|
|
new-instance v2, Landroid/os/Bundle;
|
|
|
|
invoke-direct {v2}, Landroid/os/Bundle;-><init>()V
|
|
|
|
sget-object v3, Lcom/discord/widgets/chat/input/emoji/EmojiPickerMode;->BOTTOM_SHEET:Lcom/discord/widgets/chat/input/emoji/EmojiPickerMode;
|
|
|
|
const-string v4, "MODE"
|
|
|
|
invoke-virtual {v2, v4, v3}, Landroid/os/Bundle;->putSerializable(Ljava/lang/String;Ljava/io/Serializable;)V
|
|
|
|
const-string v3, "EMOJI_CONTEXT_TYPE"
|
|
|
|
invoke-virtual {v2, v3, p1}, Landroid/os/Bundle;->putSerializable(Ljava/lang/String;Ljava/io/Serializable;)V
|
|
|
|
invoke-virtual {p2, v2}, Landroidx/fragment/app/Fragment;->setArguments(Landroid/os/Bundle;)V
|
|
|
|
iget-object p1, p0, Lcom/discord/widgets/chat/input/emoji/WidgetEmojiPickerSheet;->emojiPickerFragment:Lcom/discord/widgets/chat/input/emoji/WidgetEmojiPickerV2;
|
|
|
|
if-eqz p1, :cond_4
|
|
|
|
invoke-virtual {p1, p0}, Lcom/discord/widgets/chat/input/emoji/WidgetEmojiPickerV2;->setListener(Lcom/discord/widgets/chat/input/emoji/EmojiPickerListener;)V
|
|
|
|
invoke-virtual {p0}, Landroidx/fragment/app/Fragment;->getChildFragmentManager()Landroidx/fragment/app/FragmentManager;
|
|
|
|
move-result-object p1
|
|
|
|
invoke-virtual {p1}, Landroidx/fragment/app/FragmentManager;->beginTransaction()Landroidx/fragment/app/FragmentTransaction;
|
|
|
|
move-result-object p1
|
|
|
|
const p2, 0x7f0a031e
|
|
|
|
iget-object v2, p0, Lcom/discord/widgets/chat/input/emoji/WidgetEmojiPickerSheet;->emojiPickerFragment:Lcom/discord/widgets/chat/input/emoji/WidgetEmojiPickerV2;
|
|
|
|
if-eqz v2, :cond_3
|
|
|
|
if-eqz v2, :cond_2
|
|
|
|
invoke-virtual {v2}, Ljava/lang/Object;->getClass()Ljava/lang/Class;
|
|
|
|
move-result-object v0
|
|
|
|
invoke-virtual {v0}, Ljava/lang/Class;->getSimpleName()Ljava/lang/String;
|
|
|
|
move-result-object v0
|
|
|
|
invoke-virtual {p1, p2, v2, v0}, Landroidx/fragment/app/FragmentTransaction;->replace(ILandroidx/fragment/app/Fragment;Ljava/lang/String;)Landroidx/fragment/app/FragmentTransaction;
|
|
|
|
move-result-object p1
|
|
|
|
new-instance p2, Lcom/discord/widgets/chat/input/emoji/WidgetEmojiPickerSheet$onViewCreated$2;
|
|
|
|
invoke-direct {p2, p0}, Lcom/discord/widgets/chat/input/emoji/WidgetEmojiPickerSheet$onViewCreated$2;-><init>(Lcom/discord/widgets/chat/input/emoji/WidgetEmojiPickerSheet;)V
|
|
|
|
invoke-virtual {p1, p2}, Landroidx/fragment/app/FragmentTransaction;->runOnCommit(Ljava/lang/Runnable;)Landroidx/fragment/app/FragmentTransaction;
|
|
|
|
move-result-object p1
|
|
|
|
invoke-virtual {p1}, Landroidx/fragment/app/FragmentTransaction;->commit()I
|
|
|
|
return-void
|
|
|
|
:cond_2
|
|
invoke-static {v1}, Lj0/n/c/h;->throwUninitializedPropertyAccessException(Ljava/lang/String;)V
|
|
|
|
throw v0
|
|
|
|
:cond_3
|
|
invoke-static {v1}, Lj0/n/c/h;->throwUninitializedPropertyAccessException(Ljava/lang/String;)V
|
|
|
|
throw v0
|
|
|
|
:cond_4
|
|
invoke-static {v1}, Lj0/n/c/h;->throwUninitializedPropertyAccessException(Ljava/lang/String;)V
|
|
|
|
throw v0
|
|
|
|
:cond_5
|
|
invoke-static {v1}, Lj0/n/c/h;->throwUninitializedPropertyAccessException(Ljava/lang/String;)V
|
|
|
|
throw v0
|
|
|
|
:cond_6
|
|
const-string p1, "view"
|
|
|
|
invoke-static {p1}, Lj0/n/c/h;->c(Ljava/lang/String;)V
|
|
|
|
throw v0
|
|
.end method
|
|
|
|
.method public final setEmojiPickerListener(Lcom/discord/widgets/chat/input/emoji/EmojiPickerListener;)V
|
|
.locals 0
|
|
|
|
iput-object p1, p0, Lcom/discord/widgets/chat/input/emoji/WidgetEmojiPickerSheet;->emojiPickerListenerDelegate:Lcom/discord/widgets/chat/input/emoji/EmojiPickerListener;
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public final setOnCancel(Lkotlin/jvm/functions/Function0;)V
|
|
.locals 0
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"(",
|
|
"Lkotlin/jvm/functions/Function0<",
|
|
"Lkotlin/Unit;",
|
|
">;)V"
|
|
}
|
|
.end annotation
|
|
|
|
iput-object p1, p0, Lcom/discord/widgets/chat/input/emoji/WidgetEmojiPickerSheet;->onCancel:Lkotlin/jvm/functions/Function0;
|
|
|
|
return-void
|
|
.end method
|