2020-05-17 12:40:10 +00:00
|
|
|
.class public final Lcom/discord/widgets/servers/NotificationsOverridesAdapter;
|
|
|
|
.super Landroidx/recyclerview/widget/RecyclerView$Adapter;
|
|
|
|
.source "NotificationsOverridesAdapter.kt"
|
|
|
|
|
|
|
|
|
|
|
|
# annotations
|
|
|
|
.annotation system Ldalvik/annotation/MemberClasses;
|
|
|
|
value = {
|
|
|
|
Lcom/discord/widgets/servers/NotificationsOverridesAdapter$Item;,
|
|
|
|
Lcom/discord/widgets/servers/NotificationsOverridesAdapter$DiffCallback;,
|
|
|
|
Lcom/discord/widgets/servers/NotificationsOverridesAdapter$ViewHolder;
|
|
|
|
}
|
|
|
|
.end annotation
|
|
|
|
|
|
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
|
|
value = {
|
|
|
|
"Landroidx/recyclerview/widget/RecyclerView$Adapter<",
|
|
|
|
"Lcom/discord/widgets/servers/NotificationsOverridesAdapter$ViewHolder;",
|
|
|
|
">;"
|
|
|
|
}
|
|
|
|
.end annotation
|
|
|
|
|
|
|
|
|
|
|
|
# instance fields
|
|
|
|
.field public data:Ljava/util/List;
|
|
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
|
|
value = {
|
|
|
|
"Ljava/util/List<",
|
|
|
|
"Lcom/discord/widgets/servers/NotificationsOverridesAdapter$Item;",
|
|
|
|
">;"
|
|
|
|
}
|
|
|
|
.end annotation
|
|
|
|
.end field
|
|
|
|
|
|
|
|
.field public final onClick:Lkotlin/jvm/functions/Function2;
|
|
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
|
|
value = {
|
|
|
|
"Lkotlin/jvm/functions/Function2<",
|
|
|
|
"Landroid/view/View;",
|
|
|
|
"Lcom/discord/widgets/servers/NotificationsOverridesAdapter$Item;",
|
|
|
|
"Lkotlin/Unit;",
|
|
|
|
">;"
|
|
|
|
}
|
|
|
|
.end annotation
|
|
|
|
.end field
|
|
|
|
|
|
|
|
|
|
|
|
# direct methods
|
|
|
|
.method public constructor <init>(Lkotlin/jvm/functions/Function2;)V
|
2020-09-16 23:45:23 +00:00
|
|
|
.locals 1
|
2020-05-17 12:40:10 +00:00
|
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
|
|
value = {
|
|
|
|
"(",
|
|
|
|
"Lkotlin/jvm/functions/Function2<",
|
|
|
|
"-",
|
|
|
|
"Landroid/view/View;",
|
|
|
|
"-",
|
|
|
|
"Lcom/discord/widgets/servers/NotificationsOverridesAdapter$Item;",
|
|
|
|
"Lkotlin/Unit;",
|
|
|
|
">;)V"
|
|
|
|
}
|
|
|
|
.end annotation
|
|
|
|
|
2020-09-16 23:45:23 +00:00
|
|
|
const-string v0, "onClick"
|
|
|
|
|
2020-09-22 06:09:03 +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
|
|
|
|
|
|
|
invoke-direct {p0}, Landroidx/recyclerview/widget/RecyclerView$Adapter;-><init>()V
|
|
|
|
|
|
|
|
iput-object p1, p0, Lcom/discord/widgets/servers/NotificationsOverridesAdapter;->onClick:Lkotlin/jvm/functions/Function2;
|
|
|
|
|
2020-09-22 06:09:03 +00:00
|
|
|
sget-object p1, Lk0/i/l;->d:Lk0/i/l;
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
iput-object p1, p0, Lcom/discord/widgets/servers/NotificationsOverridesAdapter;->data:Ljava/util/List;
|
|
|
|
|
|
|
|
return-void
|
|
|
|
.end method
|
|
|
|
|
|
|
|
|
|
|
|
# virtual methods
|
|
|
|
.method public final getData()Ljava/util/List;
|
|
|
|
.locals 1
|
|
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
|
|
value = {
|
|
|
|
"()",
|
|
|
|
"Ljava/util/List<",
|
|
|
|
"Lcom/discord/widgets/servers/NotificationsOverridesAdapter$Item;",
|
|
|
|
">;"
|
|
|
|
}
|
|
|
|
.end annotation
|
|
|
|
|
|
|
|
iget-object v0, p0, Lcom/discord/widgets/servers/NotificationsOverridesAdapter;->data:Ljava/util/List;
|
|
|
|
|
|
|
|
return-object v0
|
|
|
|
.end method
|
|
|
|
|
|
|
|
.method public getItemCount()I
|
|
|
|
.locals 1
|
|
|
|
|
|
|
|
iget-object v0, p0, Lcom/discord/widgets/servers/NotificationsOverridesAdapter;->data:Ljava/util/List;
|
|
|
|
|
|
|
|
invoke-interface {v0}, Ljava/util/List;->size()I
|
|
|
|
|
|
|
|
move-result v0
|
|
|
|
|
|
|
|
return v0
|
|
|
|
.end method
|
|
|
|
|
|
|
|
.method public getItemViewType(I)I
|
|
|
|
.locals 1
|
|
|
|
|
|
|
|
iget-object v0, p0, Lcom/discord/widgets/servers/NotificationsOverridesAdapter;->data:Ljava/util/List;
|
|
|
|
|
|
|
|
invoke-interface {v0, p1}, Ljava/util/List;->get(I)Ljava/lang/Object;
|
|
|
|
|
|
|
|
move-result-object p1
|
|
|
|
|
|
|
|
check-cast p1, Lcom/discord/widgets/servers/NotificationsOverridesAdapter$Item;
|
|
|
|
|
|
|
|
invoke-virtual {p1}, Lcom/discord/widgets/servers/NotificationsOverridesAdapter$Item;->getChannel()Lcom/discord/models/domain/ModelChannel;
|
|
|
|
|
|
|
|
move-result-object p1
|
|
|
|
|
|
|
|
invoke-virtual {p1}, Lcom/discord/models/domain/ModelChannel;->getType()I
|
|
|
|
|
|
|
|
move-result p1
|
|
|
|
|
|
|
|
return p1
|
|
|
|
.end method
|
|
|
|
|
|
|
|
.method public final getOnClick()Lkotlin/jvm/functions/Function2;
|
|
|
|
.locals 1
|
|
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
|
|
value = {
|
|
|
|
"()",
|
|
|
|
"Lkotlin/jvm/functions/Function2<",
|
|
|
|
"Landroid/view/View;",
|
|
|
|
"Lcom/discord/widgets/servers/NotificationsOverridesAdapter$Item;",
|
|
|
|
"Lkotlin/Unit;",
|
|
|
|
">;"
|
|
|
|
}
|
|
|
|
.end annotation
|
|
|
|
|
|
|
|
iget-object v0, p0, Lcom/discord/widgets/servers/NotificationsOverridesAdapter;->onClick:Lkotlin/jvm/functions/Function2;
|
|
|
|
|
|
|
|
return-object v0
|
|
|
|
.end method
|
|
|
|
|
|
|
|
.method public bridge synthetic onBindViewHolder(Landroidx/recyclerview/widget/RecyclerView$ViewHolder;I)V
|
|
|
|
.locals 0
|
|
|
|
|
|
|
|
check-cast p1, Lcom/discord/widgets/servers/NotificationsOverridesAdapter$ViewHolder;
|
|
|
|
|
|
|
|
invoke-virtual {p0, p1, p2}, Lcom/discord/widgets/servers/NotificationsOverridesAdapter;->onBindViewHolder(Lcom/discord/widgets/servers/NotificationsOverridesAdapter$ViewHolder;I)V
|
|
|
|
|
|
|
|
return-void
|
|
|
|
.end method
|
|
|
|
|
|
|
|
.method public onBindViewHolder(Lcom/discord/widgets/servers/NotificationsOverridesAdapter$ViewHolder;I)V
|
|
|
|
.locals 1
|
|
|
|
|
2020-09-16 23:45:23 +00:00
|
|
|
const-string v0, "holder"
|
|
|
|
|
2020-09-22 06:09:03 +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
|
|
|
|
|
|
|
iget-object v0, p0, Lcom/discord/widgets/servers/NotificationsOverridesAdapter;->data:Ljava/util/List;
|
|
|
|
|
|
|
|
invoke-interface {v0, p2}, Ljava/util/List;->get(I)Ljava/lang/Object;
|
|
|
|
|
|
|
|
move-result-object p2
|
|
|
|
|
|
|
|
check-cast p2, Lcom/discord/widgets/servers/NotificationsOverridesAdapter$Item;
|
|
|
|
|
|
|
|
invoke-virtual {p1, p2}, Lcom/discord/widgets/servers/NotificationsOverridesAdapter$ViewHolder;->onBind(Lcom/discord/widgets/servers/NotificationsOverridesAdapter$Item;)V
|
|
|
|
|
|
|
|
return-void
|
|
|
|
.end method
|
|
|
|
|
|
|
|
.method public bridge synthetic onCreateViewHolder(Landroid/view/ViewGroup;I)Landroidx/recyclerview/widget/RecyclerView$ViewHolder;
|
|
|
|
.locals 0
|
|
|
|
|
|
|
|
invoke-virtual {p0, p1, p2}, Lcom/discord/widgets/servers/NotificationsOverridesAdapter;->onCreateViewHolder(Landroid/view/ViewGroup;I)Lcom/discord/widgets/servers/NotificationsOverridesAdapter$ViewHolder;
|
|
|
|
|
|
|
|
move-result-object p1
|
|
|
|
|
|
|
|
return-object p1
|
|
|
|
.end method
|
|
|
|
|
|
|
|
.method public onCreateViewHolder(Landroid/view/ViewGroup;I)Lcom/discord/widgets/servers/NotificationsOverridesAdapter$ViewHolder;
|
|
|
|
.locals 4
|
|
|
|
|
2020-09-16 23:45:23 +00:00
|
|
|
const-string v0, "parent"
|
|
|
|
|
2020-09-22 06:09:03 +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
|
|
|
|
|
|
|
invoke-virtual {p1}, Landroid/view/ViewGroup;->getContext()Landroid/content/Context;
|
|
|
|
|
|
|
|
move-result-object v0
|
|
|
|
|
|
|
|
invoke-static {v0}, Landroid/view/LayoutInflater;->from(Landroid/content/Context;)Landroid/view/LayoutInflater;
|
|
|
|
|
|
|
|
move-result-object v0
|
|
|
|
|
|
|
|
const-string v1, "inflater.inflate(R.layou\u2026ride_item, parent, false)"
|
|
|
|
|
|
|
|
const/4 v2, 0x0
|
|
|
|
|
|
|
|
if-eqz p2, :cond_2
|
|
|
|
|
|
|
|
const/4 v3, 0x4
|
|
|
|
|
|
|
|
if-eq p2, v3, :cond_1
|
|
|
|
|
|
|
|
const/4 v3, 0x5
|
|
|
|
|
|
|
|
if-ne p2, v3, :cond_0
|
|
|
|
|
|
|
|
goto :goto_0
|
|
|
|
|
|
|
|
:cond_0
|
|
|
|
const-string p1, "Type["
|
|
|
|
|
|
|
|
const-string v0, "] not implemented"
|
|
|
|
|
2020-09-16 23:45:23 +00:00
|
|
|
invoke-static {p1, p2, v0}, Lf/e/b/a/a;->j(Ljava/lang/String;ILjava/lang/String;)Ljava/lang/String;
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
move-result-object p1
|
|
|
|
|
2020-09-22 06:09:03 +00:00
|
|
|
new-instance p2, Lk0/c;
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
const-string v0, "An operation is not implemented: "
|
|
|
|
|
2020-09-16 23:45:23 +00:00
|
|
|
invoke-static {v0, p1}, Lf/e/b/a/a;->q(Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
move-result-object p1
|
|
|
|
|
2020-09-22 06:09:03 +00:00
|
|
|
invoke-direct {p2, p1}, Lk0/c;-><init>(Ljava/lang/String;)V
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
throw p2
|
|
|
|
|
|
|
|
:cond_1
|
|
|
|
new-instance p2, Lcom/discord/widgets/servers/NotificationsOverridesAdapter$ViewHolder$CategoryOverridesViewHolder;
|
|
|
|
|
2020-09-22 06:09:03 +00:00
|
|
|
const v3, 0x7f0d0110
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
invoke-virtual {v0, v3, p1, v2}, Landroid/view/LayoutInflater;->inflate(ILandroid/view/ViewGroup;Z)Landroid/view/View;
|
|
|
|
|
|
|
|
move-result-object p1
|
|
|
|
|
2020-09-22 06:09:03 +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
|
|
|
|
|
|
|
iget-object v0, p0, Lcom/discord/widgets/servers/NotificationsOverridesAdapter;->onClick:Lkotlin/jvm/functions/Function2;
|
|
|
|
|
|
|
|
invoke-direct {p2, p1, v0}, Lcom/discord/widgets/servers/NotificationsOverridesAdapter$ViewHolder$CategoryOverridesViewHolder;-><init>(Landroid/view/View;Lkotlin/jvm/functions/Function2;)V
|
|
|
|
|
|
|
|
goto :goto_1
|
|
|
|
|
|
|
|
:cond_2
|
|
|
|
:goto_0
|
|
|
|
new-instance p2, Lcom/discord/widgets/servers/NotificationsOverridesAdapter$ViewHolder$ChannelOverridesViewHolder;
|
|
|
|
|
2020-09-22 06:09:03 +00:00
|
|
|
const v3, 0x7f0d0111
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
invoke-virtual {v0, v3, p1, v2}, Landroid/view/LayoutInflater;->inflate(ILandroid/view/ViewGroup;Z)Landroid/view/View;
|
|
|
|
|
|
|
|
move-result-object p1
|
|
|
|
|
2020-09-22 06:09:03 +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
|
|
|
|
|
|
|
iget-object v0, p0, Lcom/discord/widgets/servers/NotificationsOverridesAdapter;->onClick:Lkotlin/jvm/functions/Function2;
|
|
|
|
|
|
|
|
invoke-direct {p2, p1, v0}, Lcom/discord/widgets/servers/NotificationsOverridesAdapter$ViewHolder$ChannelOverridesViewHolder;-><init>(Landroid/view/View;Lkotlin/jvm/functions/Function2;)V
|
|
|
|
|
|
|
|
:goto_1
|
|
|
|
return-object p2
|
|
|
|
.end method
|
|
|
|
|
|
|
|
.method public final setData(Ljava/util/List;)V
|
|
|
|
.locals 2
|
|
|
|
.annotation build Landroidx/annotation/UiThread;
|
|
|
|
.end annotation
|
|
|
|
|
|
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
|
|
value = {
|
|
|
|
"(",
|
|
|
|
"Ljava/util/List<",
|
|
|
|
"Lcom/discord/widgets/servers/NotificationsOverridesAdapter$Item;",
|
|
|
|
">;)V"
|
|
|
|
}
|
|
|
|
.end annotation
|
|
|
|
|
2020-09-16 23:45:23 +00:00
|
|
|
const-string v0, "value"
|
|
|
|
|
2020-09-22 06:09:03 +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
|
|
|
|
|
|
|
new-instance v0, Lcom/discord/widgets/servers/NotificationsOverridesAdapter$DiffCallback;
|
|
|
|
|
|
|
|
iget-object v1, p0, Lcom/discord/widgets/servers/NotificationsOverridesAdapter;->data:Ljava/util/List;
|
|
|
|
|
|
|
|
invoke-direct {v0, p1, v1}, Lcom/discord/widgets/servers/NotificationsOverridesAdapter$DiffCallback;-><init>(Ljava/util/List;Ljava/util/List;)V
|
|
|
|
|
|
|
|
const/4 v1, 0x1
|
|
|
|
|
|
|
|
invoke-static {v0, v1}, Landroidx/recyclerview/widget/DiffUtil;->calculateDiff(Landroidx/recyclerview/widget/DiffUtil$Callback;Z)Landroidx/recyclerview/widget/DiffUtil$DiffResult;
|
|
|
|
|
|
|
|
move-result-object v0
|
|
|
|
|
|
|
|
const-string v1, "DiffUtil.calculateDiff(D\u2026back(value, field), true)"
|
|
|
|
|
2020-09-22 06:09:03 +00:00
|
|
|
invoke-static {v0, v1}, Lk0/n/c/i;->checkNotNullExpressionValue(Ljava/lang/Object;Ljava/lang/String;)V
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
iput-object p1, p0, Lcom/discord/widgets/servers/NotificationsOverridesAdapter;->data:Ljava/util/List;
|
|
|
|
|
|
|
|
invoke-virtual {v0, p0}, Landroidx/recyclerview/widget/DiffUtil$DiffResult;->dispatchUpdatesTo(Landroidx/recyclerview/widget/RecyclerView$Adapter;)V
|
|
|
|
|
|
|
|
return-void
|
|
|
|
.end method
|