426 lines
14 KiB
Smali
426 lines
14 KiB
Smali
.class public final Lcom/discord/widgets/user/profile/UserProfileConnectionsView;
|
|
.super Landroid/widget/LinearLayout;
|
|
.source "UserProfileConnectionsView.kt"
|
|
|
|
|
|
# annotations
|
|
.annotation system Ldalvik/annotation/MemberClasses;
|
|
value = {
|
|
Lcom/discord/widgets/user/profile/UserProfileConnectionsView$ViewState;,
|
|
Lcom/discord/widgets/user/profile/UserProfileConnectionsView$ConnectedAccountItem;,
|
|
Lcom/discord/widgets/user/profile/UserProfileConnectionsView$ConnectedAccountsAdapter;,
|
|
Lcom/discord/widgets/user/profile/UserProfileConnectionsView$ViewHolder;
|
|
}
|
|
.end annotation
|
|
|
|
|
|
# static fields
|
|
.field public static final synthetic $$delegatedProperties:[Lkotlin/reflect/KProperty;
|
|
|
|
|
|
# instance fields
|
|
.field public connectedAccountsAdapter:Lcom/discord/widgets/user/profile/UserProfileConnectionsView$ConnectedAccountsAdapter;
|
|
|
|
.field public final connectedAccountsRecycler$delegate:Lkotlin/properties/ReadOnlyProperty;
|
|
|
|
.field public final mutualFriendsItem$delegate:Lkotlin/properties/ReadOnlyProperty;
|
|
|
|
.field public final mutualGuildsItem$delegate:Lkotlin/properties/ReadOnlyProperty;
|
|
|
|
|
|
# direct methods
|
|
.method public static constructor <clinit>()V
|
|
.locals 6
|
|
|
|
const/4 v0, 0x3
|
|
|
|
new-array v0, v0, [Lkotlin/reflect/KProperty;
|
|
|
|
new-instance v1, Ly/v/b/u;
|
|
|
|
const-class v2, Lcom/discord/widgets/user/profile/UserProfileConnectionsView;
|
|
|
|
invoke-static {v2}, Ly/v/b/x;->getOrCreateKotlinClass(Ljava/lang/Class;)Ly/z/b;
|
|
|
|
move-result-object v2
|
|
|
|
const-string v3, "connectedAccountsRecycler"
|
|
|
|
const-string v4, "getConnectedAccountsRecycler()Landroidx/recyclerview/widget/RecyclerView;"
|
|
|
|
invoke-direct {v1, v2, v3, v4}, Ly/v/b/u;-><init>(Lkotlin/reflect/KDeclarationContainer;Ljava/lang/String;Ljava/lang/String;)V
|
|
|
|
sget-object v2, Ly/v/b/x;->a:Ly/v/b/y;
|
|
|
|
invoke-virtual {v2, v1}, Ly/v/b/y;->property1(Ly/v/b/t;)Ly/z/d;
|
|
|
|
const/4 v2, 0x0
|
|
|
|
aput-object v1, v0, v2
|
|
|
|
const/4 v1, 0x1
|
|
|
|
new-instance v2, Ly/v/b/u;
|
|
|
|
const-class v3, Lcom/discord/widgets/user/profile/UserProfileConnectionsView;
|
|
|
|
invoke-static {v3}, Ly/v/b/x;->getOrCreateKotlinClass(Ljava/lang/Class;)Ly/z/b;
|
|
|
|
move-result-object v3
|
|
|
|
const-string v4, "mutualGuildsItem"
|
|
|
|
const-string v5, "getMutualGuildsItem()Landroid/view/View;"
|
|
|
|
invoke-direct {v2, v3, v4, v5}, Ly/v/b/u;-><init>(Lkotlin/reflect/KDeclarationContainer;Ljava/lang/String;Ljava/lang/String;)V
|
|
|
|
sget-object v3, Ly/v/b/x;->a:Ly/v/b/y;
|
|
|
|
invoke-virtual {v3, v2}, Ly/v/b/y;->property1(Ly/v/b/t;)Ly/z/d;
|
|
|
|
aput-object v2, v0, v1
|
|
|
|
const/4 v1, 0x2
|
|
|
|
new-instance v2, Ly/v/b/u;
|
|
|
|
const-class v3, Lcom/discord/widgets/user/profile/UserProfileConnectionsView;
|
|
|
|
invoke-static {v3}, Ly/v/b/x;->getOrCreateKotlinClass(Ljava/lang/Class;)Ly/z/b;
|
|
|
|
move-result-object v3
|
|
|
|
const-string v4, "mutualFriendsItem"
|
|
|
|
const-string v5, "getMutualFriendsItem()Landroid/view/View;"
|
|
|
|
invoke-direct {v2, v3, v4, v5}, Ly/v/b/u;-><init>(Lkotlin/reflect/KDeclarationContainer;Ljava/lang/String;Ljava/lang/String;)V
|
|
|
|
sget-object v3, Ly/v/b/x;->a:Ly/v/b/y;
|
|
|
|
invoke-virtual {v3, v2}, Ly/v/b/y;->property1(Ly/v/b/t;)Ly/z/d;
|
|
|
|
aput-object v2, v0, v1
|
|
|
|
sput-object v0, Lcom/discord/widgets/user/profile/UserProfileConnectionsView;->$$delegatedProperties:[Lkotlin/reflect/KProperty;
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public constructor <init>(Landroid/content/Context;Landroid/util/AttributeSet;)V
|
|
.locals 1
|
|
|
|
const/4 v0, 0x0
|
|
|
|
if-eqz p1, :cond_1
|
|
|
|
if-eqz p2, :cond_0
|
|
|
|
invoke-direct {p0, p1, p2}, Landroid/widget/LinearLayout;-><init>(Landroid/content/Context;Landroid/util/AttributeSet;)V
|
|
|
|
const p2, 0x7f0a0978
|
|
|
|
invoke-static {p0, p2}, Lf/o/a/j/a;->a(Landroid/view/View;I)Lkotlin/properties/ReadOnlyProperty;
|
|
|
|
move-result-object p2
|
|
|
|
iput-object p2, p0, Lcom/discord/widgets/user/profile/UserProfileConnectionsView;->connectedAccountsRecycler$delegate:Lkotlin/properties/ReadOnlyProperty;
|
|
|
|
const p2, 0x7f0a0977
|
|
|
|
invoke-static {p0, p2}, Lf/o/a/j/a;->a(Landroid/view/View;I)Lkotlin/properties/ReadOnlyProperty;
|
|
|
|
move-result-object p2
|
|
|
|
iput-object p2, p0, Lcom/discord/widgets/user/profile/UserProfileConnectionsView;->mutualGuildsItem$delegate:Lkotlin/properties/ReadOnlyProperty;
|
|
|
|
const p2, 0x7f0a0976
|
|
|
|
invoke-static {p0, p2}, Lf/o/a/j/a;->a(Landroid/view/View;I)Lkotlin/properties/ReadOnlyProperty;
|
|
|
|
move-result-object p2
|
|
|
|
iput-object p2, p0, Lcom/discord/widgets/user/profile/UserProfileConnectionsView;->mutualFriendsItem$delegate:Lkotlin/properties/ReadOnlyProperty;
|
|
|
|
const p2, 0x7f0d00d1
|
|
|
|
invoke-static {p1, p2, p0}, Landroid/widget/LinearLayout;->inflate(Landroid/content/Context;ILandroid/view/ViewGroup;)Landroid/view/View;
|
|
|
|
return-void
|
|
|
|
:cond_0
|
|
const-string p1, "attrs"
|
|
|
|
invoke-static {p1}, Ly/v/b/j;->a(Ljava/lang/String;)V
|
|
|
|
throw v0
|
|
|
|
:cond_1
|
|
const-string p1, "context"
|
|
|
|
invoke-static {p1}, Ly/v/b/j;->a(Ljava/lang/String;)V
|
|
|
|
throw v0
|
|
.end method
|
|
|
|
.method private final getConnectedAccountsRecycler()Landroidx/recyclerview/widget/RecyclerView;
|
|
.locals 3
|
|
|
|
iget-object v0, p0, Lcom/discord/widgets/user/profile/UserProfileConnectionsView;->connectedAccountsRecycler$delegate:Lkotlin/properties/ReadOnlyProperty;
|
|
|
|
sget-object v1, Lcom/discord/widgets/user/profile/UserProfileConnectionsView;->$$delegatedProperties:[Lkotlin/reflect/KProperty;
|
|
|
|
const/4 v2, 0x0
|
|
|
|
aget-object v1, v1, v2
|
|
|
|
invoke-interface {v0, p0, v1}, Lkotlin/properties/ReadOnlyProperty;->getValue(Ljava/lang/Object;Lkotlin/reflect/KProperty;)Ljava/lang/Object;
|
|
|
|
move-result-object v0
|
|
|
|
check-cast v0, Landroidx/recyclerview/widget/RecyclerView;
|
|
|
|
return-object v0
|
|
.end method
|
|
|
|
.method private final getMutualFriendsItem()Landroid/view/View;
|
|
.locals 3
|
|
|
|
iget-object v0, p0, Lcom/discord/widgets/user/profile/UserProfileConnectionsView;->mutualFriendsItem$delegate:Lkotlin/properties/ReadOnlyProperty;
|
|
|
|
sget-object v1, Lcom/discord/widgets/user/profile/UserProfileConnectionsView;->$$delegatedProperties:[Lkotlin/reflect/KProperty;
|
|
|
|
const/4 v2, 0x2
|
|
|
|
aget-object v1, v1, v2
|
|
|
|
invoke-interface {v0, p0, v1}, Lkotlin/properties/ReadOnlyProperty;->getValue(Ljava/lang/Object;Lkotlin/reflect/KProperty;)Ljava/lang/Object;
|
|
|
|
move-result-object v0
|
|
|
|
check-cast v0, Landroid/view/View;
|
|
|
|
return-object v0
|
|
.end method
|
|
|
|
.method private final getMutualGuildsItem()Landroid/view/View;
|
|
.locals 3
|
|
|
|
iget-object v0, p0, Lcom/discord/widgets/user/profile/UserProfileConnectionsView;->mutualGuildsItem$delegate:Lkotlin/properties/ReadOnlyProperty;
|
|
|
|
sget-object v1, Lcom/discord/widgets/user/profile/UserProfileConnectionsView;->$$delegatedProperties:[Lkotlin/reflect/KProperty;
|
|
|
|
const/4 v2, 0x1
|
|
|
|
aget-object v1, v1, v2
|
|
|
|
invoke-interface {v0, p0, v1}, Lkotlin/properties/ReadOnlyProperty;->getValue(Ljava/lang/Object;Lkotlin/reflect/KProperty;)Ljava/lang/Object;
|
|
|
|
move-result-object v0
|
|
|
|
check-cast v0, Landroid/view/View;
|
|
|
|
return-object v0
|
|
.end method
|
|
|
|
|
|
# virtual methods
|
|
.method public onAttachedToWindow()V
|
|
.locals 3
|
|
|
|
invoke-super {p0}, Landroid/widget/LinearLayout;->onAttachedToWindow()V
|
|
|
|
sget-object v0, Lcom/discord/utilities/mg_recycler/MGRecyclerAdapter;->Companion:Lcom/discord/utilities/mg_recycler/MGRecyclerAdapter$Companion;
|
|
|
|
new-instance v1, Lcom/discord/widgets/user/profile/UserProfileConnectionsView$ConnectedAccountsAdapter;
|
|
|
|
invoke-direct {p0}, Lcom/discord/widgets/user/profile/UserProfileConnectionsView;->getConnectedAccountsRecycler()Landroidx/recyclerview/widget/RecyclerView;
|
|
|
|
move-result-object v2
|
|
|
|
invoke-direct {v1, v2}, Lcom/discord/widgets/user/profile/UserProfileConnectionsView$ConnectedAccountsAdapter;-><init>(Landroidx/recyclerview/widget/RecyclerView;)V
|
|
|
|
invoke-virtual {v0, v1}, Lcom/discord/utilities/mg_recycler/MGRecyclerAdapter$Companion;->configure(Lcom/discord/utilities/mg_recycler/MGRecyclerAdapter;)Lcom/discord/utilities/mg_recycler/MGRecyclerAdapter;
|
|
|
|
move-result-object v0
|
|
|
|
check-cast v0, Lcom/discord/widgets/user/profile/UserProfileConnectionsView$ConnectedAccountsAdapter;
|
|
|
|
iput-object v0, p0, Lcom/discord/widgets/user/profile/UserProfileConnectionsView;->connectedAccountsAdapter:Lcom/discord/widgets/user/profile/UserProfileConnectionsView$ConnectedAccountsAdapter;
|
|
|
|
invoke-direct {p0}, Lcom/discord/widgets/user/profile/UserProfileConnectionsView;->getConnectedAccountsRecycler()Landroidx/recyclerview/widget/RecyclerView;
|
|
|
|
move-result-object v0
|
|
|
|
const/4 v1, 0x0
|
|
|
|
invoke-virtual {v0, v1}, Landroidx/recyclerview/widget/RecyclerView;->setHasFixedSize(Z)V
|
|
|
|
invoke-direct {p0}, Lcom/discord/widgets/user/profile/UserProfileConnectionsView;->getConnectedAccountsRecycler()Landroidx/recyclerview/widget/RecyclerView;
|
|
|
|
move-result-object v0
|
|
|
|
invoke-static {v0, v1}, Landroidx/core/view/ViewCompat;->setNestedScrollingEnabled(Landroid/view/View;Z)V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public final updateViewState(Lcom/discord/widgets/user/profile/UserProfileConnectionsView$ViewState;Lkotlin/jvm/functions/Function3;Lkotlin/jvm/functions/Function0;Lkotlin/jvm/functions/Function0;)V
|
|
.locals 4
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"(",
|
|
"Lcom/discord/widgets/user/profile/UserProfileConnectionsView$ViewState;",
|
|
"Lkotlin/jvm/functions/Function3<",
|
|
"-",
|
|
"Ljava/lang/String;",
|
|
"-",
|
|
"Ljava/lang/Integer;",
|
|
"-",
|
|
"Ljava/lang/String;",
|
|
"Lkotlin/Unit;",
|
|
">;",
|
|
"Lkotlin/jvm/functions/Function0<",
|
|
"Lkotlin/Unit;",
|
|
">;",
|
|
"Lkotlin/jvm/functions/Function0<",
|
|
"Lkotlin/Unit;",
|
|
">;)V"
|
|
}
|
|
.end annotation
|
|
|
|
const/4 v0, 0x0
|
|
|
|
if-eqz p1, :cond_7
|
|
|
|
if-eqz p2, :cond_6
|
|
|
|
if-eqz p3, :cond_5
|
|
|
|
if-eqz p4, :cond_4
|
|
|
|
iget-object v1, p0, Lcom/discord/widgets/user/profile/UserProfileConnectionsView;->connectedAccountsAdapter:Lcom/discord/widgets/user/profile/UserProfileConnectionsView$ConnectedAccountsAdapter;
|
|
|
|
const-string v2, "connectedAccountsAdapter"
|
|
|
|
if-eqz v1, :cond_3
|
|
|
|
new-instance v3, Lcom/discord/widgets/user/profile/UserProfileConnectionsView$updateViewState$1;
|
|
|
|
invoke-direct {v3, p2}, Lcom/discord/widgets/user/profile/UserProfileConnectionsView$updateViewState$1;-><init>(Lkotlin/jvm/functions/Function3;)V
|
|
|
|
invoke-virtual {v1, v3}, Lcom/discord/widgets/user/profile/UserProfileConnectionsView$ConnectedAccountsAdapter;->setOnConnectedAccountClick(Lkotlin/jvm/functions/Function3;)V
|
|
|
|
iget-object p2, p0, Lcom/discord/widgets/user/profile/UserProfileConnectionsView;->connectedAccountsAdapter:Lcom/discord/widgets/user/profile/UserProfileConnectionsView$ConnectedAccountsAdapter;
|
|
|
|
if-eqz p2, :cond_2
|
|
|
|
invoke-virtual {p1}, Lcom/discord/widgets/user/profile/UserProfileConnectionsView$ViewState;->getConnectedAccountItems()Ljava/util/List;
|
|
|
|
move-result-object v0
|
|
|
|
invoke-virtual {p2, v0}, Lcom/discord/utilities/mg_recycler/MGRecyclerAdapterSimple;->setData(Ljava/util/List;)V
|
|
|
|
invoke-direct {p0}, Lcom/discord/widgets/user/profile/UserProfileConnectionsView;->getMutualGuildsItem()Landroid/view/View;
|
|
|
|
move-result-object p2
|
|
|
|
new-instance v0, Lcom/discord/widgets/user/profile/UserProfileConnectionsView$updateViewState$2;
|
|
|
|
invoke-direct {v0, p3}, Lcom/discord/widgets/user/profile/UserProfileConnectionsView$updateViewState$2;-><init>(Lkotlin/jvm/functions/Function0;)V
|
|
|
|
invoke-virtual {p2, v0}, Landroid/view/View;->setOnClickListener(Landroid/view/View$OnClickListener;)V
|
|
|
|
invoke-direct {p0}, Lcom/discord/widgets/user/profile/UserProfileConnectionsView;->getMutualGuildsItem()Landroid/view/View;
|
|
|
|
move-result-object p2
|
|
|
|
invoke-virtual {p1}, Lcom/discord/widgets/user/profile/UserProfileConnectionsView$ViewState;->getShowMutualGuildsAndFriends()Z
|
|
|
|
move-result p3
|
|
|
|
const/4 v0, 0x0
|
|
|
|
const/16 v1, 0x8
|
|
|
|
if-eqz p3, :cond_0
|
|
|
|
const/4 p3, 0x0
|
|
|
|
goto :goto_0
|
|
|
|
:cond_0
|
|
const/16 p3, 0x8
|
|
|
|
:goto_0
|
|
invoke-virtual {p2, p3}, Landroid/view/View;->setVisibility(I)V
|
|
|
|
invoke-direct {p0}, Lcom/discord/widgets/user/profile/UserProfileConnectionsView;->getMutualFriendsItem()Landroid/view/View;
|
|
|
|
move-result-object p2
|
|
|
|
new-instance p3, Lcom/discord/widgets/user/profile/UserProfileConnectionsView$updateViewState$3;
|
|
|
|
invoke-direct {p3, p4}, Lcom/discord/widgets/user/profile/UserProfileConnectionsView$updateViewState$3;-><init>(Lkotlin/jvm/functions/Function0;)V
|
|
|
|
invoke-virtual {p2, p3}, Landroid/view/View;->setOnClickListener(Landroid/view/View$OnClickListener;)V
|
|
|
|
invoke-direct {p0}, Lcom/discord/widgets/user/profile/UserProfileConnectionsView;->getMutualFriendsItem()Landroid/view/View;
|
|
|
|
move-result-object p2
|
|
|
|
invoke-virtual {p1}, Lcom/discord/widgets/user/profile/UserProfileConnectionsView$ViewState;->getShowMutualGuildsAndFriends()Z
|
|
|
|
move-result p1
|
|
|
|
if-eqz p1, :cond_1
|
|
|
|
goto :goto_1
|
|
|
|
:cond_1
|
|
const/16 v0, 0x8
|
|
|
|
:goto_1
|
|
invoke-virtual {p2, v0}, Landroid/view/View;->setVisibility(I)V
|
|
|
|
return-void
|
|
|
|
:cond_2
|
|
invoke-static {v2}, Ly/v/b/j;->throwUninitializedPropertyAccessException(Ljava/lang/String;)V
|
|
|
|
throw v0
|
|
|
|
:cond_3
|
|
invoke-static {v2}, Ly/v/b/j;->throwUninitializedPropertyAccessException(Ljava/lang/String;)V
|
|
|
|
throw v0
|
|
|
|
:cond_4
|
|
const-string p1, "onMutualFriendsItemClick"
|
|
|
|
invoke-static {p1}, Ly/v/b/j;->a(Ljava/lang/String;)V
|
|
|
|
throw v0
|
|
|
|
:cond_5
|
|
const-string p1, "onMutualGuildsItemClick"
|
|
|
|
invoke-static {p1}, Ly/v/b/j;->a(Ljava/lang/String;)V
|
|
|
|
throw v0
|
|
|
|
:cond_6
|
|
const-string p1, "onConnectedAccountClick"
|
|
|
|
invoke-static {p1}, Ly/v/b/j;->a(Ljava/lang/String;)V
|
|
|
|
throw v0
|
|
|
|
:cond_7
|
|
const-string p1, "viewState"
|
|
|
|
invoke-static {p1}, Ly/v/b/j;->a(Ljava/lang/String;)V
|
|
|
|
throw v0
|
|
.end method
|