546 lines
18 KiB
Smali
546 lines
18 KiB
Smali
.class public final Lcom/discord/widgets/guilds/profile/WidgetGuildProfileSheetViewModel;
|
|
.super Le/a/b/c0;
|
|
.source "WidgetGuildProfileSheetViewModel.kt"
|
|
|
|
|
|
# annotations
|
|
.annotation system Ldalvik/annotation/MemberClasses;
|
|
value = {
|
|
Lcom/discord/widgets/guilds/profile/WidgetGuildProfileSheetViewModel$ViewState;,
|
|
Lcom/discord/widgets/guilds/profile/WidgetGuildProfileSheetViewModel$Banner;,
|
|
Lcom/discord/widgets/guilds/profile/WidgetGuildProfileSheetViewModel$TabItems;,
|
|
Lcom/discord/widgets/guilds/profile/WidgetGuildProfileSheetViewModel$StoreState;,
|
|
Lcom/discord/widgets/guilds/profile/WidgetGuildProfileSheetViewModel$Factory;
|
|
}
|
|
.end annotation
|
|
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"Le/a/b/c0<",
|
|
"Lcom/discord/widgets/guilds/profile/WidgetGuildProfileSheetViewModel$ViewState;",
|
|
">;"
|
|
}
|
|
.end annotation
|
|
|
|
|
|
# instance fields
|
|
.field public final storeObservable:Lrx/Observable;
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"Lrx/Observable<",
|
|
"Lcom/discord/widgets/guilds/profile/WidgetGuildProfileSheetViewModel$StoreState;",
|
|
">;"
|
|
}
|
|
.end annotation
|
|
.end field
|
|
|
|
.field public final viewingGuild:Z
|
|
|
|
|
|
# direct methods
|
|
.method public constructor <init>(Lrx/Observable;Z)V
|
|
.locals 10
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"(",
|
|
"Lrx/Observable<",
|
|
"Lcom/discord/widgets/guilds/profile/WidgetGuildProfileSheetViewModel$StoreState;",
|
|
">;Z)V"
|
|
}
|
|
.end annotation
|
|
|
|
const/4 v0, 0x0
|
|
|
|
if-eqz p1, :cond_0
|
|
|
|
sget-object v1, Lcom/discord/widgets/guilds/profile/WidgetGuildProfileSheetViewModel$ViewState$Loading;->INSTANCE:Lcom/discord/widgets/guilds/profile/WidgetGuildProfileSheetViewModel$ViewState$Loading;
|
|
|
|
invoke-direct {p0, v1}, Le/a/b/c0;-><init>(Ljava/lang/Object;)V
|
|
|
|
iput-object p1, p0, Lcom/discord/widgets/guilds/profile/WidgetGuildProfileSheetViewModel;->storeObservable:Lrx/Observable;
|
|
|
|
iput-boolean p2, p0, Lcom/discord/widgets/guilds/profile/WidgetGuildProfileSheetViewModel;->viewingGuild:Z
|
|
|
|
iget-object p1, p0, Lcom/discord/widgets/guilds/profile/WidgetGuildProfileSheetViewModel;->storeObservable:Lrx/Observable;
|
|
|
|
const/4 p2, 0x2
|
|
|
|
invoke-static {p1, p0, v0, p2, v0}, 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 v1
|
|
|
|
const-class v2, Lcom/discord/widgets/guilds/profile/WidgetGuildProfileSheetViewModel;
|
|
|
|
const/4 v3, 0x0
|
|
|
|
const/4 v4, 0x0
|
|
|
|
const/4 v5, 0x0
|
|
|
|
const/4 v6, 0x0
|
|
|
|
new-instance v7, Lcom/discord/widgets/guilds/profile/WidgetGuildProfileSheetViewModel$1;
|
|
|
|
invoke-direct {v7, p0}, Lcom/discord/widgets/guilds/profile/WidgetGuildProfileSheetViewModel$1;-><init>(Lcom/discord/widgets/guilds/profile/WidgetGuildProfileSheetViewModel;)V
|
|
|
|
const/16 v8, 0x1e
|
|
|
|
const/4 v9, 0x0
|
|
|
|
invoke-static/range {v1 .. v9}, 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
|
|
|
|
:cond_0
|
|
const-string p1, "storeObservable"
|
|
|
|
invoke-static {p1}, Lw/u/b/j;->a(Ljava/lang/String;)V
|
|
|
|
throw v0
|
|
.end method
|
|
|
|
.method public static final synthetic access$handleStoreState(Lcom/discord/widgets/guilds/profile/WidgetGuildProfileSheetViewModel;Lcom/discord/widgets/guilds/profile/WidgetGuildProfileSheetViewModel$StoreState;)V
|
|
.locals 0
|
|
|
|
invoke-direct {p0, p1}, Lcom/discord/widgets/guilds/profile/WidgetGuildProfileSheetViewModel;->handleStoreState(Lcom/discord/widgets/guilds/profile/WidgetGuildProfileSheetViewModel$StoreState;)V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method private final handleLoadedGuild(Lcom/discord/models/domain/ModelGuild;Lcom/discord/models/domain/ModelGuildPreview;Lcom/discord/utilities/channel/GuildChannelsInfo;)V
|
|
.locals 15
|
|
|
|
move-object v0, p0
|
|
|
|
invoke-virtual/range {p1 .. p1}, Lcom/discord/models/domain/ModelGuild;->getFeatures()Ljava/util/List;
|
|
|
|
move-result-object v1
|
|
|
|
sget-object v2, Lcom/discord/models/domain/ModelGuild;->FEATURE_VERIFIED_SERVER:Ljava/lang/Integer;
|
|
|
|
invoke-interface {v1, v2}, Ljava/util/List;->contains(Ljava/lang/Object;)Z
|
|
|
|
move-result v1
|
|
|
|
const/4 v2, 0x0
|
|
|
|
if-eqz v1, :cond_0
|
|
|
|
const v1, 0x7f080421
|
|
|
|
invoke-static {v1}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;
|
|
|
|
move-result-object v1
|
|
|
|
:goto_0
|
|
move-object v10, v1
|
|
|
|
goto :goto_1
|
|
|
|
:cond_0
|
|
invoke-virtual/range {p1 .. p1}, Lcom/discord/models/domain/ModelGuild;->getFeatures()Ljava/util/List;
|
|
|
|
move-result-object v1
|
|
|
|
sget-object v3, Lcom/discord/models/domain/ModelGuild;->FEATURE_PARTNERED:Ljava/lang/Integer;
|
|
|
|
invoke-interface {v1, v3}, Ljava/util/List;->contains(Ljava/lang/Object;)Z
|
|
|
|
move-result v1
|
|
|
|
if-eqz v1, :cond_1
|
|
|
|
const v1, 0x7f080374
|
|
|
|
invoke-static {v1}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;
|
|
|
|
move-result-object v1
|
|
|
|
goto :goto_0
|
|
|
|
:cond_1
|
|
move-object v10, v2
|
|
|
|
:goto_1
|
|
iget-boolean v1, v0, Lcom/discord/widgets/guilds/profile/WidgetGuildProfileSheetViewModel;->viewingGuild:Z
|
|
|
|
if-eqz v1, :cond_2
|
|
|
|
sget-object v1, Lcom/discord/widgets/guilds/profile/WidgetGuildProfileSheetViewModel$Banner$Type;->BANNER:Lcom/discord/widgets/guilds/profile/WidgetGuildProfileSheetViewModel$Banner$Type;
|
|
|
|
goto :goto_2
|
|
|
|
:cond_2
|
|
sget-object v1, Lcom/discord/widgets/guilds/profile/WidgetGuildProfileSheetViewModel$Banner$Type;->SPLASH:Lcom/discord/widgets/guilds/profile/WidgetGuildProfileSheetViewModel$Banner$Type;
|
|
|
|
:goto_2
|
|
sget-object v3, Lcom/discord/widgets/guilds/profile/WidgetGuildProfileSheetViewModel$Banner$Type;->BANNER:Lcom/discord/widgets/guilds/profile/WidgetGuildProfileSheetViewModel$Banner$Type;
|
|
|
|
if-ne v1, v3, :cond_3
|
|
|
|
invoke-virtual/range {p1 .. p1}, Lcom/discord/models/domain/ModelGuild;->getBanner()Ljava/lang/String;
|
|
|
|
move-result-object v3
|
|
|
|
goto :goto_3
|
|
|
|
:cond_3
|
|
invoke-virtual/range {p1 .. p1}, Lcom/discord/models/domain/ModelGuild;->getSplash()Ljava/lang/String;
|
|
|
|
move-result-object v3
|
|
|
|
:goto_3
|
|
new-instance v11, Lcom/discord/widgets/guilds/profile/WidgetGuildProfileSheetViewModel$Banner;
|
|
|
|
invoke-virtual/range {p1 .. p1}, Lcom/discord/models/domain/ModelGuild;->getId()J
|
|
|
|
move-result-wide v4
|
|
|
|
invoke-direct {v11, v4, v5, v3, v1}, Lcom/discord/widgets/guilds/profile/WidgetGuildProfileSheetViewModel$Banner;-><init>(JLjava/lang/String;Lcom/discord/widgets/guilds/profile/WidgetGuildProfileSheetViewModel$Banner$Type;)V
|
|
|
|
new-instance v14, Lcom/discord/widgets/guilds/profile/WidgetGuildProfileSheetViewModel$TabItems;
|
|
|
|
invoke-virtual/range {p3 .. p3}, Lcom/discord/utilities/channel/GuildChannelsInfo;->getCanAccessSettings()Z
|
|
|
|
move-result v1
|
|
|
|
invoke-virtual/range {p3 .. p3}, Lcom/discord/utilities/channel/GuildChannelsInfo;->getAbleToInstantInvite()Z
|
|
|
|
move-result v3
|
|
|
|
invoke-virtual/range {p1 .. p1}, Lcom/discord/models/domain/ModelGuild;->getPremiumSubscriptionCount()Ljava/lang/Integer;
|
|
|
|
move-result-object v4
|
|
|
|
if-eqz v4, :cond_4
|
|
|
|
goto :goto_4
|
|
|
|
:cond_4
|
|
const/4 v4, 0x0
|
|
|
|
invoke-static {v4}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;
|
|
|
|
move-result-object v4
|
|
|
|
:goto_4
|
|
invoke-virtual {v4}, Ljava/lang/Integer;->intValue()I
|
|
|
|
move-result v4
|
|
|
|
invoke-direct {v14, v1, v3, v4}, Lcom/discord/widgets/guilds/profile/WidgetGuildProfileSheetViewModel$TabItems;-><init>(ZZI)V
|
|
|
|
new-instance v1, Lcom/discord/widgets/guilds/profile/WidgetGuildProfileSheetViewModel$ViewState$Loaded;
|
|
|
|
invoke-virtual/range {p1 .. p1}, Lcom/discord/models/domain/ModelGuild;->getId()J
|
|
|
|
move-result-wide v4
|
|
|
|
invoke-virtual/range {p1 .. p1}, Lcom/discord/models/domain/ModelGuild;->getName()Ljava/lang/String;
|
|
|
|
move-result-object v6
|
|
|
|
const-string v3, "guild.name"
|
|
|
|
invoke-static {v6, v3}, Lw/u/b/j;->checkExpressionValueIsNotNull(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
invoke-virtual/range {p1 .. p1}, Lcom/discord/models/domain/ModelGuild;->getShortName()Ljava/lang/String;
|
|
|
|
move-result-object v7
|
|
|
|
const-string v3, "guild.shortName"
|
|
|
|
invoke-static {v7, v3}, Lw/u/b/j;->checkExpressionValueIsNotNull(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
invoke-virtual/range {p1 .. p1}, Lcom/discord/models/domain/ModelGuild;->getIcon()Ljava/lang/String;
|
|
|
|
move-result-object v8
|
|
|
|
invoke-virtual/range {p1 .. p1}, Lcom/discord/models/domain/ModelGuild;->getDescription()Ljava/lang/String;
|
|
|
|
move-result-object v9
|
|
|
|
if-eqz p2, :cond_5
|
|
|
|
invoke-virtual/range {p2 .. p2}, Lcom/discord/models/domain/ModelGuildPreview;->getApproximatePresenceCount()Ljava/lang/Integer;
|
|
|
|
move-result-object v3
|
|
|
|
move-object v12, v3
|
|
|
|
goto :goto_5
|
|
|
|
:cond_5
|
|
move-object v12, v2
|
|
|
|
:goto_5
|
|
if-eqz p2, :cond_6
|
|
|
|
invoke-virtual/range {p2 .. p2}, Lcom/discord/models/domain/ModelGuildPreview;->getApproximateMemberCount()Ljava/lang/Integer;
|
|
|
|
move-result-object v2
|
|
|
|
:cond_6
|
|
move-object v13, v2
|
|
|
|
move-object v3, v1
|
|
|
|
invoke-direct/range {v3 .. v14}, Lcom/discord/widgets/guilds/profile/WidgetGuildProfileSheetViewModel$ViewState$Loaded;-><init>(JLjava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/Integer;Lcom/discord/widgets/guilds/profile/WidgetGuildProfileSheetViewModel$Banner;Ljava/lang/Integer;Ljava/lang/Integer;Lcom/discord/widgets/guilds/profile/WidgetGuildProfileSheetViewModel$TabItems;)V
|
|
|
|
invoke-virtual {p0, v1}, Le/a/b/c0;->updateViewState(Ljava/lang/Object;)V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method private final handleLoadedGuildPreview(Lcom/discord/models/domain/ModelGuildPreview;)V
|
|
.locals 13
|
|
|
|
sget-object v0, Lcom/discord/models/domain/ModelGuild;->FEATURE_VERIFIED_SERVER:Ljava/lang/Integer;
|
|
|
|
const-string v1, "ModelGuild.FEATURE_VERIFIED_SERVER"
|
|
|
|
invoke-static {v0, v1}, Lw/u/b/j;->checkExpressionValueIsNotNull(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
invoke-virtual {v0}, Ljava/lang/Integer;->intValue()I
|
|
|
|
move-result v0
|
|
|
|
invoke-virtual {p1, v0}, Lcom/discord/models/domain/ModelGuildPreview;->hasFeature(I)Z
|
|
|
|
move-result v0
|
|
|
|
if-eqz v0, :cond_0
|
|
|
|
const v0, 0x7f080421
|
|
|
|
invoke-static {v0}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;
|
|
|
|
move-result-object v0
|
|
|
|
:goto_0
|
|
move-object v8, v0
|
|
|
|
goto :goto_1
|
|
|
|
:cond_0
|
|
sget-object v0, Lcom/discord/models/domain/ModelGuild;->FEATURE_PARTNERED:Ljava/lang/Integer;
|
|
|
|
const-string v1, "ModelGuild.FEATURE_PARTNERED"
|
|
|
|
invoke-static {v0, v1}, Lw/u/b/j;->checkExpressionValueIsNotNull(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
invoke-virtual {v0}, Ljava/lang/Integer;->intValue()I
|
|
|
|
move-result v0
|
|
|
|
invoke-virtual {p1, v0}, Lcom/discord/models/domain/ModelGuildPreview;->hasFeature(I)Z
|
|
|
|
move-result v0
|
|
|
|
if-eqz v0, :cond_1
|
|
|
|
const v0, 0x7f080374
|
|
|
|
invoke-static {v0}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;
|
|
|
|
move-result-object v0
|
|
|
|
goto :goto_0
|
|
|
|
:cond_1
|
|
const/4 v0, 0x0
|
|
|
|
goto :goto_0
|
|
|
|
:goto_1
|
|
iget-boolean v0, p0, Lcom/discord/widgets/guilds/profile/WidgetGuildProfileSheetViewModel;->viewingGuild:Z
|
|
|
|
if-eqz v0, :cond_2
|
|
|
|
sget-object v0, Lcom/discord/widgets/guilds/profile/WidgetGuildProfileSheetViewModel$Banner$Type;->BANNER:Lcom/discord/widgets/guilds/profile/WidgetGuildProfileSheetViewModel$Banner$Type;
|
|
|
|
goto :goto_2
|
|
|
|
:cond_2
|
|
sget-object v0, Lcom/discord/widgets/guilds/profile/WidgetGuildProfileSheetViewModel$Banner$Type;->SPLASH:Lcom/discord/widgets/guilds/profile/WidgetGuildProfileSheetViewModel$Banner$Type;
|
|
|
|
:goto_2
|
|
sget-object v1, Lcom/discord/widgets/guilds/profile/WidgetGuildProfileSheetViewModel$Banner$Type;->BANNER:Lcom/discord/widgets/guilds/profile/WidgetGuildProfileSheetViewModel$Banner$Type;
|
|
|
|
if-ne v0, v1, :cond_3
|
|
|
|
invoke-virtual {p1}, Lcom/discord/models/domain/ModelGuildPreview;->getBanner()Ljava/lang/String;
|
|
|
|
move-result-object v1
|
|
|
|
goto :goto_3
|
|
|
|
:cond_3
|
|
invoke-virtual {p1}, Lcom/discord/models/domain/ModelGuildPreview;->getSplash()Ljava/lang/String;
|
|
|
|
move-result-object v1
|
|
|
|
:goto_3
|
|
new-instance v9, Lcom/discord/widgets/guilds/profile/WidgetGuildProfileSheetViewModel$Banner;
|
|
|
|
invoke-virtual {p1}, Lcom/discord/models/domain/ModelGuildPreview;->getId()J
|
|
|
|
move-result-wide v2
|
|
|
|
invoke-direct {v9, v2, v3, v1, v0}, Lcom/discord/widgets/guilds/profile/WidgetGuildProfileSheetViewModel$Banner;-><init>(JLjava/lang/String;Lcom/discord/widgets/guilds/profile/WidgetGuildProfileSheetViewModel$Banner$Type;)V
|
|
|
|
new-instance v0, Lcom/discord/widgets/guilds/profile/WidgetGuildProfileSheetViewModel$ViewState$Loaded;
|
|
|
|
invoke-virtual {p1}, Lcom/discord/models/domain/ModelGuildPreview;->getId()J
|
|
|
|
move-result-wide v2
|
|
|
|
invoke-virtual {p1}, Lcom/discord/models/domain/ModelGuildPreview;->getName()Ljava/lang/String;
|
|
|
|
move-result-object v4
|
|
|
|
invoke-virtual {p1}, Lcom/discord/models/domain/ModelGuildPreview;->shortName()Ljava/lang/String;
|
|
|
|
move-result-object v5
|
|
|
|
invoke-virtual {p1}, Lcom/discord/models/domain/ModelGuildPreview;->getIcon()Ljava/lang/String;
|
|
|
|
move-result-object v6
|
|
|
|
invoke-virtual {p1}, Lcom/discord/models/domain/ModelGuildPreview;->getDescription()Ljava/lang/String;
|
|
|
|
move-result-object v7
|
|
|
|
invoke-virtual {p1}, Lcom/discord/models/domain/ModelGuildPreview;->getApproximatePresenceCount()Ljava/lang/Integer;
|
|
|
|
move-result-object v10
|
|
|
|
invoke-virtual {p1}, Lcom/discord/models/domain/ModelGuildPreview;->getApproximateMemberCount()Ljava/lang/Integer;
|
|
|
|
move-result-object v11
|
|
|
|
const/4 v12, 0x0
|
|
|
|
move-object v1, v0
|
|
|
|
invoke-direct/range {v1 .. v12}, Lcom/discord/widgets/guilds/profile/WidgetGuildProfileSheetViewModel$ViewState$Loaded;-><init>(JLjava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/Integer;Lcom/discord/widgets/guilds/profile/WidgetGuildProfileSheetViewModel$Banner;Ljava/lang/Integer;Ljava/lang/Integer;Lcom/discord/widgets/guilds/profile/WidgetGuildProfileSheetViewModel$TabItems;)V
|
|
|
|
invoke-virtual {p0, v0}, Le/a/b/c0;->updateViewState(Ljava/lang/Object;)V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method private final handleStoreState(Lcom/discord/widgets/guilds/profile/WidgetGuildProfileSheetViewModel$StoreState;)V
|
|
.locals 3
|
|
|
|
invoke-virtual {p1}, Lcom/discord/widgets/guilds/profile/WidgetGuildProfileSheetViewModel$StoreState;->component1()Lcom/discord/models/domain/ModelGuild;
|
|
|
|
move-result-object v0
|
|
|
|
invoke-virtual {p1}, Lcom/discord/widgets/guilds/profile/WidgetGuildProfileSheetViewModel$StoreState;->component2()Lcom/discord/stores/StoreGuildProfiles$GuildProfileData;
|
|
|
|
move-result-object v1
|
|
|
|
invoke-virtual {p1}, Lcom/discord/widgets/guilds/profile/WidgetGuildProfileSheetViewModel$StoreState;->component3()Lcom/discord/utilities/channel/GuildChannelsInfo;
|
|
|
|
move-result-object p1
|
|
|
|
const/4 v2, 0x0
|
|
|
|
if-eqz v0, :cond_1
|
|
|
|
if-eqz v1, :cond_0
|
|
|
|
invoke-virtual {v1}, Lcom/discord/stores/StoreGuildProfiles$GuildProfileData;->getData()Lcom/discord/models/domain/ModelGuildPreview;
|
|
|
|
move-result-object v2
|
|
|
|
:cond_0
|
|
invoke-direct {p0, v0, v2, p1}, Lcom/discord/widgets/guilds/profile/WidgetGuildProfileSheetViewModel;->handleLoadedGuild(Lcom/discord/models/domain/ModelGuild;Lcom/discord/models/domain/ModelGuildPreview;Lcom/discord/utilities/channel/GuildChannelsInfo;)V
|
|
|
|
goto :goto_3
|
|
|
|
:cond_1
|
|
if-eqz v1, :cond_2
|
|
|
|
invoke-virtual {v1}, Lcom/discord/stores/StoreGuildProfiles$GuildProfileData;->getFetchState()Lcom/discord/stores/StoreGuildProfiles$FetchStates;
|
|
|
|
move-result-object p1
|
|
|
|
goto :goto_0
|
|
|
|
:cond_2
|
|
move-object p1, v2
|
|
|
|
:goto_0
|
|
sget-object v0, Lcom/discord/stores/StoreGuildProfiles$FetchStates;->SUCCEEDED:Lcom/discord/stores/StoreGuildProfiles$FetchStates;
|
|
|
|
if-ne p1, v0, :cond_3
|
|
|
|
invoke-virtual {v1}, Lcom/discord/stores/StoreGuildProfiles$GuildProfileData;->getData()Lcom/discord/models/domain/ModelGuildPreview;
|
|
|
|
move-result-object p1
|
|
|
|
if-eqz p1, :cond_3
|
|
|
|
invoke-virtual {v1}, Lcom/discord/stores/StoreGuildProfiles$GuildProfileData;->getData()Lcom/discord/models/domain/ModelGuildPreview;
|
|
|
|
move-result-object p1
|
|
|
|
invoke-direct {p0, p1}, Lcom/discord/widgets/guilds/profile/WidgetGuildProfileSheetViewModel;->handleLoadedGuildPreview(Lcom/discord/models/domain/ModelGuildPreview;)V
|
|
|
|
goto :goto_3
|
|
|
|
:cond_3
|
|
if-eqz v1, :cond_4
|
|
|
|
invoke-virtual {v1}, Lcom/discord/stores/StoreGuildProfiles$GuildProfileData;->getFetchState()Lcom/discord/stores/StoreGuildProfiles$FetchStates;
|
|
|
|
move-result-object p1
|
|
|
|
goto :goto_1
|
|
|
|
:cond_4
|
|
move-object p1, v2
|
|
|
|
:goto_1
|
|
sget-object v0, Lcom/discord/stores/StoreGuildProfiles$FetchStates;->FAILED:Lcom/discord/stores/StoreGuildProfiles$FetchStates;
|
|
|
|
if-eq p1, v0, :cond_7
|
|
|
|
if-eqz v1, :cond_5
|
|
|
|
invoke-virtual {v1}, Lcom/discord/stores/StoreGuildProfiles$GuildProfileData;->getFetchState()Lcom/discord/stores/StoreGuildProfiles$FetchStates;
|
|
|
|
move-result-object v2
|
|
|
|
:cond_5
|
|
sget-object p1, Lcom/discord/stores/StoreGuildProfiles$FetchStates;->SUCCEEDED:Lcom/discord/stores/StoreGuildProfiles$FetchStates;
|
|
|
|
if-ne v2, p1, :cond_6
|
|
|
|
invoke-virtual {v1}, Lcom/discord/stores/StoreGuildProfiles$GuildProfileData;->getData()Lcom/discord/models/domain/ModelGuildPreview;
|
|
|
|
move-result-object p1
|
|
|
|
if-nez p1, :cond_6
|
|
|
|
goto :goto_2
|
|
|
|
:cond_6
|
|
sget-object p1, Lcom/discord/widgets/guilds/profile/WidgetGuildProfileSheetViewModel$ViewState$Loading;->INSTANCE:Lcom/discord/widgets/guilds/profile/WidgetGuildProfileSheetViewModel$ViewState$Loading;
|
|
|
|
invoke-virtual {p0, p1}, Le/a/b/c0;->updateViewState(Ljava/lang/Object;)V
|
|
|
|
goto :goto_3
|
|
|
|
:cond_7
|
|
:goto_2
|
|
sget-object p1, Lcom/discord/widgets/guilds/profile/WidgetGuildProfileSheetViewModel$ViewState$Invalid;->INSTANCE:Lcom/discord/widgets/guilds/profile/WidgetGuildProfileSheetViewModel$ViewState$Invalid;
|
|
|
|
invoke-virtual {p0, p1}, Le/a/b/c0;->updateViewState(Ljava/lang/Object;)V
|
|
|
|
:goto_3
|
|
return-void
|
|
.end method
|