2020-05-17 12:40:10 +00:00
|
|
|
.class public final Lcom/discord/widgets/servers/SettingsChannelListAdapter;
|
|
|
|
.super Lcom/discord/utilities/mg_recycler/CategoricalDragAndDropAdapter;
|
|
|
|
.source "SettingsChannelListAdapter.kt"
|
|
|
|
|
|
|
|
|
|
|
|
# annotations
|
|
|
|
.annotation system Ldalvik/annotation/MemberClasses;
|
|
|
|
value = {
|
|
|
|
Lcom/discord/widgets/servers/SettingsChannelListAdapter$UpdatedPosition;,
|
|
|
|
Lcom/discord/widgets/servers/SettingsChannelListAdapter$ChannelItem;,
|
|
|
|
Lcom/discord/widgets/servers/SettingsChannelListAdapter$CategoryItem;,
|
|
|
|
Lcom/discord/widgets/servers/SettingsChannelListAdapter$ChannelListItem;,
|
|
|
|
Lcom/discord/widgets/servers/SettingsChannelListAdapter$CategoryListItem;,
|
|
|
|
Lcom/discord/widgets/servers/SettingsChannelListAdapter$Companion;
|
|
|
|
}
|
|
|
|
.end annotation
|
|
|
|
|
|
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
|
|
value = {
|
|
|
|
"Lcom/discord/utilities/mg_recycler/CategoricalDragAndDropAdapter<",
|
|
|
|
"Lcom/discord/utilities/mg_recycler/CategoricalDragAndDropAdapter$Payload;",
|
|
|
|
">;"
|
|
|
|
}
|
|
|
|
.end annotation
|
|
|
|
|
|
|
|
|
|
|
|
# static fields
|
|
|
|
.field public static final Companion:Lcom/discord/widgets/servers/SettingsChannelListAdapter$Companion;
|
|
|
|
|
|
|
|
.field public static final TYPE_CATEGORY:I = 0x1
|
|
|
|
|
|
|
|
.field public static final TYPE_CHANNEL:I
|
|
|
|
|
|
|
|
|
|
|
|
# instance fields
|
|
|
|
.field public onClickListener:Lkotlin/jvm/functions/Function1;
|
|
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
|
|
value = {
|
|
|
|
"Lkotlin/jvm/functions/Function1<",
|
|
|
|
"-",
|
|
|
|
"Ljava/lang/Long;",
|
|
|
|
"Lkotlin/Unit;",
|
|
|
|
">;"
|
|
|
|
}
|
|
|
|
.end annotation
|
|
|
|
.end field
|
|
|
|
|
|
|
|
.field public onPositionUpdateListener:Lkotlin/jvm/functions/Function1;
|
|
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
|
|
value = {
|
|
|
|
"Lkotlin/jvm/functions/Function1<",
|
|
|
|
"-",
|
|
|
|
"Ljava/util/Map<",
|
|
|
|
"Ljava/lang/Long;",
|
|
|
|
"Lcom/discord/widgets/servers/SettingsChannelListAdapter$UpdatedPosition;",
|
|
|
|
">;",
|
|
|
|
"Lkotlin/Unit;",
|
|
|
|
">;"
|
|
|
|
}
|
|
|
|
.end annotation
|
|
|
|
.end field
|
|
|
|
|
|
|
|
|
|
|
|
# direct methods
|
|
|
|
.method public static constructor <clinit>()V
|
|
|
|
.locals 2
|
|
|
|
|
|
|
|
new-instance v0, Lcom/discord/widgets/servers/SettingsChannelListAdapter$Companion;
|
|
|
|
|
|
|
|
const/4 v1, 0x0
|
|
|
|
|
|
|
|
invoke-direct {v0, v1}, Lcom/discord/widgets/servers/SettingsChannelListAdapter$Companion;-><init>(Lkotlin/jvm/internal/DefaultConstructorMarker;)V
|
|
|
|
|
|
|
|
sput-object v0, Lcom/discord/widgets/servers/SettingsChannelListAdapter;->Companion:Lcom/discord/widgets/servers/SettingsChannelListAdapter$Companion;
|
|
|
|
|
|
|
|
return-void
|
|
|
|
.end method
|
|
|
|
|
|
|
|
.method public constructor <init>(Landroidx/recyclerview/widget/RecyclerView;Z)V
|
|
|
|
.locals 1
|
|
|
|
|
2020-09-02 04:07:20 +00:00
|
|
|
const-string v0, "recycler"
|
|
|
|
|
|
|
|
invoke-static {p1, v0}, Lk0/o/c/i;->checkNotNullParameter(Ljava/lang/Object;Ljava/lang/String;)V
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
invoke-direct {p0, p1}, Lcom/discord/utilities/mg_recycler/CategoricalDragAndDropAdapter;-><init>(Landroidx/recyclerview/widget/RecyclerView;)V
|
|
|
|
|
|
|
|
if-eqz p2, :cond_0
|
|
|
|
|
|
|
|
new-instance p2, Lcom/discord/utilities/mg_recycler/DragAndDropHelper;
|
|
|
|
|
|
|
|
invoke-direct {p2, p0}, Lcom/discord/utilities/mg_recycler/DragAndDropHelper;-><init>(Lcom/discord/utilities/mg_recycler/DragAndDropHelper$Adapter;)V
|
|
|
|
|
|
|
|
new-instance v0, Landroidx/recyclerview/widget/ItemTouchHelper;
|
|
|
|
|
|
|
|
invoke-direct {v0, p2}, Landroidx/recyclerview/widget/ItemTouchHelper;-><init>(Landroidx/recyclerview/widget/ItemTouchHelper$Callback;)V
|
|
|
|
|
|
|
|
invoke-virtual {v0, p1}, Landroidx/recyclerview/widget/ItemTouchHelper;->attachToRecyclerView(Landroidx/recyclerview/widget/RecyclerView;)V
|
|
|
|
|
|
|
|
:cond_0
|
|
|
|
return-void
|
|
|
|
.end method
|
|
|
|
|
|
|
|
.method public synthetic constructor <init>(Landroidx/recyclerview/widget/RecyclerView;ZILkotlin/jvm/internal/DefaultConstructorMarker;)V
|
|
|
|
.locals 0
|
|
|
|
|
|
|
|
and-int/lit8 p3, p3, 0x2
|
|
|
|
|
|
|
|
if-eqz p3, :cond_0
|
|
|
|
|
|
|
|
const/4 p2, 0x1
|
|
|
|
|
|
|
|
:cond_0
|
|
|
|
invoke-direct {p0, p1, p2}, Lcom/discord/widgets/servers/SettingsChannelListAdapter;-><init>(Landroidx/recyclerview/widget/RecyclerView;Z)V
|
|
|
|
|
|
|
|
return-void
|
|
|
|
.end method
|
|
|
|
|
|
|
|
.method private final handleChangedPositions(Ljava/util/Map;Ljava/util/Map;)V
|
|
|
|
.locals 5
|
|
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
|
|
value = {
|
|
|
|
"(",
|
|
|
|
"Ljava/util/Map<",
|
|
|
|
"Ljava/lang/Long;",
|
|
|
|
"Ljava/lang/Integer;",
|
|
|
|
">;",
|
|
|
|
"Ljava/util/Map<",
|
|
|
|
"Ljava/lang/Long;",
|
|
|
|
"Ljava/lang/Long;",
|
|
|
|
">;)V"
|
|
|
|
}
|
|
|
|
.end annotation
|
|
|
|
|
|
|
|
new-instance v0, Ljava/util/HashMap;
|
|
|
|
|
|
|
|
invoke-direct {v0}, Ljava/util/HashMap;-><init>()V
|
|
|
|
|
|
|
|
invoke-interface {p1}, Ljava/util/Map;->entrySet()Ljava/util/Set;
|
|
|
|
|
|
|
|
move-result-object p1
|
|
|
|
|
|
|
|
invoke-interface {p1}, Ljava/util/Set;->iterator()Ljava/util/Iterator;
|
|
|
|
|
|
|
|
move-result-object p1
|
|
|
|
|
|
|
|
:goto_0
|
|
|
|
invoke-interface {p1}, Ljava/util/Iterator;->hasNext()Z
|
|
|
|
|
|
|
|
move-result v1
|
|
|
|
|
|
|
|
if-eqz v1, :cond_0
|
|
|
|
|
|
|
|
invoke-interface {p1}, 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, Ljava/lang/Number;
|
|
|
|
|
|
|
|
invoke-virtual {v2}, Ljava/lang/Number;->longValue()J
|
|
|
|
|
|
|
|
move-result-wide v2
|
|
|
|
|
|
|
|
invoke-interface {v1}, Ljava/util/Map$Entry;->getValue()Ljava/lang/Object;
|
|
|
|
|
|
|
|
move-result-object v1
|
|
|
|
|
|
|
|
check-cast v1, Ljava/lang/Number;
|
|
|
|
|
|
|
|
invoke-virtual {v1}, Ljava/lang/Number;->intValue()I
|
|
|
|
|
|
|
|
move-result v1
|
|
|
|
|
|
|
|
invoke-static {v2, v3}, Ljava/lang/Long;->valueOf(J)Ljava/lang/Long;
|
|
|
|
|
|
|
|
move-result-object v4
|
|
|
|
|
|
|
|
invoke-interface {p2, v4}, Ljava/util/Map;->get(Ljava/lang/Object;)Ljava/lang/Object;
|
|
|
|
|
|
|
|
move-result-object v4
|
|
|
|
|
|
|
|
check-cast v4, Ljava/lang/Long;
|
|
|
|
|
|
|
|
invoke-static {v2, v3}, Ljava/lang/Long;->valueOf(J)Ljava/lang/Long;
|
|
|
|
|
|
|
|
move-result-object v2
|
|
|
|
|
|
|
|
new-instance v3, Lcom/discord/widgets/servers/SettingsChannelListAdapter$UpdatedPosition;
|
|
|
|
|
|
|
|
invoke-direct {v3, v1, v4}, Lcom/discord/widgets/servers/SettingsChannelListAdapter$UpdatedPosition;-><init>(ILjava/lang/Long;)V
|
|
|
|
|
|
|
|
invoke-interface {v0, v2, v3}, Ljava/util/Map;->put(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
|
|
|
|
|
|
|
|
goto :goto_0
|
|
|
|
|
|
|
|
:cond_0
|
|
|
|
iget-object p1, p0, Lcom/discord/widgets/servers/SettingsChannelListAdapter;->onPositionUpdateListener:Lkotlin/jvm/functions/Function1;
|
|
|
|
|
|
|
|
if-eqz p1, :cond_1
|
|
|
|
|
|
|
|
invoke-interface {p1, v0}, Lkotlin/jvm/functions/Function1;->invoke(Ljava/lang/Object;)Ljava/lang/Object;
|
|
|
|
|
|
|
|
move-result-object p1
|
|
|
|
|
|
|
|
check-cast p1, Lkotlin/Unit;
|
|
|
|
|
|
|
|
:cond_1
|
|
|
|
return-void
|
|
|
|
.end method
|
|
|
|
|
|
|
|
|
|
|
|
# virtual methods
|
|
|
|
.method public computeChangedPositions()Ljava/util/Map;
|
|
|
|
.locals 15
|
|
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
|
|
value = {
|
|
|
|
"()",
|
|
|
|
"Ljava/util/Map<",
|
|
|
|
"Ljava/lang/String;",
|
|
|
|
"Ljava/lang/Integer;",
|
|
|
|
">;"
|
|
|
|
}
|
|
|
|
.end annotation
|
|
|
|
|
|
|
|
sget-object v0, Lcom/discord/widgets/servers/SettingsChannelListAdapter$computeChangedPositions$1;->INSTANCE:Lcom/discord/widgets/servers/SettingsChannelListAdapter$computeChangedPositions$1;
|
|
|
|
|
|
|
|
sget-object v0, Lcom/discord/widgets/servers/SettingsChannelListAdapter$computeChangedPositions$2;->INSTANCE:Lcom/discord/widgets/servers/SettingsChannelListAdapter$computeChangedPositions$2;
|
|
|
|
|
|
|
|
sget-object v0, Lcom/discord/widgets/servers/SettingsChannelListAdapter$computeChangedPositions$3;->INSTANCE:Lcom/discord/widgets/servers/SettingsChannelListAdapter$computeChangedPositions$3;
|
|
|
|
|
|
|
|
new-instance v0, Ljava/util/HashMap;
|
|
|
|
|
|
|
|
invoke-direct {v0}, Ljava/util/HashMap;-><init>()V
|
|
|
|
|
|
|
|
new-instance v1, Ljava/util/HashMap;
|
|
|
|
|
|
|
|
invoke-direct {v1}, Ljava/util/HashMap;-><init>()V
|
|
|
|
|
|
|
|
invoke-virtual {p0}, Lcom/discord/utilities/mg_recycler/DragAndDropAdapter;->getDataCopy()Ljava/util/List;
|
|
|
|
|
|
|
|
move-result-object v2
|
|
|
|
|
|
|
|
invoke-interface {v2}, Ljava/lang/Iterable;->iterator()Ljava/util/Iterator;
|
|
|
|
|
|
|
|
move-result-object v2
|
|
|
|
|
|
|
|
const/4 v3, 0x0
|
|
|
|
|
|
|
|
const/4 v4, 0x0
|
|
|
|
|
|
|
|
move-object v5, v3
|
|
|
|
|
|
|
|
:goto_0
|
|
|
|
invoke-interface {v2}, Ljava/util/Iterator;->hasNext()Z
|
|
|
|
|
|
|
|
move-result v6
|
|
|
|
|
|
|
|
if-eqz v6, :cond_7
|
|
|
|
|
|
|
|
invoke-interface {v2}, Ljava/util/Iterator;->next()Ljava/lang/Object;
|
|
|
|
|
|
|
|
move-result-object v6
|
|
|
|
|
|
|
|
add-int/lit8 v7, v4, 0x1
|
|
|
|
|
|
|
|
if-ltz v4, :cond_6
|
|
|
|
|
|
|
|
check-cast v6, Lcom/discord/utilities/mg_recycler/CategoricalDragAndDropAdapter$Payload;
|
|
|
|
|
|
|
|
invoke-interface {v6}, Lcom/discord/utilities/mg_recycler/MGRecyclerDataPayload;->getKey()Ljava/lang/String;
|
|
|
|
|
|
|
|
move-result-object v8
|
|
|
|
|
2020-07-08 16:44:49 +00:00
|
|
|
const-string v9, "item.getKey()"
|
|
|
|
|
2020-09-02 04:07:20 +00:00
|
|
|
invoke-static {v8, v9}, Lk0/o/c/i;->checkNotNullExpressionValue(Ljava/lang/Object;Ljava/lang/String;)V
|
2020-07-08 16:44:49 +00:00
|
|
|
|
2020-05-17 12:40:10 +00:00
|
|
|
sget-object v9, Lcom/discord/widgets/servers/SettingsChannelListAdapter$computeChangedPositions$1;->INSTANCE:Lcom/discord/widgets/servers/SettingsChannelListAdapter$computeChangedPositions$1;
|
|
|
|
|
|
|
|
invoke-virtual {v9, v6}, Lcom/discord/widgets/servers/SettingsChannelListAdapter$computeChangedPositions$1;->invoke(Lcom/discord/utilities/mg_recycler/CategoricalDragAndDropAdapter$Payload;)Ljava/lang/Long;
|
|
|
|
|
|
|
|
move-result-object v9
|
|
|
|
|
|
|
|
if-eqz v9, :cond_0
|
|
|
|
|
|
|
|
invoke-virtual {v9}, Ljava/lang/Long;->longValue()J
|
|
|
|
|
|
|
|
move-result-wide v9
|
|
|
|
|
|
|
|
goto :goto_1
|
|
|
|
|
|
|
|
:cond_0
|
|
|
|
const-wide/16 v9, 0x0
|
|
|
|
|
|
|
|
:goto_1
|
|
|
|
invoke-interface {v6}, Lcom/discord/utilities/mg_recycler/MGRecyclerDataPayload;->getType()I
|
|
|
|
|
|
|
|
move-result v11
|
|
|
|
|
|
|
|
const/4 v12, 0x1
|
|
|
|
|
|
|
|
if-ne v11, v12, :cond_1
|
|
|
|
|
|
|
|
sget-object v5, Lcom/discord/widgets/servers/SettingsChannelListAdapter$computeChangedPositions$2;->INSTANCE:Lcom/discord/widgets/servers/SettingsChannelListAdapter$computeChangedPositions$2;
|
|
|
|
|
|
|
|
invoke-virtual {v5, v9, v10}, Lcom/discord/widgets/servers/SettingsChannelListAdapter$computeChangedPositions$2;->invoke(J)Ljava/lang/Long;
|
|
|
|
|
|
|
|
move-result-object v5
|
|
|
|
|
|
|
|
:cond_1
|
|
|
|
invoke-interface {v6}, Lcom/discord/utilities/mg_recycler/MGRecyclerDataPayload;->getType()I
|
|
|
|
|
|
|
|
move-result v11
|
|
|
|
|
|
|
|
if-eqz v11, :cond_2
|
|
|
|
|
|
|
|
move-object v11, v3
|
|
|
|
|
|
|
|
goto :goto_2
|
|
|
|
|
|
|
|
:cond_2
|
|
|
|
sget-object v11, Lcom/discord/widgets/servers/SettingsChannelListAdapter$computeChangedPositions$2;->INSTANCE:Lcom/discord/widgets/servers/SettingsChannelListAdapter$computeChangedPositions$2;
|
|
|
|
|
|
|
|
move-object v13, v6
|
|
|
|
|
|
|
|
check-cast v13, Lcom/discord/widgets/servers/SettingsChannelListAdapter$ChannelItem;
|
|
|
|
|
|
|
|
invoke-virtual {v13}, Lcom/discord/widgets/servers/SettingsChannelListAdapter$ChannelItem;->getParentId()J
|
|
|
|
|
|
|
|
move-result-wide v13
|
|
|
|
|
|
|
|
invoke-virtual {v11, v13, v14}, Lcom/discord/widgets/servers/SettingsChannelListAdapter$computeChangedPositions$2;->invoke(J)Ljava/lang/Long;
|
|
|
|
|
|
|
|
move-result-object v11
|
|
|
|
|
|
|
|
:goto_2
|
|
|
|
invoke-virtual {p0}, Lcom/discord/utilities/mg_recycler/DragAndDropAdapter;->getOrigPositions()Ljava/util/Map;
|
|
|
|
|
|
|
|
move-result-object v13
|
|
|
|
|
|
|
|
invoke-interface {v13, v8}, Ljava/util/Map;->get(Ljava/lang/Object;)Ljava/lang/Object;
|
|
|
|
|
|
|
|
move-result-object v8
|
|
|
|
|
|
|
|
check-cast v8, Ljava/lang/Integer;
|
|
|
|
|
|
|
|
if-nez v8, :cond_3
|
|
|
|
|
|
|
|
goto :goto_3
|
|
|
|
|
|
|
|
:cond_3
|
|
|
|
invoke-virtual {v8}, Ljava/lang/Integer;->intValue()I
|
|
|
|
|
|
|
|
move-result v8
|
|
|
|
|
|
|
|
if-eq v8, v4, :cond_5
|
|
|
|
|
|
|
|
:goto_3
|
|
|
|
sget-object v8, Lcom/discord/widgets/servers/SettingsChannelListAdapter$computeChangedPositions$3;->INSTANCE:Lcom/discord/widgets/servers/SettingsChannelListAdapter$computeChangedPositions$3;
|
|
|
|
|
|
|
|
invoke-virtual {v8, v6}, Lcom/discord/widgets/servers/SettingsChannelListAdapter$computeChangedPositions$3;->invoke(Lcom/discord/utilities/mg_recycler/CategoricalDragAndDropAdapter$Payload;)Z
|
|
|
|
|
|
|
|
move-result v8
|
|
|
|
|
|
|
|
if-eqz v8, :cond_5
|
|
|
|
|
|
|
|
invoke-static {v9, v10}, Ljava/lang/Long;->valueOf(J)Ljava/lang/Long;
|
|
|
|
|
|
|
|
move-result-object v8
|
|
|
|
|
|
|
|
invoke-static {v4}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;
|
|
|
|
|
|
|
|
move-result-object v4
|
|
|
|
|
|
|
|
invoke-interface {v0, v8, v4}, Ljava/util/Map;->put(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
|
|
|
|
|
2020-09-02 04:07:20 +00:00
|
|
|
invoke-static {v11, v5}, Lk0/o/c/i;->areEqual(Ljava/lang/Object;Ljava/lang/Object;)Z
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
move-result v4
|
|
|
|
|
|
|
|
xor-int/2addr v4, v12
|
|
|
|
|
|
|
|
if-eqz v4, :cond_5
|
|
|
|
|
|
|
|
invoke-interface {v6}, Lcom/discord/utilities/mg_recycler/MGRecyclerDataPayload;->getType()I
|
|
|
|
|
|
|
|
move-result v4
|
|
|
|
|
|
|
|
if-nez v4, :cond_5
|
|
|
|
|
|
|
|
invoke-static {v9, v10}, Ljava/lang/Long;->valueOf(J)Ljava/lang/Long;
|
|
|
|
|
|
|
|
move-result-object v4
|
|
|
|
|
|
|
|
if-eqz v5, :cond_4
|
|
|
|
|
|
|
|
invoke-virtual {v5}, Ljava/lang/Long;->longValue()J
|
|
|
|
|
|
|
|
move-result-wide v8
|
|
|
|
|
|
|
|
goto :goto_4
|
|
|
|
|
|
|
|
:cond_4
|
|
|
|
const-wide/16 v8, -0x1
|
|
|
|
|
|
|
|
:goto_4
|
|
|
|
invoke-static {v8, v9}, Ljava/lang/Long;->valueOf(J)Ljava/lang/Long;
|
|
|
|
|
|
|
|
move-result-object v6
|
|
|
|
|
|
|
|
invoke-interface {v1, v4, v6}, Ljava/util/Map;->put(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
|
|
|
|
|
|
|
|
:cond_5
|
|
|
|
move v4, v7
|
|
|
|
|
|
|
|
goto/16 :goto_0
|
|
|
|
|
|
|
|
:cond_6
|
2020-07-25 02:57:47 +00:00
|
|
|
invoke-static {}, Lf/n/a/k/a;->throwIndexOverflow()V
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
throw v3
|
|
|
|
|
|
|
|
:cond_7
|
|
|
|
invoke-direct {p0, v0, v1}, Lcom/discord/widgets/servers/SettingsChannelListAdapter;->handleChangedPositions(Ljava/util/Map;Ljava/util/Map;)V
|
|
|
|
|
2020-09-02 04:07:20 +00:00
|
|
|
sget-object v0, Lk0/j/o;->d:Lk0/j/o;
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
return-object v0
|
|
|
|
.end method
|
|
|
|
|
|
|
|
.method public final getOnClickListener()Lkotlin/jvm/functions/Function1;
|
|
|
|
.locals 1
|
|
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
|
|
value = {
|
|
|
|
"()",
|
|
|
|
"Lkotlin/jvm/functions/Function1<",
|
|
|
|
"Ljava/lang/Long;",
|
|
|
|
"Lkotlin/Unit;",
|
|
|
|
">;"
|
|
|
|
}
|
|
|
|
.end annotation
|
|
|
|
|
|
|
|
iget-object v0, p0, Lcom/discord/widgets/servers/SettingsChannelListAdapter;->onClickListener:Lkotlin/jvm/functions/Function1;
|
|
|
|
|
|
|
|
return-object v0
|
|
|
|
.end method
|
|
|
|
|
|
|
|
.method public isValidMove(II)Z
|
|
|
|
.locals 2
|
|
|
|
|
|
|
|
const/4 p1, 0x0
|
|
|
|
|
|
|
|
if-gtz p2, :cond_0
|
|
|
|
|
|
|
|
return p1
|
|
|
|
|
|
|
|
:cond_0
|
|
|
|
const/4 v0, 0x1
|
|
|
|
|
|
|
|
sub-int/2addr p2, v0
|
|
|
|
|
|
|
|
invoke-virtual {p0, p2}, Lcom/discord/utilities/mg_recycler/MGRecyclerAdapterSimple;->getItem(I)Lcom/discord/utilities/mg_recycler/MGRecyclerDataPayload;
|
|
|
|
|
|
|
|
move-result-object p2
|
|
|
|
|
|
|
|
check-cast p2, Lcom/discord/utilities/mg_recycler/CategoricalDragAndDropAdapter$Payload;
|
|
|
|
|
|
|
|
const-string v1, "itemAbove"
|
|
|
|
|
2020-09-02 04:07:20 +00:00
|
|
|
invoke-static {p2, v1}, Lk0/o/c/i;->checkNotNullExpressionValue(Ljava/lang/Object;Ljava/lang/String;)V
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
invoke-interface {p2}, Lcom/discord/utilities/mg_recycler/MGRecyclerDataPayload;->getType()I
|
|
|
|
|
|
|
|
move-result v1
|
|
|
|
|
|
|
|
if-eqz v1, :cond_2
|
|
|
|
|
|
|
|
if-eq v1, v0, :cond_1
|
|
|
|
|
|
|
|
goto :goto_0
|
|
|
|
|
|
|
|
:cond_1
|
|
|
|
check-cast p2, Lcom/discord/widgets/servers/SettingsChannelListAdapter$CategoryItem;
|
|
|
|
|
|
|
|
invoke-virtual {p2}, Lcom/discord/widgets/servers/SettingsChannelListAdapter$CategoryItem;->getCanManageChannelsOfCategory()Z
|
|
|
|
|
|
|
|
move-result p1
|
|
|
|
|
|
|
|
goto :goto_0
|
|
|
|
|
|
|
|
:cond_2
|
|
|
|
check-cast p2, Lcom/discord/widgets/servers/SettingsChannelListAdapter$ChannelItem;
|
|
|
|
|
|
|
|
invoke-virtual {p2}, Lcom/discord/widgets/servers/SettingsChannelListAdapter$ChannelItem;->getCanManageCategoryOfChannel()Z
|
|
|
|
|
|
|
|
move-result p1
|
|
|
|
|
|
|
|
:goto_0
|
|
|
|
return p1
|
|
|
|
.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/SettingsChannelListAdapter;->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;
|
2020-09-02 04:07:20 +00:00
|
|
|
.locals 1
|
2020-05-17 12:40:10 +00:00
|
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
|
|
value = {
|
|
|
|
"(",
|
|
|
|
"Landroid/view/ViewGroup;",
|
|
|
|
"I)",
|
|
|
|
"Lcom/discord/utilities/mg_recycler/MGRecyclerViewHolder<",
|
|
|
|
"Lcom/discord/widgets/servers/SettingsChannelListAdapter;",
|
|
|
|
"Lcom/discord/utilities/mg_recycler/CategoricalDragAndDropAdapter$Payload;",
|
|
|
|
">;"
|
|
|
|
}
|
|
|
|
.end annotation
|
|
|
|
|
2020-09-02 04:07:20 +00:00
|
|
|
const-string v0, "parent"
|
|
|
|
|
|
|
|
invoke-static {p1, v0}, Lk0/o/c/i;->checkNotNullParameter(Ljava/lang/Object;Ljava/lang/String;)V
|
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/servers/SettingsChannelListAdapter$CategoryListItem;
|
|
|
|
|
|
|
|
invoke-direct {p1, p0}, Lcom/discord/widgets/servers/SettingsChannelListAdapter$CategoryListItem;-><init>(Lcom/discord/widgets/servers/SettingsChannelListAdapter;)V
|
|
|
|
|
|
|
|
goto :goto_0
|
|
|
|
|
|
|
|
: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/servers/SettingsChannelListAdapter$ChannelListItem;
|
|
|
|
|
|
|
|
invoke-direct {p1, p0}, Lcom/discord/widgets/servers/SettingsChannelListAdapter$ChannelListItem;-><init>(Lcom/discord/widgets/servers/SettingsChannelListAdapter;)V
|
|
|
|
|
|
|
|
:goto_0
|
|
|
|
return-object p1
|
|
|
|
.end method
|
|
|
|
|
|
|
|
.method public onNewPositions(Ljava/util/Map;)V
|
2020-09-02 04:07:20 +00:00
|
|
|
.locals 1
|
2020-05-17 12:40:10 +00:00
|
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
|
|
value = {
|
|
|
|
"(",
|
|
|
|
"Ljava/util/Map<",
|
|
|
|
"Ljava/lang/String;",
|
|
|
|
"Ljava/lang/Integer;",
|
|
|
|
">;)V"
|
|
|
|
}
|
|
|
|
.end annotation
|
|
|
|
|
2020-09-02 04:07:20 +00:00
|
|
|
const-string v0, "newPositions"
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-09-02 04:07:20 +00:00
|
|
|
invoke-static {p1, v0}, Lk0/o/c/i;->checkNotNullParameter(Ljava/lang/Object;Ljava/lang/String;)V
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-09-02 04:07:20 +00:00
|
|
|
return-void
|
2020-05-17 12:40:10 +00:00
|
|
|
.end method
|
|
|
|
|
|
|
|
.method public final setOnClickListener(Lkotlin/jvm/functions/Function1;)V
|
|
|
|
.locals 0
|
|
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
|
|
value = {
|
|
|
|
"(",
|
|
|
|
"Lkotlin/jvm/functions/Function1<",
|
|
|
|
"-",
|
|
|
|
"Ljava/lang/Long;",
|
|
|
|
"Lkotlin/Unit;",
|
|
|
|
">;)V"
|
|
|
|
}
|
|
|
|
.end annotation
|
|
|
|
|
|
|
|
iput-object p1, p0, Lcom/discord/widgets/servers/SettingsChannelListAdapter;->onClickListener:Lkotlin/jvm/functions/Function1;
|
|
|
|
|
|
|
|
return-void
|
|
|
|
.end method
|
|
|
|
|
|
|
|
.method public final setPositionUpdateListener(Lrx/functions/Action1;)V
|
|
|
|
.locals 1
|
|
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
|
|
value = {
|
|
|
|
"(",
|
|
|
|
"Lrx/functions/Action1<",
|
|
|
|
"Ljava/util/Map<",
|
|
|
|
"Ljava/lang/Long;",
|
|
|
|
"Lcom/discord/widgets/servers/SettingsChannelListAdapter$UpdatedPosition;",
|
|
|
|
">;>;)V"
|
|
|
|
}
|
|
|
|
.end annotation
|
|
|
|
|
2020-09-02 04:07:20 +00:00
|
|
|
const-string v0, "onPositionUpdateListener"
|
|
|
|
|
|
|
|
invoke-static {p1, v0}, Lk0/o/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/SettingsChannelListAdapter$setPositionUpdateListener$1;
|
|
|
|
|
|
|
|
invoke-direct {v0, p1}, Lcom/discord/widgets/servers/SettingsChannelListAdapter$setPositionUpdateListener$1;-><init>(Lrx/functions/Action1;)V
|
|
|
|
|
|
|
|
iput-object v0, p0, Lcom/discord/widgets/servers/SettingsChannelListAdapter;->onPositionUpdateListener:Lkotlin/jvm/functions/Function1;
|
|
|
|
|
|
|
|
return-void
|
|
|
|
.end method
|