2020-09-22 07:09:10 +00:00
|
|
|
.class public final Lcom/discord/widgets/servers/community/WidgetServerSettingsCommunityOverviewViewModel;
|
|
|
|
.super Lf/a/b/q0;
|
|
|
|
.source "WidgetServerSettingsCommunityOverviewViewModel.kt"
|
|
|
|
|
|
|
|
# interfaces
|
|
|
|
.implements Lcom/discord/app/AppComponent;
|
|
|
|
|
|
|
|
|
|
|
|
# annotations
|
|
|
|
.annotation system Ldalvik/annotation/MemberClasses;
|
|
|
|
value = {
|
|
|
|
Lcom/discord/widgets/servers/community/WidgetServerSettingsCommunityOverviewViewModel$ViewState;,
|
|
|
|
Lcom/discord/widgets/servers/community/WidgetServerSettingsCommunityOverviewViewModel$StoreState;,
|
|
|
|
Lcom/discord/widgets/servers/community/WidgetServerSettingsCommunityOverviewViewModel$Event;,
|
|
|
|
Lcom/discord/widgets/servers/community/WidgetServerSettingsCommunityOverviewViewModel$Factory;
|
|
|
|
}
|
|
|
|
.end annotation
|
|
|
|
|
|
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
|
|
value = {
|
|
|
|
"Lf/a/b/q0<",
|
|
|
|
"Lcom/discord/widgets/servers/community/WidgetServerSettingsCommunityOverviewViewModel$ViewState;",
|
|
|
|
">;",
|
|
|
|
"Lcom/discord/app/AppComponent;"
|
|
|
|
}
|
|
|
|
.end annotation
|
|
|
|
|
|
|
|
|
|
|
|
# instance fields
|
|
|
|
.field public final eventSubject:Lrx/subjects/PublishSubject;
|
|
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
|
|
value = {
|
|
|
|
"Lrx/subjects/PublishSubject<",
|
|
|
|
"Lcom/discord/widgets/servers/community/WidgetServerSettingsCommunityOverviewViewModel$Event;",
|
|
|
|
">;"
|
|
|
|
}
|
|
|
|
.end annotation
|
|
|
|
.end field
|
|
|
|
|
|
|
|
.field public final guildId:J
|
|
|
|
|
|
|
|
.field public final storeStateObservable:Lrx/Observable;
|
|
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
|
|
value = {
|
|
|
|
"Lrx/Observable<",
|
|
|
|
"Lcom/discord/widgets/servers/community/WidgetServerSettingsCommunityOverviewViewModel$StoreState;",
|
|
|
|
">;"
|
|
|
|
}
|
|
|
|
.end annotation
|
|
|
|
.end field
|
|
|
|
|
|
|
|
|
|
|
|
# direct methods
|
|
|
|
.method public constructor <init>(JLrx/Observable;)V
|
|
|
|
.locals 9
|
|
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
|
|
value = {
|
|
|
|
"(J",
|
|
|
|
"Lrx/Observable<",
|
|
|
|
"Lcom/discord/widgets/servers/community/WidgetServerSettingsCommunityOverviewViewModel$StoreState;",
|
|
|
|
">;)V"
|
|
|
|
}
|
|
|
|
.end annotation
|
|
|
|
|
|
|
|
const-string v0, "storeStateObservable"
|
|
|
|
|
2020-09-23 03:12:49 +00:00
|
|
|
invoke-static {p3, v0}, Lc0/n/c/j;->checkNotNullParameter(Ljava/lang/Object;Ljava/lang/String;)V
|
2020-09-22 07:09:10 +00:00
|
|
|
|
|
|
|
sget-object v0, Lcom/discord/widgets/servers/community/WidgetServerSettingsCommunityOverviewViewModel$ViewState$Uninitialized;->INSTANCE:Lcom/discord/widgets/servers/community/WidgetServerSettingsCommunityOverviewViewModel$ViewState$Uninitialized;
|
|
|
|
|
|
|
|
invoke-direct {p0, v0}, Lf/a/b/q0;-><init>(Ljava/lang/Object;)V
|
|
|
|
|
|
|
|
iput-wide p1, p0, Lcom/discord/widgets/servers/community/WidgetServerSettingsCommunityOverviewViewModel;->guildId:J
|
|
|
|
|
|
|
|
iput-object p3, p0, Lcom/discord/widgets/servers/community/WidgetServerSettingsCommunityOverviewViewModel;->storeStateObservable:Lrx/Observable;
|
|
|
|
|
2020-09-23 03:12:49 +00:00
|
|
|
invoke-static {}, Lrx/subjects/PublishSubject;->h0()Lrx/subjects/PublishSubject;
|
2020-09-22 07:09:10 +00:00
|
|
|
|
|
|
|
move-result-object p1
|
|
|
|
|
|
|
|
iput-object p1, p0, Lcom/discord/widgets/servers/community/WidgetServerSettingsCommunityOverviewViewModel;->eventSubject:Lrx/subjects/PublishSubject;
|
|
|
|
|
|
|
|
iget-object p1, p0, Lcom/discord/widgets/servers/community/WidgetServerSettingsCommunityOverviewViewModel;->storeStateObservable:Lrx/Observable;
|
|
|
|
|
|
|
|
invoke-static {p1}, Lcom/discord/utilities/rx/ObservableExtensionsKt;->computationLatest(Lrx/Observable;)Lrx/Observable;
|
|
|
|
|
|
|
|
move-result-object p1
|
|
|
|
|
|
|
|
const/4 p2, 0x0
|
|
|
|
|
|
|
|
const/4 p3, 0x2
|
|
|
|
|
|
|
|
invoke-static {p1, p0, p2, p3, p2}, 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 v0
|
|
|
|
|
|
|
|
const-class v1, Lcom/discord/widgets/servers/community/WidgetServerSettingsCommunityOverviewViewModel;
|
|
|
|
|
|
|
|
new-instance v6, Lcom/discord/widgets/servers/community/WidgetServerSettingsCommunityOverviewViewModel$1;
|
|
|
|
|
|
|
|
invoke-direct {v6, p0}, Lcom/discord/widgets/servers/community/WidgetServerSettingsCommunityOverviewViewModel$1;-><init>(Lcom/discord/widgets/servers/community/WidgetServerSettingsCommunityOverviewViewModel;)V
|
|
|
|
|
|
|
|
const/4 v2, 0x0
|
|
|
|
|
|
|
|
const/4 v3, 0x0
|
|
|
|
|
|
|
|
const/4 v4, 0x0
|
|
|
|
|
|
|
|
const/4 v5, 0x0
|
|
|
|
|
|
|
|
const/16 v7, 0x1e
|
|
|
|
|
|
|
|
const/4 v8, 0x0
|
|
|
|
|
|
|
|
invoke-static/range {v0 .. v8}, Lcom/discord/utilities/rx/ObservableExtensionsKt;->appSubscribe$default(Lrx/Observable;Ljava/lang/Class;Landroid/content/Context;Lkotlin/jvm/functions/Function1;Lkotlin/jvm/functions/Function1;Lkotlin/jvm/functions/Function0;Lkotlin/jvm/functions/Function1;ILjava/lang/Object;)V
|
|
|
|
|
|
|
|
return-void
|
|
|
|
.end method
|
|
|
|
|
|
|
|
.method public static final synthetic access$getEventSubject$p(Lcom/discord/widgets/servers/community/WidgetServerSettingsCommunityOverviewViewModel;)Lrx/subjects/PublishSubject;
|
|
|
|
.locals 0
|
|
|
|
|
|
|
|
iget-object p0, p0, Lcom/discord/widgets/servers/community/WidgetServerSettingsCommunityOverviewViewModel;->eventSubject:Lrx/subjects/PublishSubject;
|
|
|
|
|
|
|
|
return-object p0
|
|
|
|
.end method
|
|
|
|
|
|
|
|
.method public static final synthetic access$handleDisableCommunityButtonState(Lcom/discord/widgets/servers/community/WidgetServerSettingsCommunityOverviewViewModel;Z)V
|
|
|
|
.locals 0
|
|
|
|
|
|
|
|
invoke-direct {p0, p1}, Lcom/discord/widgets/servers/community/WidgetServerSettingsCommunityOverviewViewModel;->handleDisableCommunityButtonState(Z)V
|
|
|
|
|
|
|
|
return-void
|
|
|
|
.end method
|
|
|
|
|
|
|
|
.method public static final synthetic access$handleGuildUpdateError(Lcom/discord/widgets/servers/community/WidgetServerSettingsCommunityOverviewViewModel;)V
|
|
|
|
.locals 0
|
|
|
|
|
|
|
|
invoke-direct {p0}, Lcom/discord/widgets/servers/community/WidgetServerSettingsCommunityOverviewViewModel;->handleGuildUpdateError()V
|
|
|
|
|
|
|
|
return-void
|
|
|
|
.end method
|
|
|
|
|
|
|
|
.method public static final synthetic access$handleStoreState(Lcom/discord/widgets/servers/community/WidgetServerSettingsCommunityOverviewViewModel;Lcom/discord/widgets/servers/community/WidgetServerSettingsCommunityOverviewViewModel$StoreState;)V
|
|
|
|
.locals 0
|
|
|
|
|
|
|
|
invoke-direct {p0, p1}, Lcom/discord/widgets/servers/community/WidgetServerSettingsCommunityOverviewViewModel;->handleStoreState(Lcom/discord/widgets/servers/community/WidgetServerSettingsCommunityOverviewViewModel$StoreState;)V
|
|
|
|
|
|
|
|
return-void
|
|
|
|
.end method
|
|
|
|
|
|
|
|
.method public static final synthetic access$isDisableCommunityTapped(Lcom/discord/widgets/servers/community/WidgetServerSettingsCommunityOverviewViewModel;Lcom/discord/restapi/RestAPIParams$UpdateGuild;)Z
|
|
|
|
.locals 0
|
|
|
|
|
|
|
|
invoke-direct {p0, p1}, Lcom/discord/widgets/servers/community/WidgetServerSettingsCommunityOverviewViewModel;->isDisableCommunityTapped(Lcom/discord/restapi/RestAPIParams$UpdateGuild;)Z
|
|
|
|
|
|
|
|
move-result p0
|
|
|
|
|
|
|
|
return p0
|
|
|
|
.end method
|
|
|
|
|
|
|
|
.method private final handleDisableCommunityButtonState(Z)V
|
|
|
|
.locals 1
|
|
|
|
|
|
|
|
new-instance v0, Lcom/discord/widgets/servers/community/WidgetServerSettingsCommunityOverviewViewModel$ViewState$DisableCommunityLoading;
|
|
|
|
|
|
|
|
invoke-direct {v0, p1}, Lcom/discord/widgets/servers/community/WidgetServerSettingsCommunityOverviewViewModel$ViewState$DisableCommunityLoading;-><init>(Z)V
|
|
|
|
|
|
|
|
invoke-virtual {p0, v0}, Lf/a/b/q0;->updateViewState(Ljava/lang/Object;)V
|
|
|
|
|
|
|
|
return-void
|
|
|
|
.end method
|
|
|
|
|
|
|
|
.method private final handleGuildUpdateError()V
|
|
|
|
.locals 2
|
|
|
|
|
|
|
|
const/4 v0, 0x0
|
|
|
|
|
|
|
|
invoke-direct {p0, v0}, Lcom/discord/widgets/servers/community/WidgetServerSettingsCommunityOverviewViewModel;->handleDisableCommunityButtonState(Z)V
|
|
|
|
|
|
|
|
iget-object v0, p0, Lcom/discord/widgets/servers/community/WidgetServerSettingsCommunityOverviewViewModel;->eventSubject:Lrx/subjects/PublishSubject;
|
|
|
|
|
|
|
|
sget-object v1, Lcom/discord/widgets/servers/community/WidgetServerSettingsCommunityOverviewViewModel$Event$Error;->INSTANCE:Lcom/discord/widgets/servers/community/WidgetServerSettingsCommunityOverviewViewModel$Event$Error;
|
|
|
|
|
|
|
|
iget-object v0, v0, Lrx/subjects/PublishSubject;->e:Lrx/subjects/PublishSubject$b;
|
|
|
|
|
|
|
|
invoke-virtual {v0, v1}, Lrx/subjects/PublishSubject$b;->onNext(Ljava/lang/Object;)V
|
|
|
|
|
|
|
|
return-void
|
|
|
|
.end method
|
|
|
|
|
|
|
|
.method private final handleStoreState(Lcom/discord/widgets/servers/community/WidgetServerSettingsCommunityOverviewViewModel$StoreState;)V
|
|
|
|
.locals 7
|
|
|
|
|
|
|
|
instance-of v0, p1, Lcom/discord/widgets/servers/community/WidgetServerSettingsCommunityOverviewViewModel$StoreState$Valid;
|
|
|
|
|
|
|
|
if-nez v0, :cond_0
|
|
|
|
|
|
|
|
sget-object p1, Lcom/discord/widgets/servers/community/WidgetServerSettingsCommunityOverviewViewModel$ViewState$Invalid;->INSTANCE:Lcom/discord/widgets/servers/community/WidgetServerSettingsCommunityOverviewViewModel$ViewState$Invalid;
|
|
|
|
|
|
|
|
invoke-virtual {p0, p1}, Lf/a/b/q0;->updateViewState(Ljava/lang/Object;)V
|
|
|
|
|
|
|
|
return-void
|
|
|
|
|
|
|
|
:cond_0
|
|
|
|
check-cast p1, Lcom/discord/widgets/servers/community/WidgetServerSettingsCommunityOverviewViewModel$StoreState$Valid;
|
|
|
|
|
|
|
|
invoke-virtual {p1}, Lcom/discord/widgets/servers/community/WidgetServerSettingsCommunityOverviewViewModel$StoreState$Valid;->getGuild()Lcom/discord/models/domain/ModelGuild;
|
|
|
|
|
|
|
|
move-result-object v0
|
|
|
|
|
|
|
|
invoke-virtual {p1}, Lcom/discord/widgets/servers/community/WidgetServerSettingsCommunityOverviewViewModel$StoreState$Valid;->getMe()Lcom/discord/models/domain/ModelUser;
|
|
|
|
|
|
|
|
move-result-object v1
|
|
|
|
|
|
|
|
invoke-virtual {p1}, Lcom/discord/widgets/servers/community/WidgetServerSettingsCommunityOverviewViewModel$StoreState$Valid;->getPermissions()Ljava/lang/Long;
|
|
|
|
|
|
|
|
move-result-object v2
|
|
|
|
|
|
|
|
invoke-virtual {p1}, Lcom/discord/widgets/servers/community/WidgetServerSettingsCommunityOverviewViewModel$StoreState$Valid;->getRulesChannel()Lcom/discord/models/domain/ModelChannel;
|
|
|
|
|
|
|
|
move-result-object v3
|
|
|
|
|
|
|
|
invoke-virtual {p1}, Lcom/discord/widgets/servers/community/WidgetServerSettingsCommunityOverviewViewModel$StoreState$Valid;->getUpdatesChannel()Lcom/discord/models/domain/ModelChannel;
|
|
|
|
|
|
|
|
move-result-object p1
|
|
|
|
|
|
|
|
invoke-virtual {v1}, Lcom/discord/models/domain/ModelUser;->getId()J
|
|
|
|
|
|
|
|
move-result-wide v4
|
|
|
|
|
|
|
|
invoke-virtual {v0, v4, v5}, Lcom/discord/models/domain/ModelGuild;->isOwner(J)Z
|
|
|
|
|
|
|
|
move-result v4
|
|
|
|
|
|
|
|
if-nez v4, :cond_2
|
|
|
|
|
|
|
|
const-wide/16 v4, 0x20
|
|
|
|
|
|
|
|
invoke-virtual {v1}, Lcom/discord/models/domain/ModelUser;->isMfaEnabled()Z
|
|
|
|
|
|
|
|
move-result v1
|
|
|
|
|
|
|
|
invoke-virtual {v0}, Lcom/discord/models/domain/ModelGuild;->getMfaLevel()I
|
|
|
|
|
|
|
|
move-result v6
|
|
|
|
|
|
|
|
invoke-static {v4, v5, v2, v1, v6}, Lcom/discord/utilities/permissions/PermissionUtils;->canAndIsElevated(JLjava/lang/Long;ZI)Z
|
|
|
|
|
|
|
|
move-result v1
|
|
|
|
|
|
|
|
if-eqz v1, :cond_1
|
|
|
|
|
|
|
|
goto :goto_0
|
|
|
|
|
|
|
|
:cond_1
|
|
|
|
const/4 v1, 0x0
|
|
|
|
|
|
|
|
goto :goto_1
|
|
|
|
|
|
|
|
:cond_2
|
|
|
|
:goto_0
|
|
|
|
const/4 v1, 0x1
|
|
|
|
|
|
|
|
:goto_1
|
|
|
|
if-nez v1, :cond_3
|
|
|
|
|
|
|
|
sget-object p1, Lcom/discord/widgets/servers/community/WidgetServerSettingsCommunityOverviewViewModel$ViewState$Invalid;->INSTANCE:Lcom/discord/widgets/servers/community/WidgetServerSettingsCommunityOverviewViewModel$ViewState$Invalid;
|
|
|
|
|
|
|
|
invoke-virtual {p0, p1}, Lf/a/b/q0;->updateViewState(Ljava/lang/Object;)V
|
|
|
|
|
|
|
|
return-void
|
|
|
|
|
|
|
|
:cond_3
|
|
|
|
new-instance v1, Lcom/discord/widgets/servers/community/WidgetServerSettingsCommunityOverviewViewModel$ViewState$Loaded;
|
|
|
|
|
|
|
|
invoke-direct {v1, v0, v3, p1}, Lcom/discord/widgets/servers/community/WidgetServerSettingsCommunityOverviewViewModel$ViewState$Loaded;-><init>(Lcom/discord/models/domain/ModelGuild;Lcom/discord/models/domain/ModelChannel;Lcom/discord/models/domain/ModelChannel;)V
|
|
|
|
|
|
|
|
invoke-virtual {p0, v1}, Lf/a/b/q0;->updateViewState(Ljava/lang/Object;)V
|
|
|
|
|
|
|
|
return-void
|
|
|
|
.end method
|
|
|
|
|
|
|
|
.method private final isDisableCommunityTapped(Lcom/discord/restapi/RestAPIParams$UpdateGuild;)Z
|
|
|
|
.locals 1
|
|
|
|
|
|
|
|
invoke-virtual {p1}, Lcom/discord/restapi/RestAPIParams$UpdateGuild;->getFeatures()Ljava/util/List;
|
|
|
|
|
|
|
|
move-result-object p1
|
|
|
|
|
|
|
|
if-eqz p1, :cond_0
|
|
|
|
|
|
|
|
const/4 v0, 0x7
|
|
|
|
|
|
|
|
invoke-static {v0}, Lcom/discord/models/domain/ModelGuild;->computeFeatureInv(I)Ljava/lang/String;
|
|
|
|
|
|
|
|
move-result-object v0
|
|
|
|
|
|
|
|
invoke-interface {p1, v0}, Ljava/util/List;->contains(Ljava/lang/Object;)Z
|
|
|
|
|
|
|
|
move-result p1
|
|
|
|
|
|
|
|
if-nez p1, :cond_0
|
|
|
|
|
|
|
|
const/4 p1, 0x1
|
|
|
|
|
|
|
|
goto :goto_0
|
|
|
|
|
|
|
|
:cond_0
|
|
|
|
const/4 p1, 0x0
|
|
|
|
|
|
|
|
:goto_0
|
|
|
|
return p1
|
|
|
|
.end method
|
|
|
|
|
|
|
|
.method private final saveCommunityGuildSettings(Lcom/discord/restapi/RestAPIParams$UpdateGuild;)V
|
|
|
|
.locals 13
|
|
|
|
|
|
|
|
invoke-direct {p0, p1}, Lcom/discord/widgets/servers/community/WidgetServerSettingsCommunityOverviewViewModel;->isDisableCommunityTapped(Lcom/discord/restapi/RestAPIParams$UpdateGuild;)Z
|
|
|
|
|
|
|
|
move-result v0
|
|
|
|
|
|
|
|
invoke-direct {p0, v0}, Lcom/discord/widgets/servers/community/WidgetServerSettingsCommunityOverviewViewModel;->handleDisableCommunityButtonState(Z)V
|
|
|
|
|
|
|
|
sget-object v0, Lcom/discord/utilities/rest/RestAPI;->Companion:Lcom/discord/utilities/rest/RestAPI$Companion;
|
|
|
|
|
|
|
|
invoke-virtual {v0}, Lcom/discord/utilities/rest/RestAPI$Companion;->getApi()Lcom/discord/utilities/rest/RestAPI;
|
|
|
|
|
|
|
|
move-result-object v0
|
|
|
|
|
|
|
|
iget-wide v1, p0, Lcom/discord/widgets/servers/community/WidgetServerSettingsCommunityOverviewViewModel;->guildId:J
|
|
|
|
|
|
|
|
invoke-virtual {v0, v1, v2, p1}, Lcom/discord/utilities/rest/RestAPI;->updateGuild(JLcom/discord/restapi/RestAPIParams$UpdateGuild;)Lrx/Observable;
|
|
|
|
|
|
|
|
move-result-object v0
|
|
|
|
|
|
|
|
const/4 v1, 0x0
|
|
|
|
|
|
|
|
const/4 v2, 0x1
|
|
|
|
|
|
|
|
const/4 v3, 0x0
|
|
|
|
|
|
|
|
invoke-static {v0, v1, v2, v3}, Lcom/discord/utilities/rx/ObservableExtensionsKt;->restSubscribeOn$default(Lrx/Observable;ZILjava/lang/Object;)Lrx/Observable;
|
|
|
|
|
|
|
|
move-result-object v0
|
|
|
|
|
|
|
|
const/4 v1, 0x2
|
|
|
|
|
|
|
|
invoke-static {v0, p0, v3, v1, v3}, 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 v4
|
|
|
|
|
|
|
|
const-class v5, Lcom/discord/widgets/servers/community/WidgetServerSettingsCommunityOverviewViewModel;
|
|
|
|
|
|
|
|
new-instance v8, Lcom/discord/widgets/servers/community/WidgetServerSettingsCommunityOverviewViewModel$saveCommunityGuildSettings$1;
|
|
|
|
|
|
|
|
invoke-direct {v8, p0}, Lcom/discord/widgets/servers/community/WidgetServerSettingsCommunityOverviewViewModel$saveCommunityGuildSettings$1;-><init>(Lcom/discord/widgets/servers/community/WidgetServerSettingsCommunityOverviewViewModel;)V
|
|
|
|
|
|
|
|
new-instance v10, Lcom/discord/widgets/servers/community/WidgetServerSettingsCommunityOverviewViewModel$saveCommunityGuildSettings$2;
|
|
|
|
|
|
|
|
invoke-direct {v10, p0, p1}, Lcom/discord/widgets/servers/community/WidgetServerSettingsCommunityOverviewViewModel$saveCommunityGuildSettings$2;-><init>(Lcom/discord/widgets/servers/community/WidgetServerSettingsCommunityOverviewViewModel;Lcom/discord/restapi/RestAPIParams$UpdateGuild;)V
|
|
|
|
|
|
|
|
const/4 v6, 0x0
|
|
|
|
|
|
|
|
const/4 v7, 0x0
|
|
|
|
|
|
|
|
const/4 v9, 0x0
|
|
|
|
|
|
|
|
const/16 v11, 0x16
|
|
|
|
|
|
|
|
const/4 v12, 0x0
|
|
|
|
|
|
|
|
invoke-static/range {v4 .. v12}, Lcom/discord/utilities/rx/ObservableExtensionsKt;->appSubscribe$default(Lrx/Observable;Ljava/lang/Class;Landroid/content/Context;Lkotlin/jvm/functions/Function1;Lkotlin/jvm/functions/Function1;Lkotlin/jvm/functions/Function0;Lkotlin/jvm/functions/Function1;ILjava/lang/Object;)V
|
|
|
|
|
|
|
|
return-void
|
|
|
|
.end method
|
|
|
|
|
|
|
|
|
|
|
|
# virtual methods
|
|
|
|
.method public final disableCommunity(Ljava/util/List;)V
|
|
|
|
.locals 20
|
|
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
|
|
value = {
|
|
|
|
"(",
|
|
|
|
"Ljava/util/List<",
|
|
|
|
"Ljava/lang/Integer;",
|
|
|
|
">;)V"
|
|
|
|
}
|
|
|
|
.end annotation
|
|
|
|
|
|
|
|
move-object/from16 v0, p1
|
|
|
|
|
|
|
|
const-string v1, "features"
|
|
|
|
|
2020-09-23 03:12:49 +00:00
|
|
|
invoke-static {v0, v1}, Lc0/n/c/j;->checkNotNullParameter(Ljava/lang/Object;Ljava/lang/String;)V
|
2020-09-22 07:09:10 +00:00
|
|
|
|
|
|
|
const/4 v1, 0x7
|
|
|
|
|
|
|
|
invoke-static {v1}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;
|
|
|
|
|
|
|
|
move-result-object v1
|
|
|
|
|
|
|
|
invoke-static {v0, v1}, Lc0/i/f;->minus(Ljava/lang/Iterable;Ljava/lang/Object;)Ljava/util/List;
|
|
|
|
|
|
|
|
move-result-object v0
|
|
|
|
|
|
|
|
new-instance v14, Ljava/util/ArrayList;
|
|
|
|
|
|
|
|
const/16 v1, 0xa
|
|
|
|
|
|
|
|
invoke-static {v0, v1}, Lf/h/a/f/e/n/f;->collectionSizeOrDefault(Ljava/lang/Iterable;I)I
|
|
|
|
|
|
|
|
move-result v1
|
|
|
|
|
|
|
|
invoke-direct {v14, v1}, Ljava/util/ArrayList;-><init>(I)V
|
|
|
|
|
|
|
|
invoke-interface {v0}, Ljava/lang/Iterable;->iterator()Ljava/util/Iterator;
|
|
|
|
|
|
|
|
move-result-object v0
|
|
|
|
|
|
|
|
:goto_0
|
|
|
|
invoke-interface {v0}, Ljava/util/Iterator;->hasNext()Z
|
|
|
|
|
|
|
|
move-result v1
|
|
|
|
|
|
|
|
if-eqz v1, :cond_0
|
|
|
|
|
|
|
|
invoke-interface {v0}, Ljava/util/Iterator;->next()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 {v1}, Lcom/discord/models/domain/ModelGuild;->computeFeatureInv(I)Ljava/lang/String;
|
|
|
|
|
|
|
|
move-result-object v1
|
|
|
|
|
|
|
|
invoke-interface {v14, v1}, Ljava/util/Collection;->add(Ljava/lang/Object;)Z
|
|
|
|
|
|
|
|
goto :goto_0
|
|
|
|
|
|
|
|
:cond_0
|
|
|
|
new-instance v0, Lcom/discord/restapi/RestAPIParams$UpdateGuild;
|
|
|
|
|
|
|
|
move-object v1, v0
|
|
|
|
|
|
|
|
const/4 v2, 0x0
|
|
|
|
|
|
|
|
const/4 v3, 0x0
|
|
|
|
|
|
|
|
const/4 v4, 0x0
|
|
|
|
|
|
|
|
const/4 v5, 0x0
|
|
|
|
|
|
|
|
const/4 v6, 0x0
|
|
|
|
|
|
|
|
const/4 v7, 0x0
|
|
|
|
|
|
|
|
const/4 v8, 0x0
|
|
|
|
|
|
|
|
const/4 v9, 0x0
|
|
|
|
|
|
|
|
const/4 v10, 0x0
|
|
|
|
|
|
|
|
const/4 v11, 0x0
|
|
|
|
|
|
|
|
const/4 v12, 0x0
|
|
|
|
|
|
|
|
const/4 v13, 0x0
|
|
|
|
|
|
|
|
const/4 v15, 0x0
|
|
|
|
|
|
|
|
const/16 v16, 0x0
|
|
|
|
|
|
|
|
const/16 v17, 0x0
|
|
|
|
|
|
|
|
const v18, 0xefff
|
|
|
|
|
|
|
|
const/16 v19, 0x0
|
|
|
|
|
|
|
|
invoke-direct/range {v1 .. v19}, Lcom/discord/restapi/RestAPIParams$UpdateGuild;-><init>(Ljava/lang/Long;Ljava/lang/Integer;Ljava/lang/Long;Ljava/lang/Integer;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/Integer;Ljava/lang/Integer;Ljava/lang/String;Ljava/lang/String;Ljava/lang/Integer;Ljava/util/List;Ljava/lang/Long;Ljava/lang/Long;Ljava/lang/String;ILkotlin/jvm/internal/DefaultConstructorMarker;)V
|
|
|
|
|
|
|
|
move-object/from16 v1, p0
|
|
|
|
|
|
|
|
invoke-direct {v1, v0}, Lcom/discord/widgets/servers/community/WidgetServerSettingsCommunityOverviewViewModel;->saveCommunityGuildSettings(Lcom/discord/restapi/RestAPIParams$UpdateGuild;)V
|
|
|
|
|
|
|
|
return-void
|
|
|
|
.end method
|
|
|
|
|
|
|
|
.method public final observeEvents()Lrx/Observable;
|
|
|
|
.locals 2
|
|
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
|
|
value = {
|
|
|
|
"()",
|
|
|
|
"Lrx/Observable<",
|
|
|
|
"Lcom/discord/widgets/servers/community/WidgetServerSettingsCommunityOverviewViewModel$Event;",
|
|
|
|
">;"
|
|
|
|
}
|
|
|
|
.end annotation
|
|
|
|
|
|
|
|
iget-object v0, p0, Lcom/discord/widgets/servers/community/WidgetServerSettingsCommunityOverviewViewModel;->eventSubject:Lrx/subjects/PublishSubject;
|
|
|
|
|
|
|
|
const-string v1, "eventSubject"
|
|
|
|
|
2020-09-23 03:12:49 +00:00
|
|
|
invoke-static {v0, v1}, Lc0/n/c/j;->checkNotNullExpressionValue(Ljava/lang/Object;Ljava/lang/String;)V
|
2020-09-22 07:09:10 +00:00
|
|
|
|
|
|
|
return-object v0
|
|
|
|
.end method
|
|
|
|
|
|
|
|
.method public final saveCommunityUpdatesChannel(J)V
|
|
|
|
.locals 20
|
|
|
|
|
|
|
|
new-instance v14, Lcom/discord/restapi/RestAPIParams$UpdateGuild;
|
|
|
|
|
|
|
|
move-object v0, v14
|
|
|
|
|
|
|
|
invoke-static/range {p1 .. p2}, Ljava/lang/Long;->valueOf(J)Ljava/lang/Long;
|
|
|
|
|
|
|
|
move-result-object v15
|
|
|
|
|
|
|
|
const/4 v1, 0x0
|
|
|
|
|
|
|
|
const/4 v2, 0x0
|
|
|
|
|
|
|
|
const/4 v3, 0x0
|
|
|
|
|
|
|
|
const/4 v4, 0x0
|
|
|
|
|
|
|
|
const/4 v5, 0x0
|
|
|
|
|
|
|
|
const/4 v6, 0x0
|
|
|
|
|
|
|
|
const/4 v7, 0x0
|
|
|
|
|
|
|
|
const/4 v8, 0x0
|
|
|
|
|
|
|
|
const/4 v9, 0x0
|
|
|
|
|
|
|
|
const/4 v10, 0x0
|
|
|
|
|
|
|
|
const/4 v11, 0x0
|
|
|
|
|
|
|
|
const/4 v12, 0x0
|
|
|
|
|
|
|
|
const/4 v13, 0x0
|
|
|
|
|
|
|
|
const/16 v16, 0x0
|
|
|
|
|
|
|
|
move-object/from16 v19, v14
|
|
|
|
|
|
|
|
move-object/from16 v14, v16
|
|
|
|
|
|
|
|
const v17, 0xbfff
|
|
|
|
|
|
|
|
const/16 v18, 0x0
|
|
|
|
|
|
|
|
invoke-direct/range {v0 .. v18}, Lcom/discord/restapi/RestAPIParams$UpdateGuild;-><init>(Ljava/lang/Long;Ljava/lang/Integer;Ljava/lang/Long;Ljava/lang/Integer;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/Integer;Ljava/lang/Integer;Ljava/lang/String;Ljava/lang/String;Ljava/lang/Integer;Ljava/util/List;Ljava/lang/Long;Ljava/lang/Long;Ljava/lang/String;ILkotlin/jvm/internal/DefaultConstructorMarker;)V
|
|
|
|
|
|
|
|
move-object/from16 v0, p0
|
|
|
|
|
|
|
|
move-object/from16 v1, v19
|
|
|
|
|
|
|
|
invoke-direct {v0, v1}, Lcom/discord/widgets/servers/community/WidgetServerSettingsCommunityOverviewViewModel;->saveCommunityGuildSettings(Lcom/discord/restapi/RestAPIParams$UpdateGuild;)V
|
|
|
|
|
|
|
|
return-void
|
|
|
|
.end method
|
|
|
|
|
|
|
|
.method public final saveLocale(Ljava/lang/String;)V
|
|
|
|
.locals 20
|
|
|
|
|
|
|
|
move-object/from16 v16, p1
|
|
|
|
|
|
|
|
const-string v0, "locale"
|
|
|
|
|
|
|
|
move-object/from16 v1, p1
|
|
|
|
|
2020-09-23 03:12:49 +00:00
|
|
|
invoke-static {v1, v0}, Lc0/n/c/j;->checkNotNullParameter(Ljava/lang/Object;Ljava/lang/String;)V
|
2020-09-22 07:09:10 +00:00
|
|
|
|
|
|
|
new-instance v15, Lcom/discord/restapi/RestAPIParams$UpdateGuild;
|
|
|
|
|
|
|
|
move-object v0, v15
|
|
|
|
|
|
|
|
const/4 v1, 0x0
|
|
|
|
|
|
|
|
const/4 v2, 0x0
|
|
|
|
|
|
|
|
const/4 v3, 0x0
|
|
|
|
|
|
|
|
const/4 v4, 0x0
|
|
|
|
|
|
|
|
const/4 v5, 0x0
|
|
|
|
|
|
|
|
const/4 v6, 0x0
|
|
|
|
|
|
|
|
const/4 v7, 0x0
|
|
|
|
|
|
|
|
const/4 v8, 0x0
|
|
|
|
|
|
|
|
const/4 v9, 0x0
|
|
|
|
|
|
|
|
const/4 v10, 0x0
|
|
|
|
|
|
|
|
const/4 v11, 0x0
|
|
|
|
|
|
|
|
const/4 v12, 0x0
|
|
|
|
|
|
|
|
const/4 v13, 0x0
|
|
|
|
|
|
|
|
const/4 v14, 0x0
|
|
|
|
|
|
|
|
const/16 v17, 0x0
|
|
|
|
|
|
|
|
move-object/from16 v19, v15
|
|
|
|
|
|
|
|
move-object/from16 v15, v17
|
|
|
|
|
|
|
|
const/16 v17, 0x7fff
|
|
|
|
|
|
|
|
const/16 v18, 0x0
|
|
|
|
|
|
|
|
invoke-direct/range {v0 .. v18}, Lcom/discord/restapi/RestAPIParams$UpdateGuild;-><init>(Ljava/lang/Long;Ljava/lang/Integer;Ljava/lang/Long;Ljava/lang/Integer;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/Integer;Ljava/lang/Integer;Ljava/lang/String;Ljava/lang/String;Ljava/lang/Integer;Ljava/util/List;Ljava/lang/Long;Ljava/lang/Long;Ljava/lang/String;ILkotlin/jvm/internal/DefaultConstructorMarker;)V
|
|
|
|
|
|
|
|
move-object/from16 v0, p0
|
|
|
|
|
|
|
|
move-object/from16 v1, v19
|
|
|
|
|
|
|
|
invoke-direct {v0, v1}, Lcom/discord/widgets/servers/community/WidgetServerSettingsCommunityOverviewViewModel;->saveCommunityGuildSettings(Lcom/discord/restapi/RestAPIParams$UpdateGuild;)V
|
|
|
|
|
|
|
|
return-void
|
|
|
|
.end method
|
|
|
|
|
|
|
|
.method public final saveRulesChannel(J)V
|
|
|
|
.locals 20
|
|
|
|
|
|
|
|
new-instance v15, Lcom/discord/restapi/RestAPIParams$UpdateGuild;
|
|
|
|
|
|
|
|
move-object v0, v15
|
|
|
|
|
|
|
|
invoke-static/range {p1 .. p2}, Ljava/lang/Long;->valueOf(J)Ljava/lang/Long;
|
|
|
|
|
|
|
|
move-result-object v14
|
|
|
|
|
|
|
|
const/4 v1, 0x0
|
|
|
|
|
|
|
|
const/4 v2, 0x0
|
|
|
|
|
|
|
|
const/4 v3, 0x0
|
|
|
|
|
|
|
|
const/4 v4, 0x0
|
|
|
|
|
|
|
|
const/4 v5, 0x0
|
|
|
|
|
|
|
|
const/4 v6, 0x0
|
|
|
|
|
|
|
|
const/4 v7, 0x0
|
|
|
|
|
|
|
|
const/4 v8, 0x0
|
|
|
|
|
|
|
|
const/4 v9, 0x0
|
|
|
|
|
|
|
|
const/4 v10, 0x0
|
|
|
|
|
|
|
|
const/4 v11, 0x0
|
|
|
|
|
|
|
|
const/4 v12, 0x0
|
|
|
|
|
|
|
|
const/4 v13, 0x0
|
|
|
|
|
|
|
|
const/16 v16, 0x0
|
|
|
|
|
|
|
|
move-object/from16 v19, v15
|
|
|
|
|
|
|
|
move-object/from16 v15, v16
|
|
|
|
|
|
|
|
const v17, 0xdfff
|
|
|
|
|
|
|
|
const/16 v18, 0x0
|
|
|
|
|
|
|
|
invoke-direct/range {v0 .. v18}, Lcom/discord/restapi/RestAPIParams$UpdateGuild;-><init>(Ljava/lang/Long;Ljava/lang/Integer;Ljava/lang/Long;Ljava/lang/Integer;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/Integer;Ljava/lang/Integer;Ljava/lang/String;Ljava/lang/String;Ljava/lang/Integer;Ljava/util/List;Ljava/lang/Long;Ljava/lang/Long;Ljava/lang/String;ILkotlin/jvm/internal/DefaultConstructorMarker;)V
|
|
|
|
|
|
|
|
move-object/from16 v0, p0
|
|
|
|
|
|
|
|
move-object/from16 v1, v19
|
|
|
|
|
|
|
|
invoke-direct {v0, v1}, Lcom/discord/widgets/servers/community/WidgetServerSettingsCommunityOverviewViewModel;->saveCommunityGuildSettings(Lcom/discord/restapi/RestAPIParams$UpdateGuild;)V
|
|
|
|
|
|
|
|
return-void
|
|
|
|
.end method
|