2020-07-08 16:44:49 +00:00
|
|
|
.class public final Lcom/discord/widgets/chat/input/emoji/WidgetChatInputEmojiAdapter;
|
2020-05-17 12:40:10 +00:00
|
|
|
.super Lcom/discord/utilities/mg_recycler/MGRecyclerAdapterSimple;
|
2020-07-08 16:44:49 +00:00
|
|
|
.source "WidgetChatInputEmojiAdapter.kt"
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
|
|
|
|
# annotations
|
|
|
|
.annotation system Ldalvik/annotation/MemberClasses;
|
|
|
|
value = {
|
2020-07-08 16:44:49 +00:00
|
|
|
Lcom/discord/widgets/chat/input/emoji/WidgetChatInputEmojiAdapter$HeaderItem;,
|
2020-05-17 12:40:10 +00:00
|
|
|
Lcom/discord/widgets/chat/input/emoji/WidgetChatInputEmojiAdapter$EmojiItem;,
|
2020-07-08 16:44:49 +00:00
|
|
|
Lcom/discord/widgets/chat/input/emoji/WidgetChatInputEmojiAdapter$HeaderViewHolder;,
|
|
|
|
Lcom/discord/widgets/chat/input/emoji/WidgetChatInputEmojiAdapter$EmojiViewHolder;,
|
|
|
|
Lcom/discord/widgets/chat/input/emoji/WidgetChatInputEmojiAdapter$Companion;
|
2020-05-17 12:40:10 +00:00
|
|
|
}
|
|
|
|
.end annotation
|
|
|
|
|
|
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
|
|
value = {
|
|
|
|
"Lcom/discord/utilities/mg_recycler/MGRecyclerAdapterSimple<",
|
|
|
|
"Lcom/discord/utilities/mg_recycler/MGRecyclerDataPayload;",
|
|
|
|
">;"
|
|
|
|
}
|
|
|
|
.end annotation
|
|
|
|
|
|
|
|
|
|
|
|
# static fields
|
2020-07-08 16:44:49 +00:00
|
|
|
.field public static final Companion:Lcom/discord/widgets/chat/input/emoji/WidgetChatInputEmojiAdapter$Companion;
|
|
|
|
|
2020-05-17 12:40:10 +00:00
|
|
|
.field public static final ITEM_TYPE_EMOJI:I = 0x1
|
|
|
|
|
|
|
|
.field public static final ITEM_TYPE_HEADER:I = 0x0
|
|
|
|
|
|
|
|
.field public static final MAX_EMOJI_SIZE_PX:I = 0x40
|
|
|
|
|
|
|
|
|
|
|
|
# instance fields
|
|
|
|
.field public final emojiSizePx:I
|
|
|
|
|
|
|
|
.field public final layoutManager:Landroidx/recyclerview/widget/GridLayoutManager;
|
|
|
|
|
|
|
|
.field public final numColumns:I
|
|
|
|
|
|
|
|
.field public final onEmojiSelectedListener:Lcom/discord/widgets/chat/input/emoji/OnEmojiSelectedListener;
|
|
|
|
|
|
|
|
.field public onScrollListener:Landroidx/recyclerview/widget/RecyclerView$OnScrollListener;
|
|
|
|
|
2020-07-08 16:44:49 +00:00
|
|
|
.field public onScrollPositionListener:Lkotlin/jvm/functions/Function1;
|
2020-05-17 12:40:10 +00:00
|
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
|
|
value = {
|
2020-07-08 16:44:49 +00:00
|
|
|
"Lkotlin/jvm/functions/Function1<",
|
|
|
|
"-",
|
2020-05-17 12:40:10 +00:00
|
|
|
"Ljava/lang/Integer;",
|
2020-07-08 16:44:49 +00:00
|
|
|
"Lkotlin/Unit;",
|
2020-05-17 12:40:10 +00:00
|
|
|
">;"
|
|
|
|
}
|
|
|
|
.end annotation
|
|
|
|
.end field
|
|
|
|
|
|
|
|
|
|
|
|
# direct methods
|
2020-07-08 16:44:49 +00:00
|
|
|
.method public static constructor <clinit>()V
|
|
|
|
.locals 2
|
|
|
|
|
|
|
|
new-instance v0, Lcom/discord/widgets/chat/input/emoji/WidgetChatInputEmojiAdapter$Companion;
|
|
|
|
|
|
|
|
const/4 v1, 0x0
|
|
|
|
|
|
|
|
invoke-direct {v0, v1}, Lcom/discord/widgets/chat/input/emoji/WidgetChatInputEmojiAdapter$Companion;-><init>(Lkotlin/jvm/internal/DefaultConstructorMarker;)V
|
|
|
|
|
|
|
|
sput-object v0, Lcom/discord/widgets/chat/input/emoji/WidgetChatInputEmojiAdapter;->Companion:Lcom/discord/widgets/chat/input/emoji/WidgetChatInputEmojiAdapter$Companion;
|
|
|
|
|
|
|
|
return-void
|
|
|
|
.end method
|
|
|
|
|
2020-05-17 12:40:10 +00:00
|
|
|
.method public constructor <init>(Landroidx/recyclerview/widget/RecyclerView;Lcom/discord/widgets/chat/input/emoji/OnEmojiSelectedListener;)V
|
|
|
|
.locals 2
|
|
|
|
|
2020-07-08 16:44:49 +00:00
|
|
|
const/4 v0, 0x0
|
|
|
|
|
|
|
|
if-eqz p1, :cond_1
|
|
|
|
|
|
|
|
if-eqz p2, :cond_0
|
|
|
|
|
2020-05-17 12:40:10 +00:00
|
|
|
invoke-direct {p0, p1}, Lcom/discord/utilities/mg_recycler/MGRecyclerAdapterSimple;-><init>(Landroidx/recyclerview/widget/RecyclerView;)V
|
|
|
|
|
|
|
|
iput-object p2, p0, Lcom/discord/widgets/chat/input/emoji/WidgetChatInputEmojiAdapter;->onEmojiSelectedListener:Lcom/discord/widgets/chat/input/emoji/OnEmojiSelectedListener;
|
|
|
|
|
2020-07-08 16:44:49 +00:00
|
|
|
sget-object p2, Lcom/discord/widgets/chat/input/emoji/WidgetChatInputEmojiAdapter$onScrollPositionListener$1;->INSTANCE:Lcom/discord/widgets/chat/input/emoji/WidgetChatInputEmojiAdapter$onScrollPositionListener$1;
|
|
|
|
|
|
|
|
iput-object p2, p0, Lcom/discord/widgets/chat/input/emoji/WidgetChatInputEmojiAdapter;->onScrollPositionListener:Lkotlin/jvm/functions/Function1;
|
|
|
|
|
2020-05-17 12:40:10 +00:00
|
|
|
invoke-virtual {p1}, Landroid/view/ViewGroup;->getContext()Landroid/content/Context;
|
|
|
|
|
|
|
|
move-result-object p2
|
|
|
|
|
2020-07-08 16:44:49 +00:00
|
|
|
const-string v0, "recycler.context"
|
|
|
|
|
|
|
|
invoke-static {p2, v0}, Lj0/n/c/h;->checkExpressionValueIsNotNull(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
|
2020-05-17 12:40:10 +00:00
|
|
|
invoke-virtual {p2}, Landroid/content/Context;->getResources()Landroid/content/res/Resources;
|
|
|
|
|
|
|
|
move-result-object p2
|
|
|
|
|
|
|
|
const v0, 0x7f07006e
|
|
|
|
|
|
|
|
invoke-virtual {p2, v0}, Landroid/content/res/Resources;->getDimensionPixelSize(I)I
|
|
|
|
|
|
|
|
move-result p2
|
|
|
|
|
|
|
|
iput p2, p0, Lcom/discord/widgets/chat/input/emoji/WidgetChatInputEmojiAdapter;->emojiSizePx:I
|
|
|
|
|
2020-07-08 16:44:49 +00:00
|
|
|
sget-object p2, Lcom/discord/widgets/chat/input/emoji/WidgetChatInputEmojiAdapter;->Companion:Lcom/discord/widgets/chat/input/emoji/WidgetChatInputEmojiAdapter$Companion;
|
|
|
|
|
2020-05-17 12:40:10 +00:00
|
|
|
invoke-virtual {p1}, Landroid/view/ViewGroup;->getResources()Landroid/content/res/Resources;
|
|
|
|
|
2020-07-08 16:44:49 +00:00
|
|
|
move-result-object v0
|
|
|
|
|
|
|
|
const-string v1, "recycler.resources"
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-07-08 16:44:49 +00:00
|
|
|
invoke-static {v0, v1}, Lj0/n/c/h;->checkExpressionValueIsNotNull(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
|
|
|
|
invoke-static {p2, v0}, Lcom/discord/widgets/chat/input/emoji/WidgetChatInputEmojiAdapter$Companion;->access$calculateNumOfColumns(Lcom/discord/widgets/chat/input/emoji/WidgetChatInputEmojiAdapter$Companion;Landroid/content/res/Resources;)I
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
move-result p2
|
|
|
|
|
|
|
|
iput p2, p0, Lcom/discord/widgets/chat/input/emoji/WidgetChatInputEmojiAdapter;->numColumns:I
|
|
|
|
|
|
|
|
new-instance p2, Landroidx/recyclerview/widget/GridLayoutManager;
|
|
|
|
|
|
|
|
invoke-virtual {p1}, Landroid/view/ViewGroup;->getContext()Landroid/content/Context;
|
|
|
|
|
|
|
|
move-result-object v0
|
|
|
|
|
|
|
|
iget v1, p0, Lcom/discord/widgets/chat/input/emoji/WidgetChatInputEmojiAdapter;->numColumns:I
|
|
|
|
|
|
|
|
invoke-direct {p2, v0, v1}, Landroidx/recyclerview/widget/GridLayoutManager;-><init>(Landroid/content/Context;I)V
|
|
|
|
|
|
|
|
iput-object p2, p0, Lcom/discord/widgets/chat/input/emoji/WidgetChatInputEmojiAdapter;->layoutManager:Landroidx/recyclerview/widget/GridLayoutManager;
|
|
|
|
|
|
|
|
new-instance v0, Lcom/discord/widgets/chat/input/emoji/WidgetChatInputEmojiAdapter$1;
|
|
|
|
|
|
|
|
invoke-direct {v0, p0}, Lcom/discord/widgets/chat/input/emoji/WidgetChatInputEmojiAdapter$1;-><init>(Lcom/discord/widgets/chat/input/emoji/WidgetChatInputEmojiAdapter;)V
|
|
|
|
|
|
|
|
invoke-virtual {p2, v0}, Landroidx/recyclerview/widget/GridLayoutManager;->setSpanSizeLookup(Landroidx/recyclerview/widget/GridLayoutManager$SpanSizeLookup;)V
|
|
|
|
|
|
|
|
iget-object p2, p0, Lcom/discord/widgets/chat/input/emoji/WidgetChatInputEmojiAdapter;->layoutManager:Landroidx/recyclerview/widget/GridLayoutManager;
|
|
|
|
|
|
|
|
invoke-virtual {p1, p2}, Landroidx/recyclerview/widget/RecyclerView;->setLayoutManager(Landroidx/recyclerview/widget/RecyclerView$LayoutManager;)V
|
|
|
|
|
|
|
|
invoke-virtual {p1, p0}, Landroidx/recyclerview/widget/RecyclerView;->setAdapter(Landroidx/recyclerview/widget/RecyclerView$Adapter;)V
|
|
|
|
|
|
|
|
invoke-direct {p0}, Lcom/discord/widgets/chat/input/emoji/WidgetChatInputEmojiAdapter;->setupScrollObservables()V
|
|
|
|
|
|
|
|
return-void
|
2020-07-08 16:44:49 +00:00
|
|
|
|
|
|
|
:cond_0
|
|
|
|
const-string p1, "onEmojiSelectedListener"
|
|
|
|
|
|
|
|
invoke-static {p1}, Lj0/n/c/h;->c(Ljava/lang/String;)V
|
|
|
|
|
|
|
|
throw v0
|
|
|
|
|
|
|
|
:cond_1
|
|
|
|
const-string p1, "recycler"
|
|
|
|
|
|
|
|
invoke-static {p1}, Lj0/n/c/h;->c(Ljava/lang/String;)V
|
|
|
|
|
|
|
|
throw v0
|
2020-05-17 12:40:10 +00:00
|
|
|
.end method
|
|
|
|
|
2020-07-08 16:44:49 +00:00
|
|
|
.method public static final synthetic access$getEmojiSizePx$p(Lcom/discord/widgets/chat/input/emoji/WidgetChatInputEmojiAdapter;)I
|
2020-05-17 12:40:10 +00:00
|
|
|
.locals 0
|
|
|
|
|
2020-07-08 16:44:49 +00:00
|
|
|
iget p0, p0, Lcom/discord/widgets/chat/input/emoji/WidgetChatInputEmojiAdapter;->emojiSizePx:I
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
return p0
|
|
|
|
.end method
|
|
|
|
|
2020-07-08 16:44:49 +00:00
|
|
|
.method public static final synthetic access$getLayoutManager$p(Lcom/discord/widgets/chat/input/emoji/WidgetChatInputEmojiAdapter;)Landroidx/recyclerview/widget/GridLayoutManager;
|
2020-05-17 12:40:10 +00:00
|
|
|
.locals 0
|
|
|
|
|
2020-07-08 16:44:49 +00:00
|
|
|
iget-object p0, p0, Lcom/discord/widgets/chat/input/emoji/WidgetChatInputEmojiAdapter;->layoutManager:Landroidx/recyclerview/widget/GridLayoutManager;
|
|
|
|
|
|
|
|
return-object p0
|
|
|
|
.end method
|
|
|
|
|
|
|
|
.method public static final synthetic access$getNumColumns$p(Lcom/discord/widgets/chat/input/emoji/WidgetChatInputEmojiAdapter;)I
|
|
|
|
.locals 0
|
|
|
|
|
|
|
|
iget p0, p0, Lcom/discord/widgets/chat/input/emoji/WidgetChatInputEmojiAdapter;->numColumns:I
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
return p0
|
|
|
|
.end method
|
|
|
|
|
2020-07-08 16:44:49 +00:00
|
|
|
.method public static final synthetic access$getOnEmojiSelectedListener$p(Lcom/discord/widgets/chat/input/emoji/WidgetChatInputEmojiAdapter;)Lcom/discord/widgets/chat/input/emoji/OnEmojiSelectedListener;
|
2020-05-17 12:40:10 +00:00
|
|
|
.locals 0
|
|
|
|
|
|
|
|
iget-object p0, p0, Lcom/discord/widgets/chat/input/emoji/WidgetChatInputEmojiAdapter;->onEmojiSelectedListener:Lcom/discord/widgets/chat/input/emoji/OnEmojiSelectedListener;
|
|
|
|
|
|
|
|
return-object p0
|
|
|
|
.end method
|
|
|
|
|
2020-07-08 16:44:49 +00:00
|
|
|
.method public static final synthetic access$getOnScrollListener$p(Lcom/discord/widgets/chat/input/emoji/WidgetChatInputEmojiAdapter;)Landroidx/recyclerview/widget/RecyclerView$OnScrollListener;
|
|
|
|
.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/emoji/WidgetChatInputEmojiAdapter;->onScrollListener:Landroidx/recyclerview/widget/RecyclerView$OnScrollListener;
|
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$getOnScrollPositionListener$p(Lcom/discord/widgets/chat/input/emoji/WidgetChatInputEmojiAdapter;)Lkotlin/jvm/functions/Function1;
|
|
|
|
.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/emoji/WidgetChatInputEmojiAdapter;->onScrollPositionListener:Lkotlin/jvm/functions/Function1;
|
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$setOnScrollListener$p(Lcom/discord/widgets/chat/input/emoji/WidgetChatInputEmojiAdapter;Landroidx/recyclerview/widget/RecyclerView$OnScrollListener;)V
|
|
|
|
.locals 0
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-07-08 16:44:49 +00:00
|
|
|
iput-object p1, p0, Lcom/discord/widgets/chat/input/emoji/WidgetChatInputEmojiAdapter;->onScrollListener:Landroidx/recyclerview/widget/RecyclerView$OnScrollListener;
|
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-07-08 16:44:49 +00:00
|
|
|
.method public static final synthetic access$setOnScrollPositionListener$p(Lcom/discord/widgets/chat/input/emoji/WidgetChatInputEmojiAdapter;Lkotlin/jvm/functions/Function1;)V
|
|
|
|
.locals 0
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-07-08 16:44:49 +00:00
|
|
|
iput-object p1, p0, Lcom/discord/widgets/chat/input/emoji/WidgetChatInputEmojiAdapter;->onScrollPositionListener:Lkotlin/jvm/functions/Function1;
|
|
|
|
|
|
|
|
return-void
|
2020-05-17 12:40:10 +00:00
|
|
|
.end method
|
|
|
|
|
2020-07-08 16:44:49 +00:00
|
|
|
.method private final setupScrollObservables()V
|
|
|
|
.locals 11
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-07-08 16:44:49 +00:00
|
|
|
new-instance v0, Lcom/discord/widgets/chat/input/emoji/WidgetChatInputEmojiAdapter$setupScrollObservables$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/emoji/WidgetChatInputEmojiAdapter$setupScrollObservables$1;-><init>(Lcom/discord/widgets/chat/input/emoji/WidgetChatInputEmojiAdapter;)V
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
sget-object v1, Lrx/Emitter$BackpressureMode;->h:Lrx/Emitter$BackpressureMode;
|
|
|
|
|
2020-07-08 16:44:49 +00:00
|
|
|
invoke-static {v0, v1}, Lrx/Observable;->n(Lrx/functions/Action1;Lrx/Emitter$BackpressureMode;)Lrx/Observable;
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
move-result-object v0
|
|
|
|
|
|
|
|
new-instance v1, Lcom/discord/utilities/rx/LeadingEdgeThrottle;
|
|
|
|
|
|
|
|
sget-object v2, Ljava/util/concurrent/TimeUnit;->MILLISECONDS:Ljava/util/concurrent/TimeUnit;
|
|
|
|
|
|
|
|
const-wide/16 v3, 0xfa
|
|
|
|
|
|
|
|
invoke-direct {v1, v3, v4, v2}, Lcom/discord/utilities/rx/LeadingEdgeThrottle;-><init>(JLjava/util/concurrent/TimeUnit;)V
|
|
|
|
|
2020-07-08 16:44:49 +00:00
|
|
|
new-instance v2, Lr0/l/a/u;
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-07-08 16:44:49 +00:00
|
|
|
iget-object v0, v0, Lrx/Observable;->d:Lrx/Observable$a;
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-07-08 16:44:49 +00:00
|
|
|
invoke-direct {v2, v0, v1}, Lr0/l/a/u;-><init>(Lrx/Observable$a;Lrx/Observable$b;)V
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-07-08 16:44:49 +00:00
|
|
|
invoke-static {v2}, Lrx/Observable;->b0(Lrx/Observable$a;)Lrx/Observable;
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
move-result-object v0
|
|
|
|
|
2020-07-08 16:44:49 +00:00
|
|
|
const-string v1, "Observable\n .crea\u2026, TimeUnit.MILLISECONDS))"
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-07-08 16:44:49 +00:00
|
|
|
invoke-static {v0, v1}, Lj0/n/c/h;->checkExpressionValueIsNotNull(Ljava/lang/Object;Ljava/lang/String;)V
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-07-08 16:44:49 +00:00
|
|
|
invoke-static {v0}, Lcom/discord/utilities/rx/ObservableExtensionsKt;->ui(Lrx/Observable;)Lrx/Observable;
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-07-08 16:44:49 +00:00
|
|
|
move-result-object v2
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-07-08 16:44:49 +00:00
|
|
|
const-class v3, Lcom/discord/widgets/chat/input/emoji/WidgetChatInputEmojiAdapter;
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-07-08 16:44:49 +00:00
|
|
|
const/4 v4, 0x0
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-07-08 16:44:49 +00:00
|
|
|
const/4 v5, 0x0
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-07-08 16:44:49 +00:00
|
|
|
const/4 v6, 0x0
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-07-08 16:44:49 +00:00
|
|
|
const/4 v7, 0x0
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-07-08 16:44:49 +00:00
|
|
|
new-instance v8, Lcom/discord/widgets/chat/input/emoji/WidgetChatInputEmojiAdapter$setupScrollObservables$2;
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-07-08 16:44:49 +00:00
|
|
|
invoke-direct {v8, p0}, Lcom/discord/widgets/chat/input/emoji/WidgetChatInputEmojiAdapter$setupScrollObservables$2;-><init>(Lcom/discord/widgets/chat/input/emoji/WidgetChatInputEmojiAdapter;)V
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-07-08 16:44:49 +00:00
|
|
|
const/16 v9, 0x1e
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-07-08 16:44:49 +00:00
|
|
|
const/4 v10, 0x0
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-07-08 16:44:49 +00:00
|
|
|
invoke-static/range {v2 .. v10}, Lcom/discord/utilities/rx/ObservableExtensionsKt;->appSubscribe$default(Lrx/Observable;Ljava/lang/Class;Landroid/content/Context;Lkotlin/jvm/functions/Function1;Lkotlin/jvm/functions/Function1;Lkotlin/jvm/functions/Function0;Lkotlin/jvm/functions/Function1;ILjava/lang/Object;)V
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-07-08 16:44:49 +00:00
|
|
|
iget-object v0, p0, Lcom/discord/widgets/chat/input/emoji/WidgetChatInputEmojiAdapter;->onScrollListener:Landroidx/recyclerview/widget/RecyclerView$OnScrollListener;
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-07-08 16:44:49 +00:00
|
|
|
if-eqz v0, :cond_0
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-07-08 16:44:49 +00:00
|
|
|
invoke-virtual {p0}, Lcom/discord/utilities/mg_recycler/MGRecyclerAdapter;->getRecycler()Landroidx/recyclerview/widget/RecyclerView;
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-07-08 16:44:49 +00:00
|
|
|
move-result-object v1
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-07-08 16:44:49 +00:00
|
|
|
invoke-virtual {v1, v0}, Landroidx/recyclerview/widget/RecyclerView;->addOnScrollListener(Landroidx/recyclerview/widget/RecyclerView$OnScrollListener;)V
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
:cond_0
|
|
|
|
return-void
|
|
|
|
.end method
|
|
|
|
|
|
|
|
|
2020-07-08 16:44:49 +00:00
|
|
|
# virtual methods
|
2020-05-17 12:40:10 +00:00
|
|
|
.method public bridge synthetic onCreateViewHolder(Landroid/view/ViewGroup;I)Landroidx/recyclerview/widget/RecyclerView$ViewHolder;
|
|
|
|
.locals 0
|
|
|
|
|
|
|
|
invoke-virtual {p0, p1, p2}, Lcom/discord/widgets/chat/input/emoji/WidgetChatInputEmojiAdapter;->onCreateViewHolder(Landroid/view/ViewGroup;I)Lcom/discord/utilities/mg_recycler/MGRecyclerViewHolder;
|
|
|
|
|
|
|
|
move-result-object p1
|
|
|
|
|
|
|
|
return-object p1
|
|
|
|
.end method
|
|
|
|
|
|
|
|
.method public onCreateViewHolder(Landroid/view/ViewGroup;I)Lcom/discord/utilities/mg_recycler/MGRecyclerViewHolder;
|
|
|
|
.locals 0
|
|
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
|
|
value = {
|
|
|
|
"(",
|
|
|
|
"Landroid/view/ViewGroup;",
|
|
|
|
"I)",
|
|
|
|
"Lcom/discord/utilities/mg_recycler/MGRecyclerViewHolder<",
|
2020-07-08 16:44:49 +00:00
|
|
|
"Lcom/discord/widgets/chat/input/emoji/WidgetChatInputEmojiAdapter;",
|
2020-05-17 12:40:10 +00:00
|
|
|
"Lcom/discord/utilities/mg_recycler/MGRecyclerDataPayload;",
|
|
|
|
">;"
|
|
|
|
}
|
|
|
|
.end annotation
|
|
|
|
|
2020-07-08 16:44:49 +00:00
|
|
|
if-eqz p1, :cond_2
|
|
|
|
|
2020-05-17 12:40:10 +00:00
|
|
|
if-eqz p2, :cond_1
|
|
|
|
|
|
|
|
const/4 p1, 0x1
|
|
|
|
|
|
|
|
if-ne p2, p1, :cond_0
|
|
|
|
|
|
|
|
new-instance p1, Lcom/discord/widgets/chat/input/emoji/WidgetChatInputEmojiAdapter$EmojiViewHolder;
|
|
|
|
|
|
|
|
invoke-direct {p1, p0}, Lcom/discord/widgets/chat/input/emoji/WidgetChatInputEmojiAdapter$EmojiViewHolder;-><init>(Lcom/discord/widgets/chat/input/emoji/WidgetChatInputEmojiAdapter;)V
|
|
|
|
|
2020-07-08 16:44:49 +00:00
|
|
|
goto :goto_0
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
:cond_0
|
|
|
|
invoke-virtual {p0, p2}, Lcom/discord/utilities/mg_recycler/MGRecyclerAdapter;->invalidViewTypeException(I)Ljava/lang/IllegalArgumentException;
|
|
|
|
|
|
|
|
move-result-object p1
|
|
|
|
|
|
|
|
throw p1
|
|
|
|
|
|
|
|
:cond_1
|
|
|
|
new-instance p1, Lcom/discord/widgets/chat/input/emoji/WidgetChatInputEmojiAdapter$HeaderViewHolder;
|
|
|
|
|
|
|
|
invoke-direct {p1, p0}, Lcom/discord/widgets/chat/input/emoji/WidgetChatInputEmojiAdapter$HeaderViewHolder;-><init>(Lcom/discord/widgets/chat/input/emoji/WidgetChatInputEmojiAdapter;)V
|
|
|
|
|
2020-07-08 16:44:49 +00:00
|
|
|
:goto_0
|
2020-05-17 12:40:10 +00:00
|
|
|
return-object p1
|
2020-07-08 16:44:49 +00:00
|
|
|
|
|
|
|
:cond_2
|
|
|
|
const-string p1, "parent"
|
|
|
|
|
|
|
|
invoke-static {p1}, Lj0/n/c/h;->c(Ljava/lang/String;)V
|
|
|
|
|
|
|
|
const/4 p1, 0x0
|
|
|
|
|
|
|
|
throw p1
|
2020-05-17 12:40:10 +00:00
|
|
|
.end method
|
|
|
|
|
2020-07-08 16:44:49 +00:00
|
|
|
.method public final scrollToPosition(I)V
|
2020-05-17 12:40:10 +00:00
|
|
|
.locals 2
|
|
|
|
|
|
|
|
iget-object v0, p0, Lcom/discord/widgets/chat/input/emoji/WidgetChatInputEmojiAdapter;->onScrollListener:Landroidx/recyclerview/widget/RecyclerView$OnScrollListener;
|
|
|
|
|
|
|
|
if-eqz v0, :cond_0
|
|
|
|
|
|
|
|
invoke-virtual {p0}, Lcom/discord/utilities/mg_recycler/MGRecyclerAdapter;->getRecycler()Landroidx/recyclerview/widget/RecyclerView;
|
|
|
|
|
2020-07-08 16:44:49 +00:00
|
|
|
move-result-object v1
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-07-08 16:44:49 +00:00
|
|
|
invoke-virtual {v1, v0}, Landroidx/recyclerview/widget/RecyclerView;->removeOnScrollListener(Landroidx/recyclerview/widget/RecyclerView$OnScrollListener;)V
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
:cond_0
|
|
|
|
iget-object v0, p0, Lcom/discord/widgets/chat/input/emoji/WidgetChatInputEmojiAdapter;->layoutManager:Landroidx/recyclerview/widget/GridLayoutManager;
|
|
|
|
|
|
|
|
const/4 v1, 0x0
|
|
|
|
|
|
|
|
invoke-virtual {v0, p1, v1}, Landroidx/recyclerview/widget/LinearLayoutManager;->scrollToPositionWithOffset(II)V
|
|
|
|
|
2020-07-08 16:44:49 +00:00
|
|
|
iget-object p1, p0, Lcom/discord/widgets/chat/input/emoji/WidgetChatInputEmojiAdapter;->onScrollListener:Landroidx/recyclerview/widget/RecyclerView$OnScrollListener;
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-07-08 16:44:49 +00:00
|
|
|
if-eqz p1, :cond_1
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-07-08 16:44:49 +00:00
|
|
|
invoke-virtual {p0}, Lcom/discord/utilities/mg_recycler/MGRecyclerAdapter;->getRecycler()Landroidx/recyclerview/widget/RecyclerView;
|
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-07-08 16:44:49 +00:00
|
|
|
invoke-virtual {v0, p1}, Landroidx/recyclerview/widget/RecyclerView;->addOnScrollListener(Landroidx/recyclerview/widget/RecyclerView$OnScrollListener;)V
|
|
|
|
|
|
|
|
:cond_1
|
2020-05-17 12:40:10 +00:00
|
|
|
return-void
|
|
|
|
.end method
|
|
|
|
|
2020-07-08 16:44:49 +00:00
|
|
|
.method public final setOnScrollPositionListener(Lkotlin/jvm/functions/Function1;)V
|
2020-05-17 12:40:10 +00:00
|
|
|
.locals 0
|
|
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
|
|
value = {
|
|
|
|
"(",
|
2020-07-08 16:44:49 +00:00
|
|
|
"Lkotlin/jvm/functions/Function1<",
|
|
|
|
"-",
|
2020-05-17 12:40:10 +00:00
|
|
|
"Ljava/lang/Integer;",
|
2020-07-08 16:44:49 +00:00
|
|
|
"Lkotlin/Unit;",
|
2020-05-17 12:40:10 +00:00
|
|
|
">;)V"
|
|
|
|
}
|
|
|
|
.end annotation
|
|
|
|
|
2020-07-08 16:44:49 +00:00
|
|
|
if-eqz p1, :cond_0
|
|
|
|
|
|
|
|
iput-object p1, p0, Lcom/discord/widgets/chat/input/emoji/WidgetChatInputEmojiAdapter;->onScrollPositionListener:Lkotlin/jvm/functions/Function1;
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
return-void
|
2020-07-08 16:44:49 +00:00
|
|
|
|
|
|
|
:cond_0
|
|
|
|
const-string p1, "onScrollPositionListener"
|
|
|
|
|
|
|
|
invoke-static {p1}, Lj0/n/c/h;->c(Ljava/lang/String;)V
|
|
|
|
|
|
|
|
const/4 p1, 0x0
|
|
|
|
|
|
|
|
throw p1
|
2020-05-17 12:40:10 +00:00
|
|
|
.end method
|