392 lines
12 KiB
Smali
392 lines
12 KiB
Smali
.class public final Lcom/discord/widgets/user/profile/UserProfileHeaderViewModel$Factory;
|
|
.super Ljava/lang/Object;
|
|
.source "UserProfileHeaderViewModel.kt"
|
|
|
|
# interfaces
|
|
.implements Landroidx/lifecycle/ViewModelProvider$Factory;
|
|
|
|
|
|
# annotations
|
|
.annotation system Ldalvik/annotation/EnclosingClass;
|
|
value = Lcom/discord/widgets/user/profile/UserProfileHeaderViewModel;
|
|
.end annotation
|
|
|
|
.annotation system Ldalvik/annotation/InnerClass;
|
|
accessFlags = 0x19
|
|
name = "Factory"
|
|
.end annotation
|
|
|
|
|
|
# instance fields
|
|
.field public final channelId:Ljava/lang/Long;
|
|
|
|
.field public final userId:J
|
|
|
|
|
|
# direct methods
|
|
.method public constructor <init>(JLjava/lang/Long;)V
|
|
.locals 0
|
|
|
|
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
|
|
|
|
iput-wide p1, p0, Lcom/discord/widgets/user/profile/UserProfileHeaderViewModel$Factory;->userId:J
|
|
|
|
iput-object p3, p0, Lcom/discord/widgets/user/profile/UserProfileHeaderViewModel$Factory;->channelId:Ljava/lang/Long;
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public static final synthetic access$observeComputedMembers(Lcom/discord/widgets/user/profile/UserProfileHeaderViewModel$Factory;Ljava/util/Collection;Lcom/discord/stores/StoreChannels;Lcom/discord/stores/StoreGuilds;)Lrx/Observable;
|
|
.locals 0
|
|
|
|
invoke-direct {p0, p1, p2, p3}, Lcom/discord/widgets/user/profile/UserProfileHeaderViewModel$Factory;->observeComputedMembers(Ljava/util/Collection;Lcom/discord/stores/StoreChannels;Lcom/discord/stores/StoreGuilds;)Lrx/Observable;
|
|
|
|
move-result-object p0
|
|
|
|
return-object p0
|
|
.end method
|
|
|
|
.method private final observeComputedMembers(Ljava/util/Collection;Lcom/discord/stores/StoreChannels;Lcom/discord/stores/StoreGuilds;)Lrx/Observable;
|
|
.locals 2
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"(",
|
|
"Ljava/util/Collection<",
|
|
"Ljava/lang/Long;",
|
|
">;",
|
|
"Lcom/discord/stores/StoreChannels;",
|
|
"Lcom/discord/stores/StoreGuilds;",
|
|
")",
|
|
"Lrx/Observable<",
|
|
"Ljava/util/Map<",
|
|
"Ljava/lang/Long;",
|
|
"Lcom/discord/models/domain/ModelGuildMember$Computed;",
|
|
">;>;"
|
|
}
|
|
.end annotation
|
|
|
|
iget-object v0, p0, Lcom/discord/widgets/user/profile/UserProfileHeaderViewModel$Factory;->channelId:Ljava/lang/Long;
|
|
|
|
if-eqz v0, :cond_0
|
|
|
|
invoke-virtual {v0}, Ljava/lang/Long;->longValue()J
|
|
|
|
move-result-wide v0
|
|
|
|
invoke-virtual {p2, v0, v1}, Lcom/discord/stores/StoreChannels;->get(J)Lrx/Observable;
|
|
|
|
move-result-object p2
|
|
|
|
new-instance v0, Lcom/discord/widgets/user/profile/UserProfileHeaderViewModel$Factory$observeComputedMembers$1;
|
|
|
|
invoke-direct {v0, p3, p1}, Lcom/discord/widgets/user/profile/UserProfileHeaderViewModel$Factory$observeComputedMembers$1;-><init>(Lcom/discord/stores/StoreGuilds;Ljava/util/Collection;)V
|
|
|
|
invoke-virtual {p2, v0}, Lrx/Observable;->U(Lr0/k/b;)Lrx/Observable;
|
|
|
|
move-result-object p1
|
|
|
|
const-string p2, "storeChannels\n \u2026emptyMap())\n }"
|
|
|
|
invoke-static {p1, p2}, Lj0/n/c/h;->checkExpressionValueIsNotNull(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
goto :goto_0
|
|
|
|
:cond_0
|
|
sget-object p1, Lj0/i/o;->d:Lj0/i/o;
|
|
|
|
new-instance p2, Lr0/l/e/j;
|
|
|
|
invoke-direct {p2, p1}, Lr0/l/e/j;-><init>(Ljava/lang/Object;)V
|
|
|
|
const-string p1, "Observable.just(emptyMap())"
|
|
|
|
invoke-static {p2, p1}, Lj0/n/c/h;->checkExpressionValueIsNotNull(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
move-object p1, p2
|
|
|
|
:goto_0
|
|
return-object p1
|
|
.end method
|
|
|
|
|
|
# virtual methods
|
|
.method public create(Ljava/lang/Class;)Landroidx/lifecycle/ViewModel;
|
|
.locals 20
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"<T:",
|
|
"Landroidx/lifecycle/ViewModel;",
|
|
">(",
|
|
"Ljava/lang/Class<",
|
|
"TT;>;)TT;"
|
|
}
|
|
.end annotation
|
|
|
|
if-eqz p1, :cond_0
|
|
|
|
new-instance v0, Lcom/discord/widgets/user/profile/UserProfileHeaderViewModel;
|
|
|
|
sget-object v1, Lcom/discord/stores/StoreStream;->Companion:Lcom/discord/stores/StoreStream$Companion;
|
|
|
|
invoke-virtual {v1}, Lcom/discord/stores/StoreStream$Companion;->getUsers()Lcom/discord/stores/StoreUser;
|
|
|
|
move-result-object v3
|
|
|
|
sget-object v1, Lcom/discord/stores/StoreStream;->Companion:Lcom/discord/stores/StoreStream$Companion;
|
|
|
|
invoke-virtual {v1}, Lcom/discord/stores/StoreStream$Companion;->getChannels()Lcom/discord/stores/StoreChannels;
|
|
|
|
move-result-object v4
|
|
|
|
sget-object v1, Lcom/discord/stores/StoreStream;->Companion:Lcom/discord/stores/StoreStream$Companion;
|
|
|
|
invoke-virtual {v1}, Lcom/discord/stores/StoreStream$Companion;->getGuilds()Lcom/discord/stores/StoreGuilds;
|
|
|
|
move-result-object v5
|
|
|
|
sget-object v1, Lcom/discord/stores/StoreStream;->Companion:Lcom/discord/stores/StoreStream$Companion;
|
|
|
|
invoke-virtual {v1}, Lcom/discord/stores/StoreStream$Companion;->getPresences()Lcom/discord/stores/StoreUserPresence;
|
|
|
|
move-result-object v6
|
|
|
|
sget-object v1, Lcom/discord/stores/StoreStream;->Companion:Lcom/discord/stores/StoreStream$Companion;
|
|
|
|
invoke-virtual {v1}, Lcom/discord/stores/StoreStream$Companion;->getUserProfile()Lcom/discord/stores/StoreUserProfile;
|
|
|
|
move-result-object v7
|
|
|
|
sget-object v1, Lcom/discord/stores/StoreStream;->Companion:Lcom/discord/stores/StoreStream$Companion;
|
|
|
|
invoke-virtual {v1}, Lcom/discord/stores/StoreStream$Companion;->getExperiments()Lcom/discord/stores/StoreExperiments;
|
|
|
|
move-result-object v9
|
|
|
|
sget-object v1, Lcom/discord/stores/StoreStream;->Companion:Lcom/discord/stores/StoreStream$Companion;
|
|
|
|
invoke-virtual {v1}, Lcom/discord/stores/StoreStream$Companion;->getUserSettings()Lcom/discord/stores/StoreUserSettings;
|
|
|
|
move-result-object v8
|
|
|
|
new-instance v1, Lcom/discord/utilities/streams/StreamContextService;
|
|
|
|
const/4 v11, 0x0
|
|
|
|
const/4 v12, 0x0
|
|
|
|
const/4 v13, 0x0
|
|
|
|
const/4 v14, 0x0
|
|
|
|
const/4 v15, 0x0
|
|
|
|
const/16 v16, 0x0
|
|
|
|
const/16 v17, 0x0
|
|
|
|
const/16 v18, 0x7f
|
|
|
|
const/16 v19, 0x0
|
|
|
|
move-object v10, v1
|
|
|
|
invoke-direct/range {v10 .. v19}, Lcom/discord/utilities/streams/StreamContextService;-><init>(Lcom/discord/stores/StoreApplicationStreaming;Lcom/discord/stores/StoreGuilds;Lcom/discord/stores/StorePermissions;Lcom/discord/stores/StoreUser;Lcom/discord/stores/StoreVoiceStates;Lcom/discord/stores/StoreChannels;Lcom/discord/stores/StoreApplicationStreamPreviews;ILkotlin/jvm/internal/DefaultConstructorMarker;)V
|
|
|
|
move-object/from16 v2, p0
|
|
|
|
invoke-virtual/range {v2 .. v10}, Lcom/discord/widgets/user/profile/UserProfileHeaderViewModel$Factory;->observeStoreState(Lcom/discord/stores/StoreUser;Lcom/discord/stores/StoreChannels;Lcom/discord/stores/StoreGuilds;Lcom/discord/stores/StoreUserPresence;Lcom/discord/stores/StoreUserProfile;Lcom/discord/stores/StoreUserSettings;Lcom/discord/stores/StoreExperiments;Lcom/discord/utilities/streams/StreamContextService;)Lrx/Observable;
|
|
|
|
move-result-object v1
|
|
|
|
invoke-direct {v0, v1}, Lcom/discord/widgets/user/profile/UserProfileHeaderViewModel;-><init>(Lrx/Observable;)V
|
|
|
|
return-object v0
|
|
|
|
:cond_0
|
|
const-string v0, "modelClass"
|
|
|
|
invoke-static {v0}, Lj0/n/c/h;->c(Ljava/lang/String;)V
|
|
|
|
const/4 v0, 0x0
|
|
|
|
throw v0
|
|
.end method
|
|
|
|
.method public final getChannelId()Ljava/lang/Long;
|
|
.locals 1
|
|
|
|
iget-object v0, p0, Lcom/discord/widgets/user/profile/UserProfileHeaderViewModel$Factory;->channelId:Ljava/lang/Long;
|
|
|
|
return-object v0
|
|
.end method
|
|
|
|
.method public final getUserId()J
|
|
.locals 2
|
|
|
|
iget-wide v0, p0, Lcom/discord/widgets/user/profile/UserProfileHeaderViewModel$Factory;->userId:J
|
|
|
|
return-wide v0
|
|
.end method
|
|
|
|
.method public final observeStoreState(Lcom/discord/stores/StoreUser;Lcom/discord/stores/StoreChannels;Lcom/discord/stores/StoreGuilds;Lcom/discord/stores/StoreUserPresence;Lcom/discord/stores/StoreUserProfile;Lcom/discord/stores/StoreUserSettings;Lcom/discord/stores/StoreExperiments;Lcom/discord/utilities/streams/StreamContextService;)Lrx/Observable;
|
|
.locals 12
|
|
.annotation build Landroidx/annotation/VisibleForTesting;
|
|
.end annotation
|
|
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"(",
|
|
"Lcom/discord/stores/StoreUser;",
|
|
"Lcom/discord/stores/StoreChannels;",
|
|
"Lcom/discord/stores/StoreGuilds;",
|
|
"Lcom/discord/stores/StoreUserPresence;",
|
|
"Lcom/discord/stores/StoreUserProfile;",
|
|
"Lcom/discord/stores/StoreUserSettings;",
|
|
"Lcom/discord/stores/StoreExperiments;",
|
|
"Lcom/discord/utilities/streams/StreamContextService;",
|
|
")",
|
|
"Lrx/Observable<",
|
|
"Lcom/discord/widgets/user/profile/UserProfileHeaderViewModel$StoreState;",
|
|
">;"
|
|
}
|
|
.end annotation
|
|
|
|
move-object v0, p1
|
|
|
|
const/4 v1, 0x0
|
|
|
|
if-eqz v0, :cond_7
|
|
|
|
if-eqz p2, :cond_6
|
|
|
|
if-eqz p3, :cond_5
|
|
|
|
if-eqz p4, :cond_4
|
|
|
|
if-eqz p5, :cond_3
|
|
|
|
if-eqz p6, :cond_2
|
|
|
|
if-eqz p7, :cond_1
|
|
|
|
if-eqz p8, :cond_0
|
|
|
|
invoke-virtual {p1}, Lcom/discord/stores/StoreUser;->observeMe()Lrx/Observable;
|
|
|
|
move-result-object v1
|
|
|
|
new-instance v2, Lcom/discord/widgets/user/profile/UserProfileHeaderViewModel$Factory$observeStoreState$1;
|
|
|
|
move-object v11, p0
|
|
|
|
invoke-direct {v2, p0, p1}, Lcom/discord/widgets/user/profile/UserProfileHeaderViewModel$Factory$observeStoreState$1;-><init>(Lcom/discord/widgets/user/profile/UserProfileHeaderViewModel$Factory;Lcom/discord/stores/StoreUser;)V
|
|
|
|
invoke-virtual {v1, v2}, Lrx/Observable;->U(Lr0/k/b;)Lrx/Observable;
|
|
|
|
move-result-object v0
|
|
|
|
new-instance v1, Lcom/discord/widgets/user/profile/UserProfileHeaderViewModel$Factory$observeStoreState$2;
|
|
|
|
move-object v2, v1
|
|
|
|
move-object v3, p0
|
|
|
|
move-object v4, p2
|
|
|
|
move-object v5, p3
|
|
|
|
move-object/from16 v6, p4
|
|
|
|
move-object/from16 v7, p8
|
|
|
|
move-object/from16 v8, p5
|
|
|
|
move-object/from16 v9, p7
|
|
|
|
move-object/from16 v10, p6
|
|
|
|
invoke-direct/range {v2 .. v10}, Lcom/discord/widgets/user/profile/UserProfileHeaderViewModel$Factory$observeStoreState$2;-><init>(Lcom/discord/widgets/user/profile/UserProfileHeaderViewModel$Factory;Lcom/discord/stores/StoreChannels;Lcom/discord/stores/StoreGuilds;Lcom/discord/stores/StoreUserPresence;Lcom/discord/utilities/streams/StreamContextService;Lcom/discord/stores/StoreUserProfile;Lcom/discord/stores/StoreExperiments;Lcom/discord/stores/StoreUserSettings;)V
|
|
|
|
invoke-virtual {v0, v1}, Lrx/Observable;->U(Lr0/k/b;)Lrx/Observable;
|
|
|
|
move-result-object v0
|
|
|
|
const-string v1, "storeUser.observeMe()\n \u2026 }\n }"
|
|
|
|
invoke-static {v0, v1}, Lj0/n/c/h;->checkExpressionValueIsNotNull(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
return-object v0
|
|
|
|
:cond_0
|
|
move-object v11, p0
|
|
|
|
const-string v0, "streamContextService"
|
|
|
|
invoke-static {v0}, Lj0/n/c/h;->c(Ljava/lang/String;)V
|
|
|
|
throw v1
|
|
|
|
:cond_1
|
|
move-object v11, p0
|
|
|
|
const-string v0, "storeExperiments"
|
|
|
|
invoke-static {v0}, Lj0/n/c/h;->c(Ljava/lang/String;)V
|
|
|
|
throw v1
|
|
|
|
:cond_2
|
|
move-object v11, p0
|
|
|
|
const-string v0, "storeUserSettings"
|
|
|
|
invoke-static {v0}, Lj0/n/c/h;->c(Ljava/lang/String;)V
|
|
|
|
throw v1
|
|
|
|
:cond_3
|
|
move-object v11, p0
|
|
|
|
const-string v0, "storeUserProfile"
|
|
|
|
invoke-static {v0}, Lj0/n/c/h;->c(Ljava/lang/String;)V
|
|
|
|
throw v1
|
|
|
|
:cond_4
|
|
move-object v11, p0
|
|
|
|
const-string v0, "storeUserPresence"
|
|
|
|
invoke-static {v0}, Lj0/n/c/h;->c(Ljava/lang/String;)V
|
|
|
|
throw v1
|
|
|
|
:cond_5
|
|
move-object v11, p0
|
|
|
|
const-string v0, "storeGuilds"
|
|
|
|
invoke-static {v0}, Lj0/n/c/h;->c(Ljava/lang/String;)V
|
|
|
|
throw v1
|
|
|
|
:cond_6
|
|
move-object v11, p0
|
|
|
|
const-string v0, "storeChannels"
|
|
|
|
invoke-static {v0}, Lj0/n/c/h;->c(Ljava/lang/String;)V
|
|
|
|
throw v1
|
|
|
|
:cond_7
|
|
move-object v11, p0
|
|
|
|
const-string v0, "storeUser"
|
|
|
|
invoke-static {v0}, Lj0/n/c/h;->c(Ljava/lang/String;)V
|
|
|
|
throw v1
|
|
.end method
|