1117 lines
41 KiB
Smali
1117 lines
41 KiB
Smali
.class public final Lcom/discord/widgets/settings/connections/WidgetSettingsUserConnections$Adapter$ViewHolder;
|
|
.super Lcom/discord/utilities/mg_recycler/MGRecyclerViewHolder;
|
|
.source "WidgetSettingsUserConnections.kt"
|
|
|
|
|
|
# annotations
|
|
.annotation system Ldalvik/annotation/EnclosingClass;
|
|
value = Lcom/discord/widgets/settings/connections/WidgetSettingsUserConnections$Adapter;
|
|
.end annotation
|
|
|
|
.annotation system Ldalvik/annotation/InnerClass;
|
|
accessFlags = 0x11
|
|
name = "ViewHolder"
|
|
.end annotation
|
|
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"Lcom/discord/utilities/mg_recycler/MGRecyclerViewHolder<",
|
|
"Lcom/discord/widgets/settings/connections/WidgetSettingsUserConnections$Adapter;",
|
|
"Lcom/discord/widgets/settings/connections/WidgetSettingsUserConnections$UserConnectionItem;",
|
|
">;"
|
|
}
|
|
.end annotation
|
|
|
|
|
|
# static fields
|
|
.field public static final synthetic $$delegatedProperties:[Lkotlin/reflect/KProperty;
|
|
|
|
|
|
# instance fields
|
|
.field public final disconnect$delegate:Lkotlin/properties/ReadOnlyProperty;
|
|
|
|
.field public final displaySwitch$delegate:Lkotlin/properties/ReadOnlyProperty;
|
|
|
|
.field public final extraInfo$delegate:Lkotlin/properties/ReadOnlyProperty;
|
|
|
|
.field public final integrations$delegate:Lkotlin/properties/ReadOnlyProperty;
|
|
|
|
.field public final platformImage$delegate:Lkotlin/properties/ReadOnlyProperty;
|
|
|
|
.field public final platformUserName$delegate:Lkotlin/properties/ReadOnlyProperty;
|
|
|
|
.field public final showActivitySwitch$delegate:Lkotlin/properties/ReadOnlyProperty;
|
|
|
|
.field public final syncFriendsSwitch$delegate:Lkotlin/properties/ReadOnlyProperty;
|
|
|
|
.field public final synthetic this$0:Lcom/discord/widgets/settings/connections/WidgetSettingsUserConnections$Adapter;
|
|
|
|
|
|
# direct methods
|
|
.method public static constructor <clinit>()V
|
|
.locals 5
|
|
|
|
const-class v0, Lcom/discord/widgets/settings/connections/WidgetSettingsUserConnections$Adapter$ViewHolder;
|
|
|
|
const/16 v1, 0x8
|
|
|
|
new-array v1, v1, [Lkotlin/reflect/KProperty;
|
|
|
|
const-string v2, "platformImage"
|
|
|
|
const-string v3, "getPlatformImage()Landroid/widget/ImageView;"
|
|
|
|
const/4 v4, 0x0
|
|
|
|
invoke-static {v0, v2, v3, v4}, Lf/e/c/a/a;->L(Ljava/lang/Class;Ljava/lang/String;Ljava/lang/String;I)Lz/n/c/s;
|
|
|
|
move-result-object v2
|
|
|
|
aput-object v2, v1, v4
|
|
|
|
const-string v2, "platformUserName"
|
|
|
|
const-string v3, "getPlatformUserName()Landroid/widget/TextView;"
|
|
|
|
invoke-static {v0, v2, v3, v4}, Lf/e/c/a/a;->L(Ljava/lang/Class;Ljava/lang/String;Ljava/lang/String;I)Lz/n/c/s;
|
|
|
|
move-result-object v2
|
|
|
|
const/4 v3, 0x1
|
|
|
|
aput-object v2, v1, v3
|
|
|
|
const-string v2, "disconnect"
|
|
|
|
const-string v3, "getDisconnect()Landroid/widget/ImageView;"
|
|
|
|
invoke-static {v0, v2, v3, v4}, Lf/e/c/a/a;->L(Ljava/lang/Class;Ljava/lang/String;Ljava/lang/String;I)Lz/n/c/s;
|
|
|
|
move-result-object v2
|
|
|
|
const/4 v3, 0x2
|
|
|
|
aput-object v2, v1, v3
|
|
|
|
const-string v2, "displaySwitch"
|
|
|
|
const-string v3, "getDisplaySwitch()Landroidx/appcompat/widget/SwitchCompat;"
|
|
|
|
invoke-static {v0, v2, v3, v4}, Lf/e/c/a/a;->L(Ljava/lang/Class;Ljava/lang/String;Ljava/lang/String;I)Lz/n/c/s;
|
|
|
|
move-result-object v2
|
|
|
|
const/4 v3, 0x3
|
|
|
|
aput-object v2, v1, v3
|
|
|
|
const-string v2, "syncFriendsSwitch"
|
|
|
|
const-string v3, "getSyncFriendsSwitch()Landroidx/appcompat/widget/SwitchCompat;"
|
|
|
|
invoke-static {v0, v2, v3, v4}, Lf/e/c/a/a;->L(Ljava/lang/Class;Ljava/lang/String;Ljava/lang/String;I)Lz/n/c/s;
|
|
|
|
move-result-object v2
|
|
|
|
const/4 v3, 0x4
|
|
|
|
aput-object v2, v1, v3
|
|
|
|
const-string v2, "showActivitySwitch"
|
|
|
|
const-string v3, "getShowActivitySwitch()Landroidx/appcompat/widget/SwitchCompat;"
|
|
|
|
invoke-static {v0, v2, v3, v4}, Lf/e/c/a/a;->L(Ljava/lang/Class;Ljava/lang/String;Ljava/lang/String;I)Lz/n/c/s;
|
|
|
|
move-result-object v2
|
|
|
|
const/4 v3, 0x5
|
|
|
|
aput-object v2, v1, v3
|
|
|
|
const-string v2, "extraInfo"
|
|
|
|
const-string v3, "getExtraInfo()Landroid/widget/TextView;"
|
|
|
|
invoke-static {v0, v2, v3, v4}, Lf/e/c/a/a;->L(Ljava/lang/Class;Ljava/lang/String;Ljava/lang/String;I)Lz/n/c/s;
|
|
|
|
move-result-object v2
|
|
|
|
const/4 v3, 0x6
|
|
|
|
aput-object v2, v1, v3
|
|
|
|
const-string v2, "integrations"
|
|
|
|
const-string v3, "getIntegrations()Landroid/widget/LinearLayout;"
|
|
|
|
invoke-static {v0, v2, v3, v4}, Lf/e/c/a/a;->L(Ljava/lang/Class;Ljava/lang/String;Ljava/lang/String;I)Lz/n/c/s;
|
|
|
|
move-result-object v0
|
|
|
|
const/4 v2, 0x7
|
|
|
|
aput-object v0, v1, v2
|
|
|
|
sput-object v1, Lcom/discord/widgets/settings/connections/WidgetSettingsUserConnections$Adapter$ViewHolder;->$$delegatedProperties:[Lkotlin/reflect/KProperty;
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public constructor <init>(Lcom/discord/widgets/settings/connections/WidgetSettingsUserConnections$Adapter;ILcom/discord/widgets/settings/connections/WidgetSettingsUserConnections$Adapter;)V
|
|
.locals 1
|
|
.param p1 # Lcom/discord/widgets/settings/connections/WidgetSettingsUserConnections$Adapter;
|
|
.annotation build Landroidx/annotation/LayoutRes;
|
|
.end annotation
|
|
.end param
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"(I",
|
|
"Lcom/discord/widgets/settings/connections/WidgetSettingsUserConnections$Adapter;",
|
|
")V"
|
|
}
|
|
.end annotation
|
|
|
|
const-string v0, "adapter"
|
|
|
|
invoke-static {p3, v0}, Lz/n/c/j;->checkNotNullParameter(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
iput-object p1, p0, Lcom/discord/widgets/settings/connections/WidgetSettingsUserConnections$Adapter$ViewHolder;->this$0:Lcom/discord/widgets/settings/connections/WidgetSettingsUserConnections$Adapter;
|
|
|
|
invoke-direct {p0, p2, p3}, Lcom/discord/utilities/mg_recycler/MGRecyclerViewHolder;-><init>(ILcom/discord/utilities/mg_recycler/MGRecyclerAdapter;)V
|
|
|
|
const p1, 0x7f0a02d4
|
|
|
|
invoke-static {p0, p1}, Lz/i/s;->j(Landroidx/recyclerview/widget/RecyclerView$ViewHolder;I)Lkotlin/properties/ReadOnlyProperty;
|
|
|
|
move-result-object p1
|
|
|
|
iput-object p1, p0, Lcom/discord/widgets/settings/connections/WidgetSettingsUserConnections$Adapter$ViewHolder;->platformImage$delegate:Lkotlin/properties/ReadOnlyProperty;
|
|
|
|
const p1, 0x7f0a02d5
|
|
|
|
invoke-static {p0, p1}, Lz/i/s;->j(Landroidx/recyclerview/widget/RecyclerView$ViewHolder;I)Lkotlin/properties/ReadOnlyProperty;
|
|
|
|
move-result-object p1
|
|
|
|
iput-object p1, p0, Lcom/discord/widgets/settings/connections/WidgetSettingsUserConnections$Adapter$ViewHolder;->platformUserName$delegate:Lkotlin/properties/ReadOnlyProperty;
|
|
|
|
const p1, 0x7f0a02cf
|
|
|
|
invoke-static {p0, p1}, Lz/i/s;->j(Landroidx/recyclerview/widget/RecyclerView$ViewHolder;I)Lkotlin/properties/ReadOnlyProperty;
|
|
|
|
move-result-object p1
|
|
|
|
iput-object p1, p0, Lcom/discord/widgets/settings/connections/WidgetSettingsUserConnections$Adapter$ViewHolder;->disconnect$delegate:Lkotlin/properties/ReadOnlyProperty;
|
|
|
|
const p1, 0x7f0a02d1
|
|
|
|
invoke-static {p0, p1}, Lz/i/s;->j(Landroidx/recyclerview/widget/RecyclerView$ViewHolder;I)Lkotlin/properties/ReadOnlyProperty;
|
|
|
|
move-result-object p1
|
|
|
|
iput-object p1, p0, Lcom/discord/widgets/settings/connections/WidgetSettingsUserConnections$Adapter$ViewHolder;->displaySwitch$delegate:Lkotlin/properties/ReadOnlyProperty;
|
|
|
|
const p1, 0x7f0a02d6
|
|
|
|
invoke-static {p0, p1}, Lz/i/s;->j(Landroidx/recyclerview/widget/RecyclerView$ViewHolder;I)Lkotlin/properties/ReadOnlyProperty;
|
|
|
|
move-result-object p1
|
|
|
|
iput-object p1, p0, Lcom/discord/widgets/settings/connections/WidgetSettingsUserConnections$Adapter$ViewHolder;->syncFriendsSwitch$delegate:Lkotlin/properties/ReadOnlyProperty;
|
|
|
|
const p1, 0x7f0a02d0
|
|
|
|
invoke-static {p0, p1}, Lz/i/s;->j(Landroidx/recyclerview/widget/RecyclerView$ViewHolder;I)Lkotlin/properties/ReadOnlyProperty;
|
|
|
|
move-result-object p1
|
|
|
|
iput-object p1, p0, Lcom/discord/widgets/settings/connections/WidgetSettingsUserConnections$Adapter$ViewHolder;->showActivitySwitch$delegate:Lkotlin/properties/ReadOnlyProperty;
|
|
|
|
const p1, 0x7f0a02d3
|
|
|
|
invoke-static {p0, p1}, Lz/i/s;->j(Landroidx/recyclerview/widget/RecyclerView$ViewHolder;I)Lkotlin/properties/ReadOnlyProperty;
|
|
|
|
move-result-object p1
|
|
|
|
iput-object p1, p0, Lcom/discord/widgets/settings/connections/WidgetSettingsUserConnections$Adapter$ViewHolder;->extraInfo$delegate:Lkotlin/properties/ReadOnlyProperty;
|
|
|
|
const p1, 0x7f0a05a6
|
|
|
|
invoke-static {p0, p1}, Lz/i/s;->j(Landroidx/recyclerview/widget/RecyclerView$ViewHolder;I)Lkotlin/properties/ReadOnlyProperty;
|
|
|
|
move-result-object p1
|
|
|
|
iput-object p1, p0, Lcom/discord/widgets/settings/connections/WidgetSettingsUserConnections$Adapter$ViewHolder;->integrations$delegate:Lkotlin/properties/ReadOnlyProperty;
|
|
|
|
sget-object p1, Lcom/discord/widgets/settings/connections/WidgetSettingsUserConnections$Adapter$ViewHolder$1;->INSTANCE:Lcom/discord/widgets/settings/connections/WidgetSettingsUserConnections$Adapter$ViewHolder$1;
|
|
|
|
const/4 p2, 0x0
|
|
|
|
new-array p2, p2, [Landroid/view/View;
|
|
|
|
invoke-virtual {p0, p1, p2}, Lcom/discord/utilities/mg_recycler/MGRecyclerViewHolder;->setOnClickListener(Lrx/functions/Action3;[Landroid/view/View;)V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public static final synthetic access$updateUserConnection(Lcom/discord/widgets/settings/connections/WidgetSettingsUserConnections$Adapter$ViewHolder;Lcom/discord/models/domain/ModelConnectedAccount;)V
|
|
.locals 0
|
|
|
|
invoke-direct {p0, p1}, Lcom/discord/widgets/settings/connections/WidgetSettingsUserConnections$Adapter$ViewHolder;->updateUserConnection(Lcom/discord/models/domain/ModelConnectedAccount;)V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method private final getDisconnect()Landroid/widget/ImageView;
|
|
.locals 3
|
|
|
|
iget-object v0, p0, Lcom/discord/widgets/settings/connections/WidgetSettingsUserConnections$Adapter$ViewHolder;->disconnect$delegate:Lkotlin/properties/ReadOnlyProperty;
|
|
|
|
sget-object v1, Lcom/discord/widgets/settings/connections/WidgetSettingsUserConnections$Adapter$ViewHolder;->$$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/widget/ImageView;
|
|
|
|
return-object v0
|
|
.end method
|
|
|
|
.method private final getDisplaySwitch()Landroidx/appcompat/widget/SwitchCompat;
|
|
.locals 3
|
|
|
|
iget-object v0, p0, Lcom/discord/widgets/settings/connections/WidgetSettingsUserConnections$Adapter$ViewHolder;->displaySwitch$delegate:Lkotlin/properties/ReadOnlyProperty;
|
|
|
|
sget-object v1, Lcom/discord/widgets/settings/connections/WidgetSettingsUserConnections$Adapter$ViewHolder;->$$delegatedProperties:[Lkotlin/reflect/KProperty;
|
|
|
|
const/4 v2, 0x3
|
|
|
|
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/appcompat/widget/SwitchCompat;
|
|
|
|
return-object v0
|
|
.end method
|
|
|
|
.method private final getExtraInfo()Landroid/widget/TextView;
|
|
.locals 3
|
|
|
|
iget-object v0, p0, Lcom/discord/widgets/settings/connections/WidgetSettingsUserConnections$Adapter$ViewHolder;->extraInfo$delegate:Lkotlin/properties/ReadOnlyProperty;
|
|
|
|
sget-object v1, Lcom/discord/widgets/settings/connections/WidgetSettingsUserConnections$Adapter$ViewHolder;->$$delegatedProperties:[Lkotlin/reflect/KProperty;
|
|
|
|
const/4 v2, 0x6
|
|
|
|
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/widget/TextView;
|
|
|
|
return-object v0
|
|
.end method
|
|
|
|
.method private final getIntegrations()Landroid/widget/LinearLayout;
|
|
.locals 3
|
|
|
|
iget-object v0, p0, Lcom/discord/widgets/settings/connections/WidgetSettingsUserConnections$Adapter$ViewHolder;->integrations$delegate:Lkotlin/properties/ReadOnlyProperty;
|
|
|
|
sget-object v1, Lcom/discord/widgets/settings/connections/WidgetSettingsUserConnections$Adapter$ViewHolder;->$$delegatedProperties:[Lkotlin/reflect/KProperty;
|
|
|
|
const/4 v2, 0x7
|
|
|
|
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/widget/LinearLayout;
|
|
|
|
return-object v0
|
|
.end method
|
|
|
|
.method private final getPlatformImage()Landroid/widget/ImageView;
|
|
.locals 3
|
|
|
|
iget-object v0, p0, Lcom/discord/widgets/settings/connections/WidgetSettingsUserConnections$Adapter$ViewHolder;->platformImage$delegate:Lkotlin/properties/ReadOnlyProperty;
|
|
|
|
sget-object v1, Lcom/discord/widgets/settings/connections/WidgetSettingsUserConnections$Adapter$ViewHolder;->$$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, Landroid/widget/ImageView;
|
|
|
|
return-object v0
|
|
.end method
|
|
|
|
.method private final getPlatformUserName()Landroid/widget/TextView;
|
|
.locals 3
|
|
|
|
iget-object v0, p0, Lcom/discord/widgets/settings/connections/WidgetSettingsUserConnections$Adapter$ViewHolder;->platformUserName$delegate:Lkotlin/properties/ReadOnlyProperty;
|
|
|
|
sget-object v1, Lcom/discord/widgets/settings/connections/WidgetSettingsUserConnections$Adapter$ViewHolder;->$$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/widget/TextView;
|
|
|
|
return-object v0
|
|
.end method
|
|
|
|
.method private final getShowActivitySwitch()Landroidx/appcompat/widget/SwitchCompat;
|
|
.locals 3
|
|
|
|
iget-object v0, p0, Lcom/discord/widgets/settings/connections/WidgetSettingsUserConnections$Adapter$ViewHolder;->showActivitySwitch$delegate:Lkotlin/properties/ReadOnlyProperty;
|
|
|
|
sget-object v1, Lcom/discord/widgets/settings/connections/WidgetSettingsUserConnections$Adapter$ViewHolder;->$$delegatedProperties:[Lkotlin/reflect/KProperty;
|
|
|
|
const/4 v2, 0x5
|
|
|
|
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/appcompat/widget/SwitchCompat;
|
|
|
|
return-object v0
|
|
.end method
|
|
|
|
.method private final getSyncFriendsSwitch()Landroidx/appcompat/widget/SwitchCompat;
|
|
.locals 3
|
|
|
|
iget-object v0, p0, Lcom/discord/widgets/settings/connections/WidgetSettingsUserConnections$Adapter$ViewHolder;->syncFriendsSwitch$delegate:Lkotlin/properties/ReadOnlyProperty;
|
|
|
|
sget-object v1, Lcom/discord/widgets/settings/connections/WidgetSettingsUserConnections$Adapter$ViewHolder;->$$delegatedProperties:[Lkotlin/reflect/KProperty;
|
|
|
|
const/4 v2, 0x4
|
|
|
|
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/appcompat/widget/SwitchCompat;
|
|
|
|
return-object v0
|
|
.end method
|
|
|
|
.method private final updateUserConnection(Lcom/discord/models/domain/ModelConnectedAccount;)V
|
|
.locals 6
|
|
|
|
sget-object v0, Lcom/discord/stores/StoreStream;->Companion:Lcom/discord/stores/StoreStream$Companion;
|
|
|
|
invoke-virtual {v0}, Lcom/discord/stores/StoreStream$Companion;->getUserConnections()Lcom/discord/stores/StoreUserConnections;
|
|
|
|
move-result-object v0
|
|
|
|
invoke-direct {p0}, Lcom/discord/widgets/settings/connections/WidgetSettingsUserConnections$Adapter$ViewHolder;->getSyncFriendsSwitch()Landroidx/appcompat/widget/SwitchCompat;
|
|
|
|
move-result-object v1
|
|
|
|
invoke-virtual {v1}, Landroid/widget/CompoundButton;->isChecked()Z
|
|
|
|
move-result v1
|
|
|
|
invoke-direct {p0}, Lcom/discord/widgets/settings/connections/WidgetSettingsUserConnections$Adapter$ViewHolder;->getShowActivitySwitch()Landroidx/appcompat/widget/SwitchCompat;
|
|
|
|
move-result-object v2
|
|
|
|
invoke-virtual {v2}, Landroid/widget/CompoundButton;->isChecked()Z
|
|
|
|
move-result v2
|
|
|
|
invoke-direct {p0}, Lcom/discord/widgets/settings/connections/WidgetSettingsUserConnections$Adapter$ViewHolder;->getDisplaySwitch()Landroidx/appcompat/widget/SwitchCompat;
|
|
|
|
move-result-object v3
|
|
|
|
invoke-virtual {v3}, Landroid/widget/CompoundButton;->isChecked()Z
|
|
|
|
move-result v3
|
|
|
|
invoke-virtual {v0, p1, v1, v2, v3}, Lcom/discord/stores/StoreUserConnections;->updateUserConnection(Lcom/discord/models/domain/ModelConnectedAccount;ZZZ)V
|
|
|
|
invoke-virtual {p1}, Lcom/discord/models/domain/ModelConnectedAccount;->getType()Ljava/lang/String;
|
|
|
|
move-result-object p1
|
|
|
|
sget-object v0, Lcom/discord/utilities/platform/Platform;->SPOTIFY:Lcom/discord/utilities/platform/Platform;
|
|
|
|
invoke-virtual {v0}, Lcom/discord/utilities/platform/Platform;->getPlatformId()Ljava/lang/String;
|
|
|
|
move-result-object v0
|
|
|
|
invoke-static {p1, v0}, Lz/n/c/j;->areEqual(Ljava/lang/Object;Ljava/lang/Object;)Z
|
|
|
|
move-result p1
|
|
|
|
if-eqz p1, :cond_0
|
|
|
|
invoke-direct {p0}, Lcom/discord/widgets/settings/connections/WidgetSettingsUserConnections$Adapter$ViewHolder;->getShowActivitySwitch()Landroidx/appcompat/widget/SwitchCompat;
|
|
|
|
move-result-object p1
|
|
|
|
invoke-virtual {p1}, Landroid/widget/CompoundButton;->isChecked()Z
|
|
|
|
move-result p1
|
|
|
|
if-nez p1, :cond_0
|
|
|
|
sget-object p1, Lcom/discord/stores/StoreStream;->Companion:Lcom/discord/stores/StoreStream$Companion;
|
|
|
|
invoke-virtual {p1}, Lcom/discord/stores/StoreStream$Companion;->getPresences()Lcom/discord/stores/StoreUserPresence;
|
|
|
|
move-result-object v0
|
|
|
|
const/4 v1, 0x2
|
|
|
|
const/4 v2, 0x0
|
|
|
|
const/4 v3, 0x0
|
|
|
|
const/4 v4, 0x4
|
|
|
|
const/4 v5, 0x0
|
|
|
|
invoke-static/range {v0 .. v5}, Lcom/discord/stores/StoreUserPresence;->updateActivity$default(Lcom/discord/stores/StoreUserPresence;ILcom/discord/models/domain/activity/ModelActivity;ZILjava/lang/Object;)V
|
|
|
|
:cond_0
|
|
return-void
|
|
.end method
|
|
|
|
|
|
# virtual methods
|
|
.method public onConfigure(ILcom/discord/widgets/settings/connections/WidgetSettingsUserConnections$UserConnectionItem;)V
|
|
.locals 13
|
|
.annotation build Landroid/annotation/SuppressLint;
|
|
value = {
|
|
"DefaultLocale"
|
|
}
|
|
.end annotation
|
|
|
|
const-string v0, "data"
|
|
|
|
invoke-static {p2, v0}, Lz/n/c/j;->checkNotNullParameter(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
invoke-super {p0, p1, p2}, Lcom/discord/utilities/mg_recycler/MGRecyclerViewHolder;->onConfigure(ILjava/lang/Object;)V
|
|
|
|
invoke-virtual {p2}, Lcom/discord/widgets/settings/connections/WidgetSettingsUserConnections$UserConnectionItem;->getConnectedAccount()Lcom/discord/widgets/settings/connections/WidgetSettingsUserConnectionsViewModel$ConnectionState;
|
|
|
|
move-result-object p1
|
|
|
|
invoke-virtual {p1}, Lcom/discord/widgets/settings/connections/WidgetSettingsUserConnectionsViewModel$ConnectionState;->getConnection()Lcom/discord/models/domain/ModelConnectedAccount;
|
|
|
|
move-result-object p1
|
|
|
|
sget-object v0, Lcom/discord/utilities/platform/Platform;->Companion:Lcom/discord/utilities/platform/Platform$Companion;
|
|
|
|
invoke-virtual {v0, p1}, Lcom/discord/utilities/platform/Platform$Companion;->from(Lcom/discord/models/domain/ModelConnectedAccount;)Lcom/discord/utilities/platform/Platform;
|
|
|
|
move-result-object v6
|
|
|
|
invoke-virtual {p1}, Lcom/discord/models/domain/ModelConnectedAccount;->getId()Ljava/lang/String;
|
|
|
|
move-result-object v3
|
|
|
|
const-string v0, "connectedAccount.id"
|
|
|
|
invoke-static {v3, v0}, Lz/n/c/j;->checkNotNullExpressionValue(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
invoke-direct {p0}, Lcom/discord/widgets/settings/connections/WidgetSettingsUserConnections$Adapter$ViewHolder;->getPlatformImage()Landroid/widget/ImageView;
|
|
|
|
move-result-object v0
|
|
|
|
invoke-virtual {v6}, Lcom/discord/utilities/platform/Platform;->getPlatformImage()Ljava/lang/Integer;
|
|
|
|
move-result-object v1
|
|
|
|
const/4 v7, 0x0
|
|
|
|
if-eqz v1, :cond_0
|
|
|
|
invoke-virtual {v1}, Ljava/lang/Integer;->intValue()I
|
|
|
|
move-result v1
|
|
|
|
goto :goto_0
|
|
|
|
:cond_0
|
|
const/4 v1, 0x0
|
|
|
|
:goto_0
|
|
invoke-virtual {v0, v1}, Landroid/widget/ImageView;->setImageResource(I)V
|
|
|
|
invoke-direct {p0}, Lcom/discord/widgets/settings/connections/WidgetSettingsUserConnections$Adapter$ViewHolder;->getPlatformImage()Landroid/widget/ImageView;
|
|
|
|
move-result-object v0
|
|
|
|
invoke-virtual {v6}, Ljava/lang/Enum;->name()Ljava/lang/String;
|
|
|
|
move-result-object v1
|
|
|
|
invoke-virtual {v0, v1}, Landroid/widget/ImageView;->setContentDescription(Ljava/lang/CharSequence;)V
|
|
|
|
invoke-direct {p0}, Lcom/discord/widgets/settings/connections/WidgetSettingsUserConnections$Adapter$ViewHolder;->getPlatformUserName()Landroid/widget/TextView;
|
|
|
|
move-result-object v0
|
|
|
|
invoke-virtual {p1}, Lcom/discord/models/domain/ModelConnectedAccount;->getUsername()Ljava/lang/String;
|
|
|
|
move-result-object v1
|
|
|
|
invoke-virtual {v0, v1}, Landroid/widget/TextView;->setText(Ljava/lang/CharSequence;)V
|
|
|
|
invoke-direct {p0}, Lcom/discord/widgets/settings/connections/WidgetSettingsUserConnections$Adapter$ViewHolder;->getDisconnect()Landroid/widget/ImageView;
|
|
|
|
move-result-object v8
|
|
|
|
new-instance v9, Lcom/discord/widgets/settings/connections/WidgetSettingsUserConnections$Adapter$ViewHolder$onConfigure$$inlined$apply$lambda$1;
|
|
|
|
move-object v0, v9
|
|
|
|
move-object v1, p1
|
|
|
|
move-object v2, v6
|
|
|
|
move-object v4, p0
|
|
|
|
move-object v5, p2
|
|
|
|
invoke-direct/range {v0 .. v5}, Lcom/discord/widgets/settings/connections/WidgetSettingsUserConnections$Adapter$ViewHolder$onConfigure$$inlined$apply$lambda$1;-><init>(Lcom/discord/models/domain/ModelConnectedAccount;Lcom/discord/utilities/platform/Platform;Ljava/lang/String;Lcom/discord/widgets/settings/connections/WidgetSettingsUserConnections$Adapter$ViewHolder;Lcom/discord/widgets/settings/connections/WidgetSettingsUserConnections$UserConnectionItem;)V
|
|
|
|
invoke-virtual {v8, v9}, Landroid/widget/ImageView;->setOnClickListener(Landroid/view/View$OnClickListener;)V
|
|
|
|
invoke-direct {p0}, Lcom/discord/widgets/settings/connections/WidgetSettingsUserConnections$Adapter$ViewHolder;->getDisplaySwitch()Landroidx/appcompat/widget/SwitchCompat;
|
|
|
|
move-result-object v0
|
|
|
|
const/4 v1, 0x0
|
|
|
|
invoke-virtual {v0, v1}, Landroid/widget/CompoundButton;->setOnCheckedChangeListener(Landroid/widget/CompoundButton$OnCheckedChangeListener;)V
|
|
|
|
invoke-direct {p0}, Lcom/discord/widgets/settings/connections/WidgetSettingsUserConnections$Adapter$ViewHolder;->getDisplaySwitch()Landroidx/appcompat/widget/SwitchCompat;
|
|
|
|
move-result-object v0
|
|
|
|
invoke-virtual {p1}, Lcom/discord/models/domain/ModelConnectedAccount;->getVisibility()I
|
|
|
|
move-result v2
|
|
|
|
const/4 v3, 0x1
|
|
|
|
if-ne v2, v3, :cond_1
|
|
|
|
const/4 v2, 0x1
|
|
|
|
goto :goto_1
|
|
|
|
:cond_1
|
|
const/4 v2, 0x0
|
|
|
|
:goto_1
|
|
invoke-virtual {v0, v2}, Landroidx/appcompat/widget/SwitchCompat;->setChecked(Z)V
|
|
|
|
invoke-direct {p0}, Lcom/discord/widgets/settings/connections/WidgetSettingsUserConnections$Adapter$ViewHolder;->getDisplaySwitch()Landroidx/appcompat/widget/SwitchCompat;
|
|
|
|
move-result-object v0
|
|
|
|
new-instance v2, Lcom/discord/widgets/settings/connections/WidgetSettingsUserConnections$Adapter$ViewHolder$onConfigure$$inlined$apply$lambda$2;
|
|
|
|
invoke-direct {v2, p1, p0, p2}, Lcom/discord/widgets/settings/connections/WidgetSettingsUserConnections$Adapter$ViewHolder$onConfigure$$inlined$apply$lambda$2;-><init>(Lcom/discord/models/domain/ModelConnectedAccount;Lcom/discord/widgets/settings/connections/WidgetSettingsUserConnections$Adapter$ViewHolder;Lcom/discord/widgets/settings/connections/WidgetSettingsUserConnections$UserConnectionItem;)V
|
|
|
|
invoke-virtual {v0, v2}, Landroid/widget/CompoundButton;->setOnCheckedChangeListener(Landroid/widget/CompoundButton$OnCheckedChangeListener;)V
|
|
|
|
invoke-direct {p0}, Lcom/discord/widgets/settings/connections/WidgetSettingsUserConnections$Adapter$ViewHolder;->getSyncFriendsSwitch()Landroidx/appcompat/widget/SwitchCompat;
|
|
|
|
move-result-object v0
|
|
|
|
invoke-virtual {v0, v1}, Landroid/widget/CompoundButton;->setOnCheckedChangeListener(Landroid/widget/CompoundButton$OnCheckedChangeListener;)V
|
|
|
|
invoke-direct {p0}, Lcom/discord/widgets/settings/connections/WidgetSettingsUserConnections$Adapter$ViewHolder;->getSyncFriendsSwitch()Landroidx/appcompat/widget/SwitchCompat;
|
|
|
|
move-result-object v0
|
|
|
|
invoke-virtual {v6}, Lcom/discord/utilities/platform/Platform;->getCanSyncFriends()Z
|
|
|
|
move-result v2
|
|
|
|
const/16 v4, 0x8
|
|
|
|
if-eqz v2, :cond_2
|
|
|
|
const/4 v2, 0x0
|
|
|
|
goto :goto_2
|
|
|
|
:cond_2
|
|
const/16 v2, 0x8
|
|
|
|
:goto_2
|
|
invoke-virtual {v0, v2}, Landroid/view/View;->setVisibility(I)V
|
|
|
|
invoke-direct {p0}, Lcom/discord/widgets/settings/connections/WidgetSettingsUserConnections$Adapter$ViewHolder;->getSyncFriendsSwitch()Landroidx/appcompat/widget/SwitchCompat;
|
|
|
|
move-result-object v0
|
|
|
|
invoke-virtual {p1}, Lcom/discord/models/domain/ModelConnectedAccount;->isFriendSync()Z
|
|
|
|
move-result v2
|
|
|
|
invoke-virtual {v0, v2}, Landroidx/appcompat/widget/SwitchCompat;->setChecked(Z)V
|
|
|
|
invoke-direct {p0}, Lcom/discord/widgets/settings/connections/WidgetSettingsUserConnections$Adapter$ViewHolder;->getSyncFriendsSwitch()Landroidx/appcompat/widget/SwitchCompat;
|
|
|
|
move-result-object v0
|
|
|
|
new-instance v2, Lcom/discord/widgets/settings/connections/WidgetSettingsUserConnections$Adapter$ViewHolder$onConfigure$$inlined$apply$lambda$3;
|
|
|
|
invoke-direct {v2, p1, p0, p2}, Lcom/discord/widgets/settings/connections/WidgetSettingsUserConnections$Adapter$ViewHolder$onConfigure$$inlined$apply$lambda$3;-><init>(Lcom/discord/models/domain/ModelConnectedAccount;Lcom/discord/widgets/settings/connections/WidgetSettingsUserConnections$Adapter$ViewHolder;Lcom/discord/widgets/settings/connections/WidgetSettingsUserConnections$UserConnectionItem;)V
|
|
|
|
invoke-virtual {v0, v2}, Landroid/widget/CompoundButton;->setOnCheckedChangeListener(Landroid/widget/CompoundButton$OnCheckedChangeListener;)V
|
|
|
|
invoke-direct {p0}, Lcom/discord/widgets/settings/connections/WidgetSettingsUserConnections$Adapter$ViewHolder;->getShowActivitySwitch()Landroidx/appcompat/widget/SwitchCompat;
|
|
|
|
move-result-object v0
|
|
|
|
invoke-virtual {v0, v1}, Landroid/widget/CompoundButton;->setOnCheckedChangeListener(Landroid/widget/CompoundButton$OnCheckedChangeListener;)V
|
|
|
|
invoke-direct {p0}, Lcom/discord/widgets/settings/connections/WidgetSettingsUserConnections$Adapter$ViewHolder;->getShowActivitySwitch()Landroidx/appcompat/widget/SwitchCompat;
|
|
|
|
move-result-object v0
|
|
|
|
invoke-virtual {v6}, Lcom/discord/utilities/platform/Platform;->getCanShowActivity()Z
|
|
|
|
move-result v2
|
|
|
|
if-eqz v2, :cond_3
|
|
|
|
const/4 v2, 0x0
|
|
|
|
goto :goto_3
|
|
|
|
:cond_3
|
|
const/16 v2, 0x8
|
|
|
|
:goto_3
|
|
invoke-virtual {v0, v2}, Landroid/view/View;->setVisibility(I)V
|
|
|
|
invoke-direct {p0}, Lcom/discord/widgets/settings/connections/WidgetSettingsUserConnections$Adapter$ViewHolder;->getShowActivitySwitch()Landroidx/appcompat/widget/SwitchCompat;
|
|
|
|
move-result-object v0
|
|
|
|
iget-object v2, p0, Landroidx/recyclerview/widget/RecyclerView$ViewHolder;->itemView:Landroid/view/View;
|
|
|
|
const-string v5, "itemView"
|
|
|
|
invoke-static {v2, v5}, Lz/n/c/j;->checkNotNullExpressionValue(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
invoke-virtual {v2}, Landroid/view/View;->getContext()Landroid/content/Context;
|
|
|
|
move-result-object v2
|
|
|
|
const v5, 0x7f120617
|
|
|
|
new-array v8, v3, [Ljava/lang/Object;
|
|
|
|
invoke-virtual {v6}, Lcom/discord/utilities/platform/Platform;->getProperName()Ljava/lang/String;
|
|
|
|
move-result-object v6
|
|
|
|
const-string v9, "$this$capitalize"
|
|
|
|
invoke-static {v6, v9}, Lz/n/c/j;->checkNotNullParameter(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
invoke-static {}, Ljava/util/Locale;->getDefault()Ljava/util/Locale;
|
|
|
|
move-result-object v10
|
|
|
|
const-string v11, "Locale.getDefault()"
|
|
|
|
invoke-static {v10, v11}, Lz/n/c/j;->checkNotNullExpressionValue(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
invoke-static {v6, v9}, Lz/n/c/j;->checkNotNullParameter(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
const-string v9, "locale"
|
|
|
|
invoke-static {v10, v9}, Lz/n/c/j;->checkNotNullParameter(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
invoke-virtual {v6}, Ljava/lang/String;->length()I
|
|
|
|
move-result v9
|
|
|
|
if-lez v9, :cond_4
|
|
|
|
const/4 v9, 0x1
|
|
|
|
goto :goto_4
|
|
|
|
:cond_4
|
|
const/4 v9, 0x0
|
|
|
|
:goto_4
|
|
if-eqz v9, :cond_6
|
|
|
|
invoke-virtual {v6, v7}, Ljava/lang/String;->charAt(I)C
|
|
|
|
move-result v9
|
|
|
|
invoke-static {v9}, Ljava/lang/Character;->isLowerCase(C)Z
|
|
|
|
move-result v11
|
|
|
|
if-eqz v11, :cond_6
|
|
|
|
new-instance v11, Ljava/lang/StringBuilder;
|
|
|
|
invoke-direct {v11}, Ljava/lang/StringBuilder;-><init>()V
|
|
|
|
invoke-static {v9}, Ljava/lang/Character;->toTitleCase(C)C
|
|
|
|
move-result v12
|
|
|
|
invoke-static {v9}, Ljava/lang/Character;->toUpperCase(C)C
|
|
|
|
move-result v9
|
|
|
|
if-eq v12, v9, :cond_5
|
|
|
|
invoke-virtual {v11, v12}, Ljava/lang/StringBuilder;->append(C)Ljava/lang/StringBuilder;
|
|
|
|
goto :goto_5
|
|
|
|
:cond_5
|
|
invoke-virtual {v6, v7, v3}, Ljava/lang/String;->substring(II)Ljava/lang/String;
|
|
|
|
move-result-object v9
|
|
|
|
const-string v12, "(this as java.lang.Strin\u2026ing(startIndex, endIndex)"
|
|
|
|
invoke-static {v9, v12}, Lz/n/c/j;->checkNotNullExpressionValue(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
invoke-virtual {v9, v10}, Ljava/lang/String;->toUpperCase(Ljava/util/Locale;)Ljava/lang/String;
|
|
|
|
move-result-object v9
|
|
|
|
const-string v10, "(this as java.lang.String).toUpperCase(locale)"
|
|
|
|
invoke-static {v9, v10}, Lz/n/c/j;->checkNotNullExpressionValue(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
invoke-virtual {v11, v9}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
:goto_5
|
|
invoke-virtual {v6, v3}, Ljava/lang/String;->substring(I)Ljava/lang/String;
|
|
|
|
move-result-object v6
|
|
|
|
const-string v9, "(this as java.lang.String).substring(startIndex)"
|
|
|
|
invoke-static {v6, v9}, Lz/n/c/j;->checkNotNullExpressionValue(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
invoke-virtual {v11, v6}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
invoke-virtual {v11}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
|
|
|
|
move-result-object v6
|
|
|
|
const-string v9, "StringBuilder().apply(builderAction).toString()"
|
|
|
|
invoke-static {v6, v9}, Lz/n/c/j;->checkNotNullExpressionValue(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
:cond_6
|
|
aput-object v6, v8, v7
|
|
|
|
invoke-virtual {v2, v5, v8}, Landroid/content/Context;->getString(I[Ljava/lang/Object;)Ljava/lang/String;
|
|
|
|
move-result-object v2
|
|
|
|
invoke-virtual {v0, v2}, Landroid/widget/CompoundButton;->setText(Ljava/lang/CharSequence;)V
|
|
|
|
invoke-direct {p0}, Lcom/discord/widgets/settings/connections/WidgetSettingsUserConnections$Adapter$ViewHolder;->getShowActivitySwitch()Landroidx/appcompat/widget/SwitchCompat;
|
|
|
|
move-result-object v0
|
|
|
|
invoke-virtual {p1}, Lcom/discord/models/domain/ModelConnectedAccount;->isShowActivity()Z
|
|
|
|
move-result v2
|
|
|
|
invoke-virtual {v0, v2}, Landroidx/appcompat/widget/SwitchCompat;->setChecked(Z)V
|
|
|
|
invoke-direct {p0}, Lcom/discord/widgets/settings/connections/WidgetSettingsUserConnections$Adapter$ViewHolder;->getShowActivitySwitch()Landroidx/appcompat/widget/SwitchCompat;
|
|
|
|
move-result-object v0
|
|
|
|
new-instance v2, Lcom/discord/widgets/settings/connections/WidgetSettingsUserConnections$Adapter$ViewHolder$onConfigure$$inlined$apply$lambda$4;
|
|
|
|
invoke-direct {v2, p1, p0, p2}, Lcom/discord/widgets/settings/connections/WidgetSettingsUserConnections$Adapter$ViewHolder$onConfigure$$inlined$apply$lambda$4;-><init>(Lcom/discord/models/domain/ModelConnectedAccount;Lcom/discord/widgets/settings/connections/WidgetSettingsUserConnections$Adapter$ViewHolder;Lcom/discord/widgets/settings/connections/WidgetSettingsUserConnections$UserConnectionItem;)V
|
|
|
|
invoke-virtual {v0, v2}, Landroid/widget/CompoundButton;->setOnCheckedChangeListener(Landroid/widget/CompoundButton$OnCheckedChangeListener;)V
|
|
|
|
invoke-virtual {p1}, Lcom/discord/models/domain/ModelConnectedAccount;->getType()Ljava/lang/String;
|
|
|
|
move-result-object v0
|
|
|
|
sget-object v2, Lcom/discord/utilities/platform/Platform;->SPOTIFY:Lcom/discord/utilities/platform/Platform;
|
|
|
|
invoke-virtual {v2}, Lcom/discord/utilities/platform/Platform;->getPlatformId()Ljava/lang/String;
|
|
|
|
move-result-object v2
|
|
|
|
invoke-static {v0, v2}, Lz/n/c/j;->areEqual(Ljava/lang/Object;Ljava/lang/Object;)Z
|
|
|
|
move-result v0
|
|
|
|
if-eqz v0, :cond_7
|
|
|
|
invoke-direct {p0}, Lcom/discord/widgets/settings/connections/WidgetSettingsUserConnections$Adapter$ViewHolder;->getExtraInfo()Landroid/widget/TextView;
|
|
|
|
move-result-object v0
|
|
|
|
invoke-virtual {v0, v7}, Landroid/widget/TextView;->setVisibility(I)V
|
|
|
|
invoke-direct {p0}, Lcom/discord/widgets/settings/connections/WidgetSettingsUserConnections$Adapter$ViewHolder;->getExtraInfo()Landroid/widget/TextView;
|
|
|
|
move-result-object v0
|
|
|
|
iget-object v2, p0, Lcom/discord/widgets/settings/connections/WidgetSettingsUserConnections$Adapter$ViewHolder;->this$0:Lcom/discord/widgets/settings/connections/WidgetSettingsUserConnections$Adapter;
|
|
|
|
invoke-virtual {v2}, Lcom/discord/utilities/mg_recycler/MGRecyclerAdapter;->getContext()Landroid/content/Context;
|
|
|
|
move-result-object v2
|
|
|
|
const v5, 0x7f121665
|
|
|
|
invoke-virtual {v2, v5}, Landroid/content/Context;->getString(I)Ljava/lang/String;
|
|
|
|
move-result-object v2
|
|
|
|
new-array v5, v7, [Ljava/lang/Object;
|
|
|
|
invoke-static {v0, v2, v5}, Lcom/discord/utilities/view/extensions/ViewExtensions;->setTextWithMarkdown(Landroid/widget/TextView;Ljava/lang/String;[Ljava/lang/Object;)V
|
|
|
|
invoke-direct {p0}, Lcom/discord/widgets/settings/connections/WidgetSettingsUserConnections$Adapter$ViewHolder;->getExtraInfo()Landroid/widget/TextView;
|
|
|
|
move-result-object v0
|
|
|
|
new-instance v2, Lcom/discord/widgets/settings/connections/WidgetSettingsUserConnections$Adapter$ViewHolder$onConfigure$$inlined$apply$lambda$5;
|
|
|
|
invoke-direct {v2, p0, p2}, Lcom/discord/widgets/settings/connections/WidgetSettingsUserConnections$Adapter$ViewHolder$onConfigure$$inlined$apply$lambda$5;-><init>(Lcom/discord/widgets/settings/connections/WidgetSettingsUserConnections$Adapter$ViewHolder;Lcom/discord/widgets/settings/connections/WidgetSettingsUserConnections$UserConnectionItem;)V
|
|
|
|
invoke-virtual {v0, v2}, Landroid/widget/TextView;->setOnClickListener(Landroid/view/View$OnClickListener;)V
|
|
|
|
goto :goto_6
|
|
|
|
:cond_7
|
|
invoke-direct {p0}, Lcom/discord/widgets/settings/connections/WidgetSettingsUserConnections$Adapter$ViewHolder;->getExtraInfo()Landroid/widget/TextView;
|
|
|
|
move-result-object v0
|
|
|
|
invoke-virtual {v0, v4}, Landroid/widget/TextView;->setVisibility(I)V
|
|
|
|
:goto_6
|
|
invoke-virtual {p1}, Lcom/discord/models/domain/ModelConnectedAccount;->getIntegrations()Ljava/util/List;
|
|
|
|
move-result-object v0
|
|
|
|
if-eqz v0, :cond_9
|
|
|
|
invoke-interface {v0}, Ljava/util/Collection;->isEmpty()Z
|
|
|
|
move-result v0
|
|
|
|
if-eqz v0, :cond_8
|
|
|
|
goto :goto_7
|
|
|
|
:cond_8
|
|
const/4 v0, 0x0
|
|
|
|
goto :goto_8
|
|
|
|
:cond_9
|
|
:goto_7
|
|
const/4 v0, 0x1
|
|
|
|
:goto_8
|
|
if-nez v0, :cond_c
|
|
|
|
invoke-direct {p0}, Lcom/discord/widgets/settings/connections/WidgetSettingsUserConnections$Adapter$ViewHolder;->getIntegrations()Landroid/widget/LinearLayout;
|
|
|
|
move-result-object v0
|
|
|
|
invoke-virtual {v0, v7}, Landroid/widget/LinearLayout;->setVisibility(I)V
|
|
|
|
invoke-direct {p0}, Lcom/discord/widgets/settings/connections/WidgetSettingsUserConnections$Adapter$ViewHolder;->getIntegrations()Landroid/widget/LinearLayout;
|
|
|
|
move-result-object v0
|
|
|
|
const v2, 0x7f0a061a
|
|
|
|
invoke-virtual {v0, v2}, Landroid/widget/LinearLayout;->findViewById(I)Landroid/view/View;
|
|
|
|
move-result-object v0
|
|
|
|
invoke-direct {p0}, Lcom/discord/widgets/settings/connections/WidgetSettingsUserConnections$Adapter$ViewHolder;->getIntegrations()Landroid/widget/LinearLayout;
|
|
|
|
move-result-object v2
|
|
|
|
invoke-virtual {v2, v0}, Landroid/widget/LinearLayout;->indexOfChild(Landroid/view/View;)I
|
|
|
|
move-result v0
|
|
|
|
const/4 v2, -0x1
|
|
|
|
if-eq v0, v2, :cond_a
|
|
|
|
invoke-direct {p0}, Lcom/discord/widgets/settings/connections/WidgetSettingsUserConnections$Adapter$ViewHolder;->getIntegrations()Landroid/widget/LinearLayout;
|
|
|
|
move-result-object v2
|
|
|
|
add-int/2addr v0, v3
|
|
|
|
invoke-direct {p0}, Lcom/discord/widgets/settings/connections/WidgetSettingsUserConnections$Adapter$ViewHolder;->getIntegrations()Landroid/widget/LinearLayout;
|
|
|
|
move-result-object v3
|
|
|
|
invoke-virtual {v3}, Landroid/widget/LinearLayout;->getChildCount()I
|
|
|
|
move-result v3
|
|
|
|
sub-int/2addr v3, v0
|
|
|
|
invoke-virtual {v2, v0, v3}, Landroid/widget/LinearLayout;->removeViewsInLayout(II)V
|
|
|
|
:cond_a
|
|
invoke-virtual {p1}, Lcom/discord/models/domain/ModelConnectedAccount;->getIntegrations()Ljava/util/List;
|
|
|
|
move-result-object p1
|
|
|
|
if-eqz p1, :cond_d
|
|
|
|
invoke-interface {p1}, Ljava/lang/Iterable;->iterator()Ljava/util/Iterator;
|
|
|
|
move-result-object p1
|
|
|
|
:goto_9
|
|
invoke-interface {p1}, Ljava/util/Iterator;->hasNext()Z
|
|
|
|
move-result v0
|
|
|
|
if-eqz v0, :cond_d
|
|
|
|
invoke-interface {p1}, Ljava/util/Iterator;->next()Ljava/lang/Object;
|
|
|
|
move-result-object v0
|
|
|
|
check-cast v0, Lcom/discord/models/domain/ModelConnectedAccountIntegration;
|
|
|
|
invoke-direct {p0}, Lcom/discord/widgets/settings/connections/WidgetSettingsUserConnections$Adapter$ViewHolder;->getIntegrations()Landroid/widget/LinearLayout;
|
|
|
|
move-result-object v2
|
|
|
|
new-instance v3, Lcom/discord/widgets/settings/connections/ConnectionsGuildIntegrationView;
|
|
|
|
iget-object v4, p0, Lcom/discord/widgets/settings/connections/WidgetSettingsUserConnections$Adapter$ViewHolder;->this$0:Lcom/discord/widgets/settings/connections/WidgetSettingsUserConnections$Adapter;
|
|
|
|
invoke-virtual {v4}, Lcom/discord/utilities/mg_recycler/MGRecyclerAdapter;->getContext()Landroid/content/Context;
|
|
|
|
move-result-object v4
|
|
|
|
invoke-direct {v3, v4, v1}, Lcom/discord/widgets/settings/connections/ConnectionsGuildIntegrationView;-><init>(Landroid/content/Context;Landroid/util/AttributeSet;)V
|
|
|
|
const-string v4, "integration"
|
|
|
|
invoke-static {v0, v4}, Lz/n/c/j;->checkNotNullExpressionValue(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
invoke-virtual {p2}, Lcom/discord/widgets/settings/connections/WidgetSettingsUserConnections$UserConnectionItem;->getConnectedAccount()Lcom/discord/widgets/settings/connections/WidgetSettingsUserConnectionsViewModel$ConnectionState;
|
|
|
|
move-result-object v4
|
|
|
|
invoke-virtual {v4}, Lcom/discord/widgets/settings/connections/WidgetSettingsUserConnectionsViewModel$ConnectionState;->getIntegrationJoinStatus()Ljava/util/Map;
|
|
|
|
move-result-object v4
|
|
|
|
invoke-virtual {v0}, Lcom/discord/models/domain/ModelConnectedAccountIntegration;->getGuild()Lcom/discord/models/domain/ModelConnectedIntegrationGuild;
|
|
|
|
move-result-object v5
|
|
|
|
if-eqz v5, :cond_b
|
|
|
|
invoke-virtual {v5}, Lcom/discord/models/domain/ModelConnectedIntegrationGuild;->getId()J
|
|
|
|
move-result-wide v5
|
|
|
|
invoke-static {v5, v6}, Ljava/lang/Long;->valueOf(J)Ljava/lang/Long;
|
|
|
|
move-result-object v5
|
|
|
|
goto :goto_a
|
|
|
|
:cond_b
|
|
move-object v5, v1
|
|
|
|
:goto_a
|
|
invoke-interface {v4, v5}, Ljava/util/Map;->get(Ljava/lang/Object;)Ljava/lang/Object;
|
|
|
|
move-result-object v4
|
|
|
|
check-cast v4, Lcom/discord/widgets/settings/connections/WidgetSettingsUserConnectionsViewModel$JoinStatus;
|
|
|
|
invoke-virtual {v3, v0, v4}, Lcom/discord/widgets/settings/connections/ConnectionsGuildIntegrationView;->setIntegrationData(Lcom/discord/models/domain/ModelConnectedAccountIntegration;Lcom/discord/widgets/settings/connections/WidgetSettingsUserConnectionsViewModel$JoinStatus;)V
|
|
|
|
new-instance v4, Lcom/discord/widgets/settings/connections/WidgetSettingsUserConnections$Adapter$ViewHolder$onConfigure$$inlined$apply$lambda$6;
|
|
|
|
invoke-direct {v4, v0, p0, p2}, Lcom/discord/widgets/settings/connections/WidgetSettingsUserConnections$Adapter$ViewHolder$onConfigure$$inlined$apply$lambda$6;-><init>(Lcom/discord/models/domain/ModelConnectedAccountIntegration;Lcom/discord/widgets/settings/connections/WidgetSettingsUserConnections$Adapter$ViewHolder;Lcom/discord/widgets/settings/connections/WidgetSettingsUserConnections$UserConnectionItem;)V
|
|
|
|
invoke-virtual {v3, v4}, Lcom/discord/widgets/settings/connections/ConnectionsGuildIntegrationView;->setJoinClickListener(Landroid/view/View$OnClickListener;)V
|
|
|
|
invoke-virtual {v2, v3}, Landroid/widget/LinearLayout;->addView(Landroid/view/View;)V
|
|
|
|
goto :goto_9
|
|
|
|
:cond_c
|
|
invoke-direct {p0}, Lcom/discord/widgets/settings/connections/WidgetSettingsUserConnections$Adapter$ViewHolder;->getIntegrations()Landroid/widget/LinearLayout;
|
|
|
|
move-result-object p1
|
|
|
|
invoke-virtual {p1, v4}, Landroid/widget/LinearLayout;->setVisibility(I)V
|
|
|
|
:cond_d
|
|
return-void
|
|
.end method
|
|
|
|
.method public bridge synthetic onConfigure(ILjava/lang/Object;)V
|
|
.locals 0
|
|
|
|
check-cast p2, Lcom/discord/widgets/settings/connections/WidgetSettingsUserConnections$UserConnectionItem;
|
|
|
|
invoke-virtual {p0, p1, p2}, Lcom/discord/widgets/settings/connections/WidgetSettingsUserConnections$Adapter$ViewHolder;->onConfigure(ILcom/discord/widgets/settings/connections/WidgetSettingsUserConnections$UserConnectionItem;)V
|
|
|
|
return-void
|
|
.end method
|