apkfuckery/com.discord/smali/com/discord/widgets/user/usersheet/WidgetUserSheet$configureAdministrativeSection$7.smali
2019-08-30 22:04:20 +02:00

133 lines
5.3 KiB
Smali

.class final Lcom/discord/widgets/user/usersheet/WidgetUserSheet$configureAdministrativeSection$7;
.super Ljava/lang/Object;
.source "WidgetUserSheet.kt"
# interfaces
.implements Landroid/view/View$OnClickListener;
# annotations
.annotation system Ldalvik/annotation/EnclosingMethod;
value = Lcom/discord/widgets/user/usersheet/WidgetUserSheet;->configureAdministrativeSection(Lcom/discord/widgets/user/usersheet/WidgetUserSheetModel;)V
.end annotation
.annotation system Ldalvik/annotation/InnerClass;
accessFlags = 0x18
name = null
.end annotation
# instance fields
.field final synthetic $this_configureAdministrativeSection:Lcom/discord/widgets/user/usersheet/WidgetUserSheetModel;
.field final synthetic this$0:Lcom/discord/widgets/user/usersheet/WidgetUserSheet;
# direct methods
.method constructor <init>(Lcom/discord/widgets/user/usersheet/WidgetUserSheet;Lcom/discord/widgets/user/usersheet/WidgetUserSheetModel;)V
.locals 0
iput-object p1, p0, Lcom/discord/widgets/user/usersheet/WidgetUserSheet$configureAdministrativeSection$7;->this$0:Lcom/discord/widgets/user/usersheet/WidgetUserSheet;
iput-object p2, p0, Lcom/discord/widgets/user/usersheet/WidgetUserSheet$configureAdministrativeSection$7;->$this_configureAdministrativeSection:Lcom/discord/widgets/user/usersheet/WidgetUserSheetModel;
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
return-void
.end method
# virtual methods
.method public final onClick(Landroid/view/View;)V
.locals 7
sget-object p1, Lcom/discord/utilities/rest/RestAPI;->Companion:Lcom/discord/utilities/rest/RestAPI$Companion;
invoke-virtual {p1}, Lcom/discord/utilities/rest/RestAPI$Companion;->getApi()Lcom/discord/utilities/rest/RestAPI;
move-result-object v0
iget-object p1, p0, Lcom/discord/widgets/user/usersheet/WidgetUserSheet$configureAdministrativeSection$7;->$this_configureAdministrativeSection:Lcom/discord/widgets/user/usersheet/WidgetUserSheetModel;
invoke-virtual {p1}, Lcom/discord/widgets/user/usersheet/WidgetUserSheetModel;->getChannel()Lcom/discord/models/domain/ModelChannel;
move-result-object p1
invoke-virtual {p1}, Lcom/discord/models/domain/ModelChannel;->getGuildId()Ljava/lang/Long;
move-result-object p1
const-string v1, "channel.guildId"
invoke-static {p1, v1}, Lkotlin/jvm/internal/k;->g(Ljava/lang/Object;Ljava/lang/String;)V
invoke-virtual {p1}, Ljava/lang/Long;->longValue()J
move-result-wide v1
iget-object p1, p0, Lcom/discord/widgets/user/usersheet/WidgetUserSheet$configureAdministrativeSection$7;->$this_configureAdministrativeSection:Lcom/discord/widgets/user/usersheet/WidgetUserSheetModel;
invoke-virtual {p1}, Lcom/discord/widgets/user/usersheet/WidgetUserSheetModel;->getUser()Lcom/discord/models/domain/ModelUser;
move-result-object p1
invoke-virtual {p1}, Lcom/discord/models/domain/ModelUser;->getId()J
move-result-wide v3
sget-object p1, Lcom/discord/restapi/RestAPIParams$GuildMember;->Companion:Lcom/discord/restapi/RestAPIParams$GuildMember$Companion;
iget-object v5, p0, Lcom/discord/widgets/user/usersheet/WidgetUserSheet$configureAdministrativeSection$7;->$this_configureAdministrativeSection:Lcom/discord/widgets/user/usersheet/WidgetUserSheetModel;
invoke-virtual {v5}, Lcom/discord/widgets/user/usersheet/WidgetUserSheetModel;->isServerDeafened()Z
move-result v5
const/4 v6, 0x1
xor-int/2addr v5, v6
invoke-virtual {p1, v5}, Lcom/discord/restapi/RestAPIParams$GuildMember$Companion;->createWithDeaf(Z)Lcom/discord/restapi/RestAPIParams$GuildMember;
move-result-object v5
invoke-virtual/range {v0 .. v5}, Lcom/discord/utilities/rest/RestAPI;->changeGuildMember(JJLcom/discord/restapi/RestAPIParams$GuildMember;)Lrx/Observable;
move-result-object p1
const/4 v0, 0x0
const/4 v1, 0x0
invoke-static {p1, v0, v6, v1}, Lcom/discord/utilities/rx/ObservableExtensionsKt;->restSubscribeOn$default(Lrx/Observable;ZILjava/lang/Object;)Lrx/Observable;
move-result-object p1
iget-object v0, p0, Lcom/discord/widgets/user/usersheet/WidgetUserSheet$configureAdministrativeSection$7;->this$0:Lcom/discord/widgets/user/usersheet/WidgetUserSheet;
check-cast v0, Lcom/discord/app/AppComponent;
const/4 v2, 0x2
invoke-static {p1, v0, v1, v2, v1}, Lcom/discord/utilities/rx/ObservableExtensionsKt;->ui$default(Lrx/Observable;Lcom/discord/app/AppComponent;Lcom/discord/utilities/mg_recycler/MGRecyclerAdapterSimple;ILjava/lang/Object;)Lrx/Observable;
move-result-object p1
sget-object v0, Lcom/discord/widgets/user/usersheet/WidgetUserSheet$configureAdministrativeSection$7$1;->INSTANCE:Lcom/discord/widgets/user/usersheet/WidgetUserSheet$configureAdministrativeSection$7$1;
check-cast v0, Lrx/functions/Action1;
iget-object v1, p0, Lcom/discord/widgets/user/usersheet/WidgetUserSheet$configureAdministrativeSection$7;->this$0:Lcom/discord/widgets/user/usersheet/WidgetUserSheet;
invoke-virtual {v1}, Lcom/discord/widgets/user/usersheet/WidgetUserSheet;->getContext()Landroid/content/Context;
move-result-object v1
invoke-static {v0, v1}, Lcom/discord/app/i;->a(Lrx/functions/Action1;Landroid/content/Context;)Lrx/Observable$c;
move-result-object v0
invoke-virtual {p1, v0}, Lrx/Observable;->a(Lrx/Observable$c;)Lrx/Observable;
return-void
.end method