1456 lines
45 KiB
Smali
1456 lines
45 KiB
Smali
.class public Lcom/discord/widgets/chat/input/emoji/WidgetChatInputEmojiPicker;
|
|
.super Lcom/discord/app/AppFragment;
|
|
.source "WidgetChatInputEmojiPicker.java"
|
|
|
|
# interfaces
|
|
.implements Lcom/discord/widgets/chat/input/emoji/OnEmojiSelectedListener;
|
|
.implements Lf/b/a/e/b;
|
|
|
|
|
|
# annotations
|
|
.annotation system Ldalvik/annotation/MemberClasses;
|
|
value = {
|
|
Lcom/discord/widgets/chat/input/emoji/WidgetChatInputEmojiPicker$Listener;,
|
|
Lcom/discord/widgets/chat/input/emoji/WidgetChatInputEmojiPicker$OnBackspacePressedListener;,
|
|
Lcom/discord/widgets/chat/input/emoji/WidgetChatInputEmojiPicker$Model;,
|
|
Lcom/discord/widgets/chat/input/emoji/WidgetChatInputEmojiPicker$Mode;,
|
|
Lcom/discord/widgets/chat/input/emoji/WidgetChatInputEmojiPicker$EmojiContextType;
|
|
}
|
|
.end annotation
|
|
|
|
|
|
# static fields
|
|
.field public static final ARG_EMOJI_CONTEXT_TYPE:Ljava/lang/String; = "EMOJI_CONTEXT_TYPE"
|
|
|
|
.field public static final ARG_MODE:Ljava/lang/String; = "MODE"
|
|
|
|
.field public static final CATEGORY_INDICES:Ljava/util/Map;
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"Ljava/util/Map<",
|
|
"Lcom/discord/models/domain/emoji/EmojiCategory;",
|
|
"Ljava/lang/Integer;",
|
|
">;"
|
|
}
|
|
.end annotation
|
|
.end field
|
|
|
|
.field public static final INTENT_EXTRA_EMOJI_CONTEXT_TYPE:Ljava/lang/String; = "INTENT_EXTRA_EMOJI_CONTEXT_TYPE"
|
|
|
|
.field public static final REQUEST_CODE_FULLSCREEN_EMOJI:I = 0x539
|
|
|
|
.field public static final RESULT_EMOJI_PAYLOAD:Ljava/lang/String; = "RESULT_EMOJI_PAYLOAD"
|
|
|
|
.field public static final RESULT_METADATA_PAYLOAD:Ljava/lang/String; = "RESULT_METADATA_PAYLOAD"
|
|
|
|
.field public static final state:Lrx/subjects/BehaviorSubject;
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"Lrx/subjects/BehaviorSubject<",
|
|
"Ljava/lang/Boolean;",
|
|
">;"
|
|
}
|
|
.end annotation
|
|
.end field
|
|
|
|
|
|
# instance fields
|
|
.field public adapter:Lcom/discord/widgets/chat/input/emoji/WidgetChatInputEmojiAdapter;
|
|
|
|
.field public backspaceButton:Landroid/widget/ImageView;
|
|
|
|
.field public emojiSearchBar:Landroid/view/View;
|
|
|
|
.field public emojisRecycler:Landroidx/recyclerview/widget/RecyclerView;
|
|
|
|
.field public listener:Lcom/discord/widgets/chat/input/emoji/WidgetChatInputEmojiPicker$Listener;
|
|
|
|
.field public metadata:Ljava/util/HashMap;
|
|
.annotation build Landroidx/annotation/Nullable;
|
|
.end annotation
|
|
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"Ljava/util/HashMap<",
|
|
"Ljava/lang/String;",
|
|
"Ljava/io/Serializable;",
|
|
">;"
|
|
}
|
|
.end annotation
|
|
.end field
|
|
|
|
.field public mode:Lcom/discord/widgets/chat/input/emoji/WidgetChatInputEmojiPicker$Mode;
|
|
|
|
.field public onBackspacePressedListener:Lcom/discord/widgets/chat/input/emoji/WidgetChatInputEmojiPicker$OnBackspacePressedListener;
|
|
|
|
.field public searchButton:Landroid/widget/ImageView;
|
|
|
|
.field public searchClearButton:Landroid/widget/ImageView;
|
|
|
|
.field public searchInput:Landroid/widget/EditText;
|
|
|
|
.field public final searchSubject:Lrx/subjects/Subject;
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"Lrx/subjects/Subject<",
|
|
"Ljava/lang/String;",
|
|
"Ljava/lang/String;",
|
|
">;"
|
|
}
|
|
.end annotation
|
|
.end field
|
|
|
|
.field public tabLayout:Lcom/google/android/material/tabs/TabLayout;
|
|
|
|
|
|
# direct methods
|
|
.method public static constructor <clinit>()V
|
|
.locals 1
|
|
|
|
const/4 v0, 0x0
|
|
|
|
invoke-static {v0}, Ljava/lang/Boolean;->valueOf(Z)Ljava/lang/Boolean;
|
|
|
|
move-result-object v0
|
|
|
|
invoke-static {v0}, Lrx/subjects/BehaviorSubject;->a(Ljava/lang/Object;)Lrx/subjects/BehaviorSubject;
|
|
|
|
move-result-object v0
|
|
|
|
sput-object v0, Lcom/discord/widgets/chat/input/emoji/WidgetChatInputEmojiPicker;->state:Lrx/subjects/BehaviorSubject;
|
|
|
|
invoke-static {}, Lcom/discord/widgets/chat/input/emoji/WidgetChatInputEmojiPicker;->initCategoryIndices()Ljava/util/Map;
|
|
|
|
move-result-object v0
|
|
|
|
sput-object v0, Lcom/discord/widgets/chat/input/emoji/WidgetChatInputEmojiPicker;->CATEGORY_INDICES:Ljava/util/Map;
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public constructor <init>()V
|
|
.locals 1
|
|
|
|
invoke-direct {p0}, Lcom/discord/app/AppFragment;-><init>()V
|
|
|
|
const-string v0, ""
|
|
|
|
invoke-static {v0}, Lrx/subjects/BehaviorSubject;->a(Ljava/lang/Object;)Lrx/subjects/BehaviorSubject;
|
|
|
|
move-result-object v0
|
|
|
|
iput-object v0, p0, Lcom/discord/widgets/chat/input/emoji/WidgetChatInputEmojiPicker;->searchSubject:Lrx/subjects/Subject;
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public static synthetic a(Lcom/discord/widgets/chat/input/emoji/WidgetChatInputEmojiPicker;Lcom/discord/widgets/chat/input/emoji/WidgetChatInputEmojiPicker$Model;)V
|
|
.locals 0
|
|
|
|
invoke-direct {p0, p1}, Lcom/discord/widgets/chat/input/emoji/WidgetChatInputEmojiPicker;->configureUI(Lcom/discord/widgets/chat/input/emoji/WidgetChatInputEmojiPicker$Model;)V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public static synthetic a(Lcom/discord/widgets/chat/input/emoji/WidgetChatInputEmojiPicker;Ljava/lang/String;)V
|
|
.locals 0
|
|
|
|
invoke-direct {p0, p1}, Lcom/discord/widgets/chat/input/emoji/WidgetChatInputEmojiPicker;->handleInputChanged(Ljava/lang/String;)V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public static synthetic access$100(Lcom/discord/widgets/chat/input/emoji/WidgetChatInputEmojiPicker;)Lcom/discord/widgets/chat/input/emoji/WidgetChatInputEmojiAdapter;
|
|
.locals 0
|
|
|
|
iget-object p0, p0, Lcom/discord/widgets/chat/input/emoji/WidgetChatInputEmojiPicker;->adapter:Lcom/discord/widgets/chat/input/emoji/WidgetChatInputEmojiAdapter;
|
|
|
|
return-object p0
|
|
.end method
|
|
|
|
.method private configureUI(Lcom/discord/widgets/chat/input/emoji/WidgetChatInputEmojiPicker$Model;)V
|
|
.locals 2
|
|
|
|
if-nez p1, :cond_0
|
|
|
|
return-void
|
|
|
|
:cond_0
|
|
iget-object v0, p0, Lcom/discord/widgets/chat/input/emoji/WidgetChatInputEmojiPicker;->adapter:Lcom/discord/widgets/chat/input/emoji/WidgetChatInputEmojiAdapter;
|
|
|
|
iget-object v1, p1, Lcom/discord/widgets/chat/input/emoji/WidgetChatInputEmojiPicker$Model;->listItems:Ljava/util/List;
|
|
|
|
invoke-virtual {v0, v1}, Lcom/discord/utilities/mg_recycler/MGRecyclerAdapterSimple;->setData(Ljava/util/List;)V
|
|
|
|
iget-object v0, p1, Lcom/discord/widgets/chat/input/emoji/WidgetChatInputEmojiPicker$Model;->categoryRanges:Ljava/util/Map;
|
|
|
|
invoke-direct {p0, v0}, Lcom/discord/widgets/chat/input/emoji/WidgetChatInputEmojiPicker;->setOnTabSelectedListener(Ljava/util/Map;)V
|
|
|
|
iget-object v0, p0, Lcom/discord/widgets/chat/input/emoji/WidgetChatInputEmojiPicker;->adapter:Lcom/discord/widgets/chat/input/emoji/WidgetChatInputEmojiAdapter;
|
|
|
|
new-instance v1, Lf/a/m/b/a/g0/p;
|
|
|
|
invoke-direct {v1, p0, p1}, Lf/a/m/b/a/g0/p;-><init>(Lcom/discord/widgets/chat/input/emoji/WidgetChatInputEmojiPicker;Lcom/discord/widgets/chat/input/emoji/WidgetChatInputEmojiPicker$Model;)V
|
|
|
|
invoke-virtual {v0, v1}, Lcom/discord/widgets/chat/input/emoji/WidgetChatInputEmojiAdapter;->setOnScrollPositionListener(Lrx/functions/Action1;)V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public static createInline(Lcom/discord/widgets/chat/input/emoji/WidgetChatInputEmojiPicker$EmojiContextType;)Lcom/discord/widgets/chat/input/emoji/WidgetChatInputEmojiPicker;
|
|
.locals 3
|
|
|
|
new-instance v0, Landroid/os/Bundle;
|
|
|
|
invoke-direct {v0}, Landroid/os/Bundle;-><init>()V
|
|
|
|
sget-object v1, Lcom/discord/widgets/chat/input/emoji/WidgetChatInputEmojiPicker$Mode;->INLINE:Lcom/discord/widgets/chat/input/emoji/WidgetChatInputEmojiPicker$Mode;
|
|
|
|
const-string v2, "MODE"
|
|
|
|
invoke-virtual {v0, v2, v1}, Landroid/os/Bundle;->putSerializable(Ljava/lang/String;Ljava/io/Serializable;)V
|
|
|
|
const-string v1, "EMOJI_CONTEXT_TYPE"
|
|
|
|
invoke-virtual {v0, v1, p0}, Landroid/os/Bundle;->putSerializable(Ljava/lang/String;Ljava/io/Serializable;)V
|
|
|
|
new-instance p0, Lcom/discord/widgets/chat/input/emoji/WidgetChatInputEmojiPicker;
|
|
|
|
invoke-direct {p0}, Lcom/discord/widgets/chat/input/emoji/WidgetChatInputEmojiPicker;-><init>()V
|
|
|
|
invoke-virtual {p0, v0}, Landroidx/fragment/app/Fragment;->setArguments(Landroid/os/Bundle;)V
|
|
|
|
return-object p0
|
|
.end method
|
|
|
|
.method public static getCategoryIconResId(Lcom/discord/models/domain/emoji/EmojiCategory;)I
|
|
.locals 0
|
|
.annotation build Landroidx/annotation/AttrRes;
|
|
.end annotation
|
|
|
|
invoke-virtual {p0}, Ljava/lang/Enum;->ordinal()I
|
|
|
|
move-result p0
|
|
|
|
if-eqz p0, :cond_0
|
|
|
|
packed-switch p0, :pswitch_data_0
|
|
|
|
const p0, 0x7f0404b2
|
|
|
|
return p0
|
|
|
|
:pswitch_0
|
|
const p0, 0x7f0404b3
|
|
|
|
return p0
|
|
|
|
:pswitch_1
|
|
const p0, 0x7f0404b9
|
|
|
|
return p0
|
|
|
|
:pswitch_2
|
|
const p0, 0x7f0404b6
|
|
|
|
return p0
|
|
|
|
:pswitch_3
|
|
const p0, 0x7f0404ba
|
|
|
|
return p0
|
|
|
|
:pswitch_4
|
|
const p0, 0x7f0404b1
|
|
|
|
return p0
|
|
|
|
:pswitch_5
|
|
const p0, 0x7f0404b4
|
|
|
|
return p0
|
|
|
|
:pswitch_6
|
|
const p0, 0x7f0404b5
|
|
|
|
return p0
|
|
|
|
:pswitch_7
|
|
const p0, 0x7f0404b7
|
|
|
|
return p0
|
|
|
|
:cond_0
|
|
const p0, 0x7f0404b8
|
|
|
|
return p0
|
|
|
|
nop
|
|
|
|
:pswitch_data_0
|
|
.packed-switch 0x2
|
|
:pswitch_7
|
|
:pswitch_6
|
|
:pswitch_5
|
|
:pswitch_4
|
|
:pswitch_3
|
|
:pswitch_2
|
|
:pswitch_1
|
|
:pswitch_0
|
|
.end packed-switch
|
|
.end method
|
|
|
|
.method private getEmojiContextType()Lcom/discord/widgets/chat/input/emoji/WidgetChatInputEmojiPicker$EmojiContextType;
|
|
.locals 2
|
|
|
|
invoke-virtual {p0}, Landroidx/fragment/app/Fragment;->getArguments()Landroid/os/Bundle;
|
|
|
|
move-result-object v0
|
|
|
|
if-eqz v0, :cond_0
|
|
|
|
invoke-virtual {p0}, Landroidx/fragment/app/Fragment;->getArguments()Landroid/os/Bundle;
|
|
|
|
move-result-object v0
|
|
|
|
const-string v1, "EMOJI_CONTEXT_TYPE"
|
|
|
|
invoke-virtual {v0, v1}, Landroid/os/Bundle;->getSerializable(Ljava/lang/String;)Ljava/io/Serializable;
|
|
|
|
move-result-object v0
|
|
|
|
check-cast v0, Lcom/discord/widgets/chat/input/emoji/WidgetChatInputEmojiPicker$EmojiContextType;
|
|
|
|
return-object v0
|
|
|
|
:cond_0
|
|
invoke-virtual {p0}, Lcom/discord/app/AppFragment;->getMostRecentIntent()Landroid/content/Intent;
|
|
|
|
move-result-object v0
|
|
|
|
const-string v1, "INTENT_EXTRA_EMOJI_CONTEXT_TYPE"
|
|
|
|
invoke-virtual {v0, v1}, Landroid/content/Intent;->getSerializableExtra(Ljava/lang/String;)Ljava/io/Serializable;
|
|
|
|
move-result-object v0
|
|
|
|
check-cast v0, Lcom/discord/widgets/chat/input/emoji/WidgetChatInputEmojiPicker$EmojiContextType;
|
|
|
|
return-object v0
|
|
.end method
|
|
|
|
.method private getMode()Lcom/discord/widgets/chat/input/emoji/WidgetChatInputEmojiPicker$Mode;
|
|
.locals 2
|
|
|
|
invoke-virtual {p0}, Landroidx/fragment/app/Fragment;->getArguments()Landroid/os/Bundle;
|
|
|
|
move-result-object v0
|
|
|
|
if-eqz v0, :cond_0
|
|
|
|
invoke-virtual {p0}, Landroidx/fragment/app/Fragment;->getArguments()Landroid/os/Bundle;
|
|
|
|
move-result-object v0
|
|
|
|
const-string v1, "MODE"
|
|
|
|
invoke-virtual {v0, v1}, Landroid/os/Bundle;->getSerializable(Ljava/lang/String;)Ljava/io/Serializable;
|
|
|
|
move-result-object v0
|
|
|
|
check-cast v0, Lcom/discord/widgets/chat/input/emoji/WidgetChatInputEmojiPicker$Mode;
|
|
|
|
return-object v0
|
|
|
|
:cond_0
|
|
sget-object v0, Lcom/discord/widgets/chat/input/emoji/WidgetChatInputEmojiPicker$Mode;->FULLSCREEN:Lcom/discord/widgets/chat/input/emoji/WidgetChatInputEmojiPicker$Mode;
|
|
|
|
return-object v0
|
|
.end method
|
|
|
|
.method public static getStateObservable()Lrx/Observable;
|
|
.locals 1
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"()",
|
|
"Lrx/Observable<",
|
|
"Ljava/lang/Boolean;",
|
|
">;"
|
|
}
|
|
.end annotation
|
|
|
|
sget-object v0, Lcom/discord/widgets/chat/input/emoji/WidgetChatInputEmojiPicker;->state:Lrx/subjects/BehaviorSubject;
|
|
|
|
invoke-virtual {v0}, Lrx/Observable;->a()Lrx/Observable;
|
|
|
|
move-result-object v0
|
|
|
|
return-object v0
|
|
.end method
|
|
|
|
.method public static handleActivityResult(IILandroid/content/Intent;Lrx/functions/Action2;)V
|
|
.locals 1
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"(II",
|
|
"Landroid/content/Intent;",
|
|
"Lrx/functions/Action2<",
|
|
"Lcom/discord/models/domain/emoji/Emoji;",
|
|
"Ljava/util/HashMap<",
|
|
"Ljava/lang/String;",
|
|
"Ljava/io/Serializable;",
|
|
">;>;)V"
|
|
}
|
|
.end annotation
|
|
|
|
const/16 v0, 0x539
|
|
|
|
if-ne p0, v0, :cond_1
|
|
|
|
const/4 p0, -0x1
|
|
|
|
if-ne p1, p0, :cond_1
|
|
|
|
const-string p0, "RESULT_METADATA_PAYLOAD"
|
|
|
|
invoke-virtual {p2, p0}, Landroid/content/Intent;->hasExtra(Ljava/lang/String;)Z
|
|
|
|
move-result p1
|
|
|
|
if-eqz p1, :cond_0
|
|
|
|
invoke-virtual {p2, p0}, Landroid/content/Intent;->getSerializableExtra(Ljava/lang/String;)Ljava/io/Serializable;
|
|
|
|
move-result-object p0
|
|
|
|
check-cast p0, Ljava/util/HashMap;
|
|
|
|
goto :goto_0
|
|
|
|
:cond_0
|
|
const/4 p0, 0x0
|
|
|
|
:goto_0
|
|
const-string p1, "RESULT_EMOJI_PAYLOAD"
|
|
|
|
invoke-virtual {p2, p1}, Landroid/content/Intent;->getParcelableExtra(Ljava/lang/String;)Landroid/os/Parcelable;
|
|
|
|
move-result-object p1
|
|
|
|
invoke-interface {p3, p1, p0}, Lrx/functions/Action2;->call(Ljava/lang/Object;Ljava/lang/Object;)V
|
|
|
|
:cond_1
|
|
return-void
|
|
.end method
|
|
|
|
.method private handleInputChanged(Ljava/lang/String;)V
|
|
.locals 3
|
|
|
|
iget-object v0, p0, Lcom/discord/widgets/chat/input/emoji/WidgetChatInputEmojiPicker;->searchSubject:Lrx/subjects/Subject;
|
|
|
|
invoke-interface {v0, p1}, Lg0/g;->onNext(Ljava/lang/Object;)V
|
|
|
|
invoke-static {p1}, Landroid/text/TextUtils;->isEmpty(Ljava/lang/CharSequence;)Z
|
|
|
|
move-result p1
|
|
|
|
iget-object v0, p0, Lcom/discord/widgets/chat/input/emoji/WidgetChatInputEmojiPicker;->searchClearButton:Landroid/widget/ImageView;
|
|
|
|
if-eqz p1, :cond_0
|
|
|
|
const v1, 0x7f0803f2
|
|
|
|
goto :goto_0
|
|
|
|
:cond_0
|
|
const v1, 0x7f08029e
|
|
|
|
:goto_0
|
|
invoke-virtual {v0, v1}, Landroid/widget/ImageView;->setImageResource(I)V
|
|
|
|
iget-object v0, p0, Lcom/discord/widgets/chat/input/emoji/WidgetChatInputEmojiPicker;->searchClearButton:Landroid/widget/ImageView;
|
|
|
|
if-eqz p1, :cond_1
|
|
|
|
invoke-virtual {p0}, Landroidx/fragment/app/Fragment;->requireContext()Landroid/content/Context;
|
|
|
|
move-result-object v1
|
|
|
|
const v2, 0x7f040128
|
|
|
|
invoke-static {v1, v2}, Lcom/discord/utilities/color/ColorCompat;->getThemedColor(Landroid/content/Context;I)I
|
|
|
|
move-result v1
|
|
|
|
invoke-static {v1}, Landroid/content/res/ColorStateList;->valueOf(I)Landroid/content/res/ColorStateList;
|
|
|
|
move-result-object v1
|
|
|
|
goto :goto_1
|
|
|
|
:cond_1
|
|
invoke-virtual {p0}, Landroidx/fragment/app/Fragment;->requireContext()Landroid/content/Context;
|
|
|
|
move-result-object v1
|
|
|
|
const v2, 0x7f040129
|
|
|
|
invoke-static {v1, v2}, Lcom/discord/utilities/color/ColorCompat;->getThemedColor(Landroid/content/Context;I)I
|
|
|
|
move-result v1
|
|
|
|
invoke-static {v1}, Landroid/content/res/ColorStateList;->valueOf(I)Landroid/content/res/ColorStateList;
|
|
|
|
move-result-object v1
|
|
|
|
:goto_1
|
|
invoke-virtual {v0, v1}, Landroid/widget/ImageView;->setImageTintList(Landroid/content/res/ColorStateList;)V
|
|
|
|
iget-object v0, p0, Lcom/discord/widgets/chat/input/emoji/WidgetChatInputEmojiPicker;->searchClearButton:Landroid/widget/ImageView;
|
|
|
|
if-eqz p1, :cond_2
|
|
|
|
const p1, 0x7f1212a0
|
|
|
|
invoke-virtual {p0, p1}, Landroidx/fragment/app/Fragment;->getString(I)Ljava/lang/String;
|
|
|
|
move-result-object p1
|
|
|
|
goto :goto_2
|
|
|
|
:cond_2
|
|
const p1, 0x7f121201
|
|
|
|
invoke-virtual {p0, p1}, Landroidx/fragment/app/Fragment;->getString(I)Ljava/lang/String;
|
|
|
|
move-result-object p1
|
|
|
|
:goto_2
|
|
invoke-virtual {v0, p1}, Landroid/widget/ImageView;->setContentDescription(Ljava/lang/CharSequence;)V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method private handleNewScrollPosition(Ljava/lang/Integer;Ljava/util/Map;)V
|
|
.locals 5
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"(",
|
|
"Ljava/lang/Integer;",
|
|
"Ljava/util/Map<",
|
|
"Lcom/discord/models/domain/emoji/EmojiCategory;",
|
|
"Landroidx/core/util/Pair<",
|
|
"Ljava/lang/Integer;",
|
|
"Ljava/lang/Integer;",
|
|
">;>;)V"
|
|
}
|
|
.end annotation
|
|
|
|
iget-object v0, p0, Lcom/discord/widgets/chat/input/emoji/WidgetChatInputEmojiPicker;->tabLayout:Lcom/google/android/material/tabs/TabLayout;
|
|
|
|
if-nez v0, :cond_0
|
|
|
|
return-void
|
|
|
|
:cond_0
|
|
invoke-interface {p2}, Ljava/util/Map;->entrySet()Ljava/util/Set;
|
|
|
|
move-result-object v0
|
|
|
|
invoke-interface {v0}, Ljava/util/Set;->iterator()Ljava/util/Iterator;
|
|
|
|
move-result-object v0
|
|
|
|
:cond_1
|
|
invoke-interface {v0}, Ljava/util/Iterator;->hasNext()Z
|
|
|
|
move-result v1
|
|
|
|
if-eqz v1, :cond_2
|
|
|
|
invoke-interface {v0}, Ljava/util/Iterator;->next()Ljava/lang/Object;
|
|
|
|
move-result-object v1
|
|
|
|
check-cast v1, Ljava/util/Map$Entry;
|
|
|
|
invoke-interface {v1}, Ljava/util/Map$Entry;->getKey()Ljava/lang/Object;
|
|
|
|
move-result-object v2
|
|
|
|
check-cast v2, Lcom/discord/models/domain/emoji/EmojiCategory;
|
|
|
|
invoke-interface {v1}, Ljava/util/Map$Entry;->getValue()Ljava/lang/Object;
|
|
|
|
move-result-object v1
|
|
|
|
check-cast v1, Landroidx/core/util/Pair;
|
|
|
|
invoke-virtual {p1}, Ljava/lang/Integer;->intValue()I
|
|
|
|
move-result v3
|
|
|
|
iget-object v4, v1, Landroidx/core/util/Pair;->first:Ljava/lang/Object;
|
|
|
|
check-cast v4, Ljava/lang/Integer;
|
|
|
|
invoke-virtual {v4}, Ljava/lang/Integer;->intValue()I
|
|
|
|
move-result v4
|
|
|
|
if-lt v3, v4, :cond_1
|
|
|
|
invoke-virtual {p1}, Ljava/lang/Integer;->intValue()I
|
|
|
|
move-result v3
|
|
|
|
iget-object v1, v1, Landroidx/core/util/Pair;->second:Ljava/lang/Object;
|
|
|
|
check-cast v1, Ljava/lang/Integer;
|
|
|
|
invoke-virtual {v1}, Ljava/lang/Integer;->intValue()I
|
|
|
|
move-result v1
|
|
|
|
if-ge v3, v1, :cond_1
|
|
|
|
sget-object p1, Lcom/discord/widgets/chat/input/emoji/WidgetChatInputEmojiPicker;->CATEGORY_INDICES:Ljava/util/Map;
|
|
|
|
invoke-interface {p1, v2}, Ljava/util/Map;->get(Ljava/lang/Object;)Ljava/lang/Object;
|
|
|
|
move-result-object p1
|
|
|
|
check-cast p1, Ljava/lang/Integer;
|
|
|
|
invoke-virtual {p1}, Ljava/lang/Integer;->intValue()I
|
|
|
|
move-result p1
|
|
|
|
iget-object v0, p0, Lcom/discord/widgets/chat/input/emoji/WidgetChatInputEmojiPicker;->tabLayout:Lcom/google/android/material/tabs/TabLayout;
|
|
|
|
invoke-virtual {v0, p1}, Lcom/google/android/material/tabs/TabLayout;->getTabAt(I)Lcom/google/android/material/tabs/TabLayout$Tab;
|
|
|
|
move-result-object p1
|
|
|
|
if-eqz p1, :cond_2
|
|
|
|
invoke-virtual {p1}, Lcom/google/android/material/tabs/TabLayout$Tab;->isSelected()Z
|
|
|
|
move-result v0
|
|
|
|
if-nez v0, :cond_2
|
|
|
|
iget-object v0, p0, Lcom/discord/widgets/chat/input/emoji/WidgetChatInputEmojiPicker;->tabLayout:Lcom/google/android/material/tabs/TabLayout;
|
|
|
|
invoke-virtual {v0}, Lcom/google/android/material/tabs/TabLayout;->clearOnTabSelectedListeners()V
|
|
|
|
invoke-virtual {p1}, Lcom/google/android/material/tabs/TabLayout$Tab;->select()V
|
|
|
|
invoke-direct {p0, p2}, Lcom/discord/widgets/chat/input/emoji/WidgetChatInputEmojiPicker;->setOnTabSelectedListener(Ljava/util/Map;)V
|
|
|
|
:cond_2
|
|
return-void
|
|
.end method
|
|
|
|
.method public static initCategoryIndices()Ljava/util/Map;
|
|
.locals 5
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"()",
|
|
"Ljava/util/Map<",
|
|
"Lcom/discord/models/domain/emoji/EmojiCategory;",
|
|
"Ljava/lang/Integer;",
|
|
">;"
|
|
}
|
|
.end annotation
|
|
|
|
new-instance v0, Ljava/util/HashMap;
|
|
|
|
invoke-direct {v0}, Ljava/util/HashMap;-><init>()V
|
|
|
|
invoke-static {}, Lcom/discord/models/domain/emoji/EmojiCategory;->values()[Lcom/discord/models/domain/emoji/EmojiCategory;
|
|
|
|
move-result-object v1
|
|
|
|
const/4 v2, 0x0
|
|
|
|
:goto_0
|
|
array-length v3, v1
|
|
|
|
if-ge v2, v3, :cond_0
|
|
|
|
aget-object v3, v1, v2
|
|
|
|
invoke-static {v2}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;
|
|
|
|
move-result-object v4
|
|
|
|
invoke-interface {v0, v3, v4}, Ljava/util/Map;->put(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
|
|
|
|
add-int/lit8 v2, v2, 0x1
|
|
|
|
goto :goto_0
|
|
|
|
:cond_0
|
|
return-object v0
|
|
.end method
|
|
|
|
.method private initializeInputButtons()V
|
|
.locals 10
|
|
|
|
iget-object v0, p0, Lcom/discord/widgets/chat/input/emoji/WidgetChatInputEmojiPicker;->searchButton:Landroid/widget/ImageView;
|
|
|
|
if-eqz v0, :cond_4
|
|
|
|
iget-object v0, p0, Lcom/discord/widgets/chat/input/emoji/WidgetChatInputEmojiPicker;->backspaceButton:Landroid/widget/ImageView;
|
|
|
|
if-eqz v0, :cond_4
|
|
|
|
iget-object v0, p0, Lcom/discord/widgets/chat/input/emoji/WidgetChatInputEmojiPicker;->emojiSearchBar:Landroid/view/View;
|
|
|
|
if-nez v0, :cond_0
|
|
|
|
goto :goto_3
|
|
|
|
:cond_0
|
|
iget-object v0, p0, Lcom/discord/widgets/chat/input/emoji/WidgetChatInputEmojiPicker;->mode:Lcom/discord/widgets/chat/input/emoji/WidgetChatInputEmojiPicker$Mode;
|
|
|
|
sget-object v1, Lcom/discord/widgets/chat/input/emoji/WidgetChatInputEmojiPicker$Mode;->INLINE:Lcom/discord/widgets/chat/input/emoji/WidgetChatInputEmojiPicker$Mode;
|
|
|
|
const/4 v2, 0x0
|
|
|
|
if-ne v0, v1, :cond_1
|
|
|
|
const/4 v0, 0x1
|
|
|
|
goto :goto_0
|
|
|
|
:cond_1
|
|
const/4 v0, 0x0
|
|
|
|
:goto_0
|
|
iget-object v1, p0, Lcom/discord/widgets/chat/input/emoji/WidgetChatInputEmojiPicker;->searchButton:Landroid/widget/ImageView;
|
|
|
|
const/16 v3, 0x8
|
|
|
|
if-eqz v0, :cond_2
|
|
|
|
const/4 v4, 0x0
|
|
|
|
goto :goto_1
|
|
|
|
:cond_2
|
|
const/16 v4, 0x8
|
|
|
|
:goto_1
|
|
invoke-virtual {v1, v4}, Landroid/widget/ImageView;->setVisibility(I)V
|
|
|
|
iget-object v1, p0, Lcom/discord/widgets/chat/input/emoji/WidgetChatInputEmojiPicker;->backspaceButton:Landroid/widget/ImageView;
|
|
|
|
if-eqz v0, :cond_3
|
|
|
|
goto :goto_2
|
|
|
|
:cond_3
|
|
const/16 v2, 0x8
|
|
|
|
:goto_2
|
|
invoke-virtual {v1, v2}, Landroid/widget/ImageView;->setVisibility(I)V
|
|
|
|
iget-object v0, p0, Lcom/discord/widgets/chat/input/emoji/WidgetChatInputEmojiPicker;->searchButton:Landroid/widget/ImageView;
|
|
|
|
new-instance v1, Lf/a/m/b/a/g0/f;
|
|
|
|
invoke-direct {v1, p0}, Lf/a/m/b/a/g0/f;-><init>(Lcom/discord/widgets/chat/input/emoji/WidgetChatInputEmojiPicker;)V
|
|
|
|
invoke-virtual {v0, v1}, Landroid/widget/ImageView;->setOnClickListener(Landroid/view/View$OnClickListener;)V
|
|
|
|
iget-object v0, p0, Lcom/discord/widgets/chat/input/emoji/WidgetChatInputEmojiPicker;->backspaceButton:Landroid/widget/ImageView;
|
|
|
|
new-instance v9, Lcom/discord/utilities/press/RepeatingOnTouchListener;
|
|
|
|
const-wide/16 v2, 0xfa
|
|
|
|
const-wide/16 v4, 0x32
|
|
|
|
sget-object v6, Ljava/util/concurrent/TimeUnit;->MILLISECONDS:Ljava/util/concurrent/TimeUnit;
|
|
|
|
new-instance v7, Lf/a/m/b/a/g0/o;
|
|
|
|
invoke-direct {v7, p0}, Lf/a/m/b/a/g0/o;-><init>(Lcom/discord/widgets/chat/input/emoji/WidgetChatInputEmojiPicker;)V
|
|
|
|
new-instance v8, Lf/a/m/b/a/g0/m;
|
|
|
|
invoke-direct {v8, p0}, Lf/a/m/b/a/g0/m;-><init>(Lcom/discord/widgets/chat/input/emoji/WidgetChatInputEmojiPicker;)V
|
|
|
|
move-object v1, v9
|
|
|
|
invoke-direct/range {v1 .. v8}, Lcom/discord/utilities/press/RepeatingOnTouchListener;-><init>(JJLjava/util/concurrent/TimeUnit;Lrx/functions/Action0;Lrx/functions/Action0;)V
|
|
|
|
invoke-virtual {v0, v9}, Landroid/widget/ImageView;->setOnTouchListener(Landroid/view/View$OnTouchListener;)V
|
|
|
|
:cond_4
|
|
:goto_3
|
|
return-void
|
|
.end method
|
|
|
|
.method private initializeSearchBar()V
|
|
.locals 2
|
|
|
|
iget-object v0, p0, Lcom/discord/widgets/chat/input/emoji/WidgetChatInputEmojiPicker;->searchInput:Landroid/widget/EditText;
|
|
|
|
new-instance v1, Lf/a/m/b/a/g0/j;
|
|
|
|
invoke-direct {v1, p0}, Lf/a/m/b/a/g0/j;-><init>(Lcom/discord/widgets/chat/input/emoji/WidgetChatInputEmojiPicker;)V
|
|
|
|
invoke-static {p0, v0, v1}, Lcom/discord/utilities/view/text/TextWatcher;->addBindedTextWatcher(Landroidx/fragment/app/Fragment;Landroid/widget/TextView;Lrx/functions/Action1;)V
|
|
|
|
iget-object v0, p0, Lcom/discord/widgets/chat/input/emoji/WidgetChatInputEmojiPicker;->searchClearButton:Landroid/widget/ImageView;
|
|
|
|
new-instance v1, Lf/a/m/b/a/g0/k;
|
|
|
|
invoke-direct {v1, p0}, Lf/a/m/b/a/g0/k;-><init>(Lcom/discord/widgets/chat/input/emoji/WidgetChatInputEmojiPicker;)V
|
|
|
|
invoke-virtual {v0, v1}, Landroid/widget/ImageView;->setOnClickListener(Landroid/view/View$OnClickListener;)V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method private initializeTabLayout()V
|
|
.locals 5
|
|
|
|
invoke-static {}, Lcom/discord/models/domain/emoji/EmojiCategory;->values()[Lcom/discord/models/domain/emoji/EmojiCategory;
|
|
|
|
move-result-object v0
|
|
|
|
array-length v1, v0
|
|
|
|
const/4 v2, 0x0
|
|
|
|
:goto_0
|
|
if-ge v2, v1, :cond_0
|
|
|
|
aget-object v3, v0, v2
|
|
|
|
iget-object v4, p0, Lcom/discord/widgets/chat/input/emoji/WidgetChatInputEmojiPicker;->tabLayout:Lcom/google/android/material/tabs/TabLayout;
|
|
|
|
invoke-virtual {v4}, Landroid/widget/HorizontalScrollView;->getContext()Landroid/content/Context;
|
|
|
|
move-result-object v4
|
|
|
|
invoke-static {v3}, Lcom/discord/widgets/chat/input/emoji/WidgetChatInputEmojiPicker;->getCategoryIconResId(Lcom/discord/models/domain/emoji/EmojiCategory;)I
|
|
|
|
move-result v3
|
|
|
|
invoke-static {v4, v3}, Lcom/discord/utilities/drawable/DrawableCompat;->getThemedDrawableRes(Landroid/content/Context;I)I
|
|
|
|
move-result v3
|
|
|
|
iget-object v4, p0, Lcom/discord/widgets/chat/input/emoji/WidgetChatInputEmojiPicker;->tabLayout:Lcom/google/android/material/tabs/TabLayout;
|
|
|
|
invoke-virtual {v4}, Lcom/google/android/material/tabs/TabLayout;->newTab()Lcom/google/android/material/tabs/TabLayout$Tab;
|
|
|
|
move-result-object v4
|
|
|
|
invoke-virtual {v4, v3}, Lcom/google/android/material/tabs/TabLayout$Tab;->setIcon(I)Lcom/google/android/material/tabs/TabLayout$Tab;
|
|
|
|
move-result-object v3
|
|
|
|
iget-object v4, p0, Lcom/discord/widgets/chat/input/emoji/WidgetChatInputEmojiPicker;->tabLayout:Lcom/google/android/material/tabs/TabLayout;
|
|
|
|
invoke-virtual {v4, v3}, Lcom/google/android/material/tabs/TabLayout;->addTab(Lcom/google/android/material/tabs/TabLayout$Tab;)V
|
|
|
|
add-int/lit8 v2, v2, 0x1
|
|
|
|
goto :goto_0
|
|
|
|
:cond_0
|
|
return-void
|
|
.end method
|
|
|
|
.method public static launchFullscreen(Landroidx/fragment/app/Fragment;)V
|
|
.locals 2
|
|
|
|
sget-object v0, Lcom/discord/widgets/chat/input/emoji/WidgetChatInputEmojiPicker$EmojiContextType;->CHAT:Lcom/discord/widgets/chat/input/emoji/WidgetChatInputEmojiPicker$EmojiContextType;
|
|
|
|
const/4 v1, 0x0
|
|
|
|
invoke-static {p0, v0, v1}, Lcom/discord/widgets/chat/input/emoji/WidgetChatInputEmojiPicker;->launchFullscreen(Landroidx/fragment/app/Fragment;Lcom/discord/widgets/chat/input/emoji/WidgetChatInputEmojiPicker$EmojiContextType;Ljava/util/HashMap;)V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public static launchFullscreen(Landroidx/fragment/app/Fragment;Lcom/discord/widgets/chat/input/emoji/WidgetChatInputEmojiPicker$EmojiContextType;Ljava/util/HashMap;)V
|
|
.locals 2
|
|
.param p2 # Ljava/util/HashMap;
|
|
.annotation build Landroidx/annotation/Nullable;
|
|
.end annotation
|
|
.end param
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"(",
|
|
"Landroidx/fragment/app/Fragment;",
|
|
"Lcom/discord/widgets/chat/input/emoji/WidgetChatInputEmojiPicker$EmojiContextType;",
|
|
"Ljava/util/HashMap<",
|
|
"Ljava/lang/String;",
|
|
"Ljava/io/Serializable;",
|
|
">;)V"
|
|
}
|
|
.end annotation
|
|
|
|
new-instance v0, Landroid/content/Intent;
|
|
|
|
invoke-direct {v0}, Landroid/content/Intent;-><init>()V
|
|
|
|
const-string v1, "INTENT_EXTRA_EMOJI_CONTEXT_TYPE"
|
|
|
|
invoke-virtual {v0, v1, p1}, Landroid/content/Intent;->putExtra(Ljava/lang/String;Ljava/io/Serializable;)Landroid/content/Intent;
|
|
|
|
if-eqz p2, :cond_0
|
|
|
|
const-string p1, "RESULT_METADATA_PAYLOAD"
|
|
|
|
invoke-virtual {v0, p1, p2}, Landroid/content/Intent;->putExtra(Ljava/lang/String;Ljava/io/Serializable;)Landroid/content/Intent;
|
|
|
|
:cond_0
|
|
const-class p1, Lcom/discord/widgets/chat/input/emoji/WidgetChatInputEmojiPicker;
|
|
|
|
const/16 p2, 0x539
|
|
|
|
invoke-static {p0, p1, v0, p2}, Lf/a/b/h;->a(Landroidx/fragment/app/Fragment;Ljava/lang/Class;Landroid/content/Intent;I)V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method private setOnTabSelectedListener(Ljava/util/Map;)V
|
|
.locals 2
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"(",
|
|
"Ljava/util/Map<",
|
|
"Lcom/discord/models/domain/emoji/EmojiCategory;",
|
|
"Landroidx/core/util/Pair<",
|
|
"Ljava/lang/Integer;",
|
|
"Ljava/lang/Integer;",
|
|
">;>;)V"
|
|
}
|
|
.end annotation
|
|
|
|
iget-object v0, p0, Lcom/discord/widgets/chat/input/emoji/WidgetChatInputEmojiPicker;->tabLayout:Lcom/google/android/material/tabs/TabLayout;
|
|
|
|
invoke-virtual {v0}, Lcom/google/android/material/tabs/TabLayout;->clearOnTabSelectedListeners()V
|
|
|
|
iget-object v0, p0, Lcom/discord/widgets/chat/input/emoji/WidgetChatInputEmojiPicker;->tabLayout:Lcom/google/android/material/tabs/TabLayout;
|
|
|
|
new-instance v1, Lcom/discord/widgets/chat/input/emoji/WidgetChatInputEmojiPicker$1;
|
|
|
|
invoke-direct {v1, p0, p1}, Lcom/discord/widgets/chat/input/emoji/WidgetChatInputEmojiPicker$1;-><init>(Lcom/discord/widgets/chat/input/emoji/WidgetChatInputEmojiPicker;Ljava/util/Map;)V
|
|
|
|
invoke-virtual {v0, v1}, Lcom/google/android/material/tabs/TabLayout;->addOnTabSelectedListener(Lcom/google/android/material/tabs/TabLayout$OnTabSelectedListener;)V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
|
|
# virtual methods
|
|
.method public synthetic a(Landroid/view/View;)V
|
|
.locals 0
|
|
|
|
invoke-static {p0}, Lcom/discord/widgets/chat/input/emoji/WidgetChatInputEmojiPicker;->launchFullscreen(Landroidx/fragment/app/Fragment;)V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public synthetic a(Lcom/discord/models/domain/emoji/Emoji;Ljava/util/HashMap;)V
|
|
.locals 1
|
|
|
|
iget-object p2, p0, Lcom/discord/widgets/chat/input/emoji/WidgetChatInputEmojiPicker;->listener:Lcom/discord/widgets/chat/input/emoji/WidgetChatInputEmojiPicker$Listener;
|
|
|
|
if-eqz p2, :cond_0
|
|
|
|
const/4 v0, 0x1
|
|
|
|
invoke-interface {p2, p1, v0}, Lcom/discord/widgets/chat/input/emoji/WidgetChatInputEmojiPicker$Listener;->onEmojiPicked(Lcom/discord/models/domain/emoji/Emoji;Z)V
|
|
|
|
:cond_0
|
|
return-void
|
|
.end method
|
|
|
|
.method public synthetic a(Lcom/discord/widgets/chat/input/emoji/WidgetChatInputEmojiPicker$Model;Ljava/lang/Integer;)V
|
|
.locals 0
|
|
|
|
iget-object p1, p1, Lcom/discord/widgets/chat/input/emoji/WidgetChatInputEmojiPicker$Model;->categoryRanges:Ljava/util/Map;
|
|
|
|
invoke-direct {p0, p2, p1}, Lcom/discord/widgets/chat/input/emoji/WidgetChatInputEmojiPicker;->handleNewScrollPosition(Ljava/lang/Integer;Ljava/util/Map;)V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public synthetic b(Landroid/view/View;)V
|
|
.locals 1
|
|
|
|
iget-object p1, p0, Lcom/discord/widgets/chat/input/emoji/WidgetChatInputEmojiPicker;->searchInput:Landroid/widget/EditText;
|
|
|
|
const-string v0, ""
|
|
|
|
invoke-virtual {p1, v0}, Landroid/widget/EditText;->setText(Ljava/lang/CharSequence;)V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public synthetic c()V
|
|
.locals 1
|
|
|
|
iget-object v0, p0, Lcom/discord/widgets/chat/input/emoji/WidgetChatInputEmojiPicker;->onBackspacePressedListener:Lcom/discord/widgets/chat/input/emoji/WidgetChatInputEmojiPicker$OnBackspacePressedListener;
|
|
|
|
invoke-interface {v0}, Lcom/discord/widgets/chat/input/emoji/WidgetChatInputEmojiPicker$OnBackspacePressedListener;->onBackspacePressed()V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public synthetic d()V
|
|
.locals 2
|
|
|
|
:try_start_0
|
|
iget-object v0, p0, Lcom/discord/widgets/chat/input/emoji/WidgetChatInputEmojiPicker;->backspaceButton:Landroid/widget/ImageView;
|
|
|
|
const/4 v1, 0x3
|
|
|
|
invoke-virtual {v0, v1}, Landroid/widget/ImageView;->performHapticFeedback(I)Z
|
|
:try_end_0
|
|
.catchall {:try_start_0 .. :try_end_0} :catchall_0
|
|
|
|
:catchall_0
|
|
iget-object v0, p0, Lcom/discord/widgets/chat/input/emoji/WidgetChatInputEmojiPicker;->onBackspacePressedListener:Lcom/discord/widgets/chat/input/emoji/WidgetChatInputEmojiPicker$OnBackspacePressedListener;
|
|
|
|
invoke-interface {v0}, Lcom/discord/widgets/chat/input/emoji/WidgetChatInputEmojiPicker$OnBackspacePressedListener;->onBackspacePressed()V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public getContentViewResId()I
|
|
.locals 1
|
|
|
|
const v0, 0x7f0d016b
|
|
|
|
return v0
|
|
.end method
|
|
|
|
.method public isShown(Z)V
|
|
.locals 2
|
|
|
|
sget-object v0, Lcom/discord/widgets/chat/input/emoji/WidgetChatInputEmojiPicker;->state:Lrx/subjects/BehaviorSubject;
|
|
|
|
invoke-static {p1}, Ljava/lang/Boolean;->valueOf(Z)Ljava/lang/Boolean;
|
|
|
|
move-result-object v1
|
|
|
|
invoke-virtual {v0, v1}, Lrx/subjects/BehaviorSubject;->onNext(Ljava/lang/Object;)V
|
|
|
|
if-nez p1, :cond_0
|
|
|
|
iget-object p1, p0, Lcom/discord/widgets/chat/input/emoji/WidgetChatInputEmojiPicker;->searchInput:Landroid/widget/EditText;
|
|
|
|
const-string v0, ""
|
|
|
|
invoke-virtual {p1, v0}, Landroid/widget/EditText;->setText(Ljava/lang/CharSequence;)V
|
|
|
|
:cond_0
|
|
return-void
|
|
.end method
|
|
|
|
.method public onActivityResult(IILandroid/content/Intent;)V
|
|
.locals 1
|
|
|
|
invoke-super {p0, p1, p2, p3}, Lcom/discord/app/AppFragment;->onActivityResult(IILandroid/content/Intent;)V
|
|
|
|
new-instance v0, Lf/a/m/b/a/g0/n;
|
|
|
|
invoke-direct {v0, p0}, Lf/a/m/b/a/g0/n;-><init>(Lcom/discord/widgets/chat/input/emoji/WidgetChatInputEmojiPicker;)V
|
|
|
|
invoke-static {p1, p2, p3, v0}, Lcom/discord/widgets/chat/input/emoji/WidgetChatInputEmojiPicker;->handleActivityResult(IILandroid/content/Intent;Lrx/functions/Action2;)V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public onCreate(Landroid/os/Bundle;)V
|
|
.locals 1
|
|
.param p1 # Landroid/os/Bundle;
|
|
.annotation build Landroidx/annotation/Nullable;
|
|
.end annotation
|
|
.end param
|
|
|
|
invoke-super {p0, p1}, Landroidx/fragment/app/Fragment;->onCreate(Landroid/os/Bundle;)V
|
|
|
|
invoke-virtual {p0}, Lcom/discord/app/AppFragment;->getMostRecentIntent()Landroid/content/Intent;
|
|
|
|
move-result-object p1
|
|
|
|
const-string v0, "RESULT_METADATA_PAYLOAD"
|
|
|
|
invoke-virtual {p1, v0}, Landroid/content/Intent;->getSerializableExtra(Ljava/lang/String;)Ljava/io/Serializable;
|
|
|
|
move-result-object p1
|
|
|
|
check-cast p1, Ljava/util/HashMap;
|
|
|
|
iput-object p1, p0, Lcom/discord/widgets/chat/input/emoji/WidgetChatInputEmojiPicker;->metadata:Ljava/util/HashMap;
|
|
|
|
invoke-direct {p0}, Lcom/discord/widgets/chat/input/emoji/WidgetChatInputEmojiPicker;->getMode()Lcom/discord/widgets/chat/input/emoji/WidgetChatInputEmojiPicker$Mode;
|
|
|
|
move-result-object p1
|
|
|
|
iput-object p1, p0, Lcom/discord/widgets/chat/input/emoji/WidgetChatInputEmojiPicker;->mode:Lcom/discord/widgets/chat/input/emoji/WidgetChatInputEmojiPicker$Mode;
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public onEmojiSelected(Lcom/discord/models/domain/emoji/Emoji;)V
|
|
.locals 12
|
|
|
|
invoke-interface {p1}, Lcom/discord/models/domain/emoji/Emoji;->isUsable()Z
|
|
|
|
move-result v0
|
|
|
|
const/4 v1, 0x0
|
|
|
|
if-nez v0, :cond_4
|
|
|
|
instance-of v0, p1, Lcom/discord/models/domain/emoji/ModelEmojiCustom;
|
|
|
|
const/4 v2, 0x1
|
|
|
|
if-eqz v0, :cond_0
|
|
|
|
check-cast p1, Lcom/discord/models/domain/emoji/ModelEmojiCustom;
|
|
|
|
invoke-virtual {p1}, Lcom/discord/models/domain/emoji/ModelEmojiCustom;->isAnimated()Z
|
|
|
|
move-result p1
|
|
|
|
if-eqz p1, :cond_0
|
|
|
|
const/4 v1, 0x1
|
|
|
|
:cond_0
|
|
invoke-virtual {p0}, Landroidx/fragment/app/Fragment;->requireFragmentManager()Landroidx/fragment/app/FragmentManager;
|
|
|
|
move-result-object v4
|
|
|
|
if-eqz v1, :cond_1
|
|
|
|
const/4 v2, 0x2
|
|
|
|
const/4 v5, 0x2
|
|
|
|
goto :goto_0
|
|
|
|
:cond_1
|
|
const/4 v5, 0x1
|
|
|
|
:goto_0
|
|
if-eqz v1, :cond_2
|
|
|
|
const p1, 0x7f12112a
|
|
|
|
goto :goto_1
|
|
|
|
:cond_2
|
|
const p1, 0x7f121131
|
|
|
|
:goto_1
|
|
invoke-virtual {p0, p1}, Landroidx/fragment/app/Fragment;->getString(I)Ljava/lang/String;
|
|
|
|
move-result-object p1
|
|
|
|
move-object v6, p1
|
|
|
|
if-eqz v1, :cond_3
|
|
|
|
const p1, 0x7f12112b
|
|
|
|
goto :goto_2
|
|
|
|
:cond_3
|
|
const p1, 0x7f121132
|
|
|
|
:goto_2
|
|
invoke-virtual {p0, p1}, Landroidx/fragment/app/Fragment;->getString(I)Ljava/lang/String;
|
|
|
|
move-result-object p1
|
|
|
|
move-object v7, p1
|
|
|
|
const/4 v8, 0x0
|
|
|
|
const/4 v10, 0x0
|
|
|
|
const/4 v11, 0x0
|
|
|
|
sget-object v3, Lf/a/a/a/a;->j:Lf/a/a/a/a$b;
|
|
|
|
const-string v9, "Emoji Picker Popout"
|
|
|
|
invoke-virtual/range {v3 .. v11}, Lf/a/a/a/a$b;->a(Landroidx/fragment/app/FragmentManager;ILjava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)V
|
|
|
|
return-void
|
|
|
|
:cond_4
|
|
invoke-interface {p1}, Lcom/discord/models/domain/emoji/Emoji;->isAvailable()Z
|
|
|
|
move-result v0
|
|
|
|
if-nez v0, :cond_5
|
|
|
|
invoke-virtual {p0}, Landroidx/fragment/app/Fragment;->getContext()Landroid/content/Context;
|
|
|
|
move-result-object p1
|
|
|
|
const v0, 0x7f1205af
|
|
|
|
invoke-static {p1, v0}, Lf/a/b/j;->a(Landroid/content/Context;I)V
|
|
|
|
return-void
|
|
|
|
:cond_5
|
|
iget-object v0, p0, Lcom/discord/widgets/chat/input/emoji/WidgetChatInputEmojiPicker;->mode:Lcom/discord/widgets/chat/input/emoji/WidgetChatInputEmojiPicker$Mode;
|
|
|
|
sget-object v2, Lcom/discord/widgets/chat/input/emoji/WidgetChatInputEmojiPicker$Mode;->FULLSCREEN:Lcom/discord/widgets/chat/input/emoji/WidgetChatInputEmojiPicker$Mode;
|
|
|
|
if-ne v0, v2, :cond_6
|
|
|
|
invoke-virtual {p0}, Landroidx/fragment/app/Fragment;->getActivity()Landroidx/fragment/app/FragmentActivity;
|
|
|
|
move-result-object v0
|
|
|
|
if-eqz v0, :cond_7
|
|
|
|
new-instance v1, Landroid/content/Intent;
|
|
|
|
invoke-direct {v1}, Landroid/content/Intent;-><init>()V
|
|
|
|
const-string v2, "RESULT_EMOJI_PAYLOAD"
|
|
|
|
invoke-virtual {v1, v2, p1}, Landroid/content/Intent;->putExtra(Ljava/lang/String;Landroid/os/Parcelable;)Landroid/content/Intent;
|
|
|
|
iget-object p1, p0, Lcom/discord/widgets/chat/input/emoji/WidgetChatInputEmojiPicker;->metadata:Ljava/util/HashMap;
|
|
|
|
const-string v2, "RESULT_METADATA_PAYLOAD"
|
|
|
|
invoke-virtual {v1, v2, p1}, Landroid/content/Intent;->putExtra(Ljava/lang/String;Ljava/io/Serializable;)Landroid/content/Intent;
|
|
|
|
const/4 p1, -0x1
|
|
|
|
invoke-virtual {v0, p1, v1}, Landroid/app/Activity;->setResult(ILandroid/content/Intent;)V
|
|
|
|
invoke-virtual {v0}, Landroid/app/Activity;->finish()V
|
|
|
|
goto :goto_3
|
|
|
|
:cond_6
|
|
sget-object v2, Lcom/discord/widgets/chat/input/emoji/WidgetChatInputEmojiPicker$Mode;->INLINE:Lcom/discord/widgets/chat/input/emoji/WidgetChatInputEmojiPicker$Mode;
|
|
|
|
if-ne v0, v2, :cond_7
|
|
|
|
iget-object v0, p0, Lcom/discord/widgets/chat/input/emoji/WidgetChatInputEmojiPicker;->listener:Lcom/discord/widgets/chat/input/emoji/WidgetChatInputEmojiPicker$Listener;
|
|
|
|
if-eqz v0, :cond_7
|
|
|
|
invoke-interface {v0, p1, v1}, Lcom/discord/widgets/chat/input/emoji/WidgetChatInputEmojiPicker$Listener;->onEmojiPicked(Lcom/discord/models/domain/emoji/Emoji;Z)V
|
|
|
|
:cond_7
|
|
:goto_3
|
|
return-void
|
|
.end method
|
|
|
|
.method public onViewBound(Landroid/view/View;)V
|
|
.locals 2
|
|
.param p1 # Landroid/view/View;
|
|
.annotation build Landroidx/annotation/NonNull;
|
|
.end annotation
|
|
.end param
|
|
|
|
invoke-super {p0, p1}, Lcom/discord/app/AppFragment;->onViewBound(Landroid/view/View;)V
|
|
|
|
const v0, 0x7f0a01f4
|
|
|
|
invoke-virtual {p1, v0}, Landroid/view/View;->findViewById(I)Landroid/view/View;
|
|
|
|
move-result-object v0
|
|
|
|
check-cast v0, Landroidx/recyclerview/widget/RecyclerView;
|
|
|
|
iput-object v0, p0, Lcom/discord/widgets/chat/input/emoji/WidgetChatInputEmojiPicker;->emojisRecycler:Landroidx/recyclerview/widget/RecyclerView;
|
|
|
|
const v0, 0x7f0a02fd
|
|
|
|
invoke-virtual {p1, v0}, Landroid/view/View;->findViewById(I)Landroid/view/View;
|
|
|
|
move-result-object v0
|
|
|
|
check-cast v0, Lcom/google/android/material/tabs/TabLayout;
|
|
|
|
iput-object v0, p0, Lcom/discord/widgets/chat/input/emoji/WidgetChatInputEmojiPicker;->tabLayout:Lcom/google/android/material/tabs/TabLayout;
|
|
|
|
const v0, 0x7f0a02fc
|
|
|
|
invoke-virtual {p1, v0}, Landroid/view/View;->findViewById(I)Landroid/view/View;
|
|
|
|
move-result-object v0
|
|
|
|
check-cast v0, Landroid/widget/ImageView;
|
|
|
|
iput-object v0, p0, Lcom/discord/widgets/chat/input/emoji/WidgetChatInputEmojiPicker;->searchButton:Landroid/widget/ImageView;
|
|
|
|
const v0, 0x7f0a02fa
|
|
|
|
invoke-virtual {p1, v0}, Landroid/view/View;->findViewById(I)Landroid/view/View;
|
|
|
|
move-result-object v0
|
|
|
|
check-cast v0, Landroid/widget/ImageView;
|
|
|
|
iput-object v0, p0, Lcom/discord/widgets/chat/input/emoji/WidgetChatInputEmojiPicker;->backspaceButton:Landroid/widget/ImageView;
|
|
|
|
const v0, 0x7f0a02fe
|
|
|
|
invoke-virtual {p1, v0}, Landroid/view/View;->findViewById(I)Landroid/view/View;
|
|
|
|
move-result-object v0
|
|
|
|
iput-object v0, p0, Lcom/discord/widgets/chat/input/emoji/WidgetChatInputEmojiPicker;->emojiSearchBar:Landroid/view/View;
|
|
|
|
const v0, 0x7f0a0300
|
|
|
|
invoke-virtual {p1, v0}, Landroid/view/View;->findViewById(I)Landroid/view/View;
|
|
|
|
move-result-object v0
|
|
|
|
check-cast v0, Landroid/widget/EditText;
|
|
|
|
iput-object v0, p0, Lcom/discord/widgets/chat/input/emoji/WidgetChatInputEmojiPicker;->searchInput:Landroid/widget/EditText;
|
|
|
|
const v0, 0x7f0a02ff
|
|
|
|
invoke-virtual {p1, v0}, Landroid/view/View;->findViewById(I)Landroid/view/View;
|
|
|
|
move-result-object v0
|
|
|
|
check-cast v0, Landroid/widget/ImageView;
|
|
|
|
iput-object v0, p0, Lcom/discord/widgets/chat/input/emoji/WidgetChatInputEmojiPicker;->searchClearButton:Landroid/widget/ImageView;
|
|
|
|
new-instance v0, Lcom/discord/widgets/chat/input/emoji/WidgetChatInputEmojiAdapter;
|
|
|
|
iget-object v1, p0, Lcom/discord/widgets/chat/input/emoji/WidgetChatInputEmojiPicker;->emojisRecycler:Landroidx/recyclerview/widget/RecyclerView;
|
|
|
|
invoke-direct {v0, v1, p0}, Lcom/discord/widgets/chat/input/emoji/WidgetChatInputEmojiAdapter;-><init>(Landroidx/recyclerview/widget/RecyclerView;Lcom/discord/widgets/chat/input/emoji/OnEmojiSelectedListener;)V
|
|
|
|
iput-object v0, p0, Lcom/discord/widgets/chat/input/emoji/WidgetChatInputEmojiPicker;->adapter:Lcom/discord/widgets/chat/input/emoji/WidgetChatInputEmojiAdapter;
|
|
|
|
invoke-direct {p0}, Lcom/discord/widgets/chat/input/emoji/WidgetChatInputEmojiPicker;->initializeTabLayout()V
|
|
|
|
invoke-direct {p0}, Lcom/discord/widgets/chat/input/emoji/WidgetChatInputEmojiPicker;->initializeInputButtons()V
|
|
|
|
invoke-direct {p0}, Lcom/discord/widgets/chat/input/emoji/WidgetChatInputEmojiPicker;->initializeSearchBar()V
|
|
|
|
invoke-virtual {p0}, Lcom/discord/app/AppFragment;->getAppActivity()Lcom/discord/app/AppActivity;
|
|
|
|
move-result-object v0
|
|
|
|
const v1, 0x7f0a0301
|
|
|
|
invoke-virtual {p1, v1}, Landroid/view/View;->findViewById(I)Landroid/view/View;
|
|
|
|
move-result-object p1
|
|
|
|
check-cast p1, Landroidx/appcompat/widget/Toolbar;
|
|
|
|
invoke-virtual {v0, p1}, Lcom/discord/app/AppActivity;->a(Landroidx/appcompat/widget/Toolbar;)V
|
|
|
|
iget-object p1, p0, Lcom/discord/widgets/chat/input/emoji/WidgetChatInputEmojiPicker;->mode:Lcom/discord/widgets/chat/input/emoji/WidgetChatInputEmojiPicker$Mode;
|
|
|
|
sget-object v0, Lcom/discord/widgets/chat/input/emoji/WidgetChatInputEmojiPicker$Mode;->FULLSCREEN:Lcom/discord/widgets/chat/input/emoji/WidgetChatInputEmojiPicker$Mode;
|
|
|
|
if-ne p1, v0, :cond_0
|
|
|
|
invoke-virtual {p0}, Lcom/discord/app/AppFragment;->setActionBarDisplayHomeAsUpEnabled()Landroidx/appcompat/widget/Toolbar;
|
|
|
|
:cond_0
|
|
invoke-virtual {p0}, Lcom/discord/app/AppFragment;->isRecreated()Z
|
|
|
|
move-result p1
|
|
|
|
if-nez p1, :cond_1
|
|
|
|
iget-object p1, p0, Lcom/discord/widgets/chat/input/emoji/WidgetChatInputEmojiPicker;->mode:Lcom/discord/widgets/chat/input/emoji/WidgetChatInputEmojiPicker$Mode;
|
|
|
|
sget-object v0, Lcom/discord/widgets/chat/input/emoji/WidgetChatInputEmojiPicker$Mode;->FULLSCREEN:Lcom/discord/widgets/chat/input/emoji/WidgetChatInputEmojiPicker$Mode;
|
|
|
|
if-ne p1, v0, :cond_1
|
|
|
|
iget-object p1, p0, Lcom/discord/widgets/chat/input/emoji/WidgetChatInputEmojiPicker;->searchInput:Landroid/widget/EditText;
|
|
|
|
invoke-virtual {p0, p1}, Lcom/discord/app/AppFragment;->showKeyboard(Landroid/view/View;)V
|
|
|
|
:cond_1
|
|
return-void
|
|
.end method
|
|
|
|
.method public onViewBoundOrOnResume()V
|
|
.locals 3
|
|
|
|
invoke-super {p0}, Lcom/discord/app/AppFragment;->onViewBoundOrOnResume()V
|
|
|
|
invoke-virtual {p0}, Landroidx/fragment/app/Fragment;->getContext()Landroid/content/Context;
|
|
|
|
move-result-object v0
|
|
|
|
invoke-direct {p0}, Lcom/discord/widgets/chat/input/emoji/WidgetChatInputEmojiPicker;->getEmojiContextType()Lcom/discord/widgets/chat/input/emoji/WidgetChatInputEmojiPicker$EmojiContextType;
|
|
|
|
move-result-object v1
|
|
|
|
iget-object v2, p0, Lcom/discord/widgets/chat/input/emoji/WidgetChatInputEmojiPicker;->searchSubject:Lrx/subjects/Subject;
|
|
|
|
invoke-static {v0, v1, v2}, Lcom/discord/widgets/chat/input/emoji/WidgetChatInputEmojiPicker$Model;->access$000(Landroid/content/Context;Lcom/discord/widgets/chat/input/emoji/WidgetChatInputEmojiPicker$EmojiContextType;Lrx/Observable;)Lrx/Observable;
|
|
|
|
move-result-object v0
|
|
|
|
invoke-static {p0}, Lf/a/b/k;->a(Lcom/discord/app/AppComponent;)Lrx/Observable$c;
|
|
|
|
move-result-object v1
|
|
|
|
invoke-virtual {v0, v1}, Lrx/Observable;->a(Lrx/Observable$c;)Lrx/Observable;
|
|
|
|
move-result-object v0
|
|
|
|
new-instance v1, Lf/a/m/b/a/g0/l;
|
|
|
|
invoke-direct {v1, p0}, Lf/a/m/b/a/g0/l;-><init>(Lcom/discord/widgets/chat/input/emoji/WidgetChatInputEmojiPicker;)V
|
|
|
|
const-class v2, Lcom/discord/widgets/chat/input/emoji/WidgetChatInputEmojiPicker;
|
|
|
|
invoke-static {v1, v2}, Lf/a/b/k;->a(Lrx/functions/Action1;Ljava/lang/Class;)Lrx/Observable$c;
|
|
|
|
move-result-object v1
|
|
|
|
invoke-virtual {v0, v1}, Lrx/Observable;->a(Lrx/Observable$c;)Lrx/Observable;
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public setListener(Lcom/discord/widgets/chat/input/emoji/WidgetChatInputEmojiPicker$Listener;)V
|
|
.locals 0
|
|
|
|
iput-object p1, p0, Lcom/discord/widgets/chat/input/emoji/WidgetChatInputEmojiPicker;->listener:Lcom/discord/widgets/chat/input/emoji/WidgetChatInputEmojiPicker$Listener;
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public setOnBackspacePressedListener(Lcom/discord/widgets/chat/input/emoji/WidgetChatInputEmojiPicker$OnBackspacePressedListener;)V
|
|
.locals 0
|
|
|
|
iput-object p1, p0, Lcom/discord/widgets/chat/input/emoji/WidgetChatInputEmojiPicker;->onBackspacePressedListener:Lcom/discord/widgets/chat/input/emoji/WidgetChatInputEmojiPicker$OnBackspacePressedListener;
|
|
|
|
return-void
|
|
.end method
|