774 lines
26 KiB
Smali
774 lines
26 KiB
Smali
.class public final Lcom/discord/widgets/user/usersheet/WidgetUserSheetViewModelFactory;
|
|
.super Ljava/lang/Object;
|
|
.source "WidgetUserSheetViewModelFactory.kt"
|
|
|
|
# interfaces
|
|
.implements Landroidx/lifecycle/ViewModelProvider$Factory;
|
|
|
|
|
|
# annotations
|
|
.annotation system Ldalvik/annotation/MemberClasses;
|
|
value = {
|
|
Lcom/discord/widgets/user/usersheet/WidgetUserSheetViewModelFactory$StoreChunk;
|
|
}
|
|
.end annotation
|
|
|
|
|
|
# instance fields
|
|
.field public final channelId:Ljava/lang/Long;
|
|
|
|
.field public final isVoiceContext:Z
|
|
|
|
.field public final userId:J
|
|
|
|
|
|
# direct methods
|
|
.method public constructor <init>(JLjava/lang/Long;Z)V
|
|
.locals 0
|
|
|
|
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
|
|
|
|
iput-wide p1, p0, Lcom/discord/widgets/user/usersheet/WidgetUserSheetViewModelFactory;->userId:J
|
|
|
|
iput-object p3, p0, Lcom/discord/widgets/user/usersheet/WidgetUserSheetViewModelFactory;->channelId:Ljava/lang/Long;
|
|
|
|
iput-boolean p4, p0, Lcom/discord/widgets/user/usersheet/WidgetUserSheetViewModelFactory;->isVoiceContext:Z
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public static final synthetic access$observeStoreStateFromUsersAndChannels(Lcom/discord/widgets/user/usersheet/WidgetUserSheetViewModelFactory;Lcom/discord/models/domain/ModelUser;Lcom/discord/models/domain/ModelUser;Lcom/discord/models/domain/ModelChannel;Lcom/discord/models/domain/ModelChannel;Lcom/discord/stores/StoreUserProfile;Lcom/discord/stores/StoreUserRelationships;Lcom/discord/stores/StoreVoiceStates;Lcom/discord/stores/StoreGuilds;Lcom/discord/stores/StoreMediaSettings;Lcom/discord/stores/StoreUserPresence;Lcom/discord/stores/StorePermissions;Lcom/discord/stores/StoreUserNotes;Lrx/Scheduler;)Lrx/Observable;
|
|
.locals 0
|
|
|
|
invoke-direct/range {p0 .. p13}, Lcom/discord/widgets/user/usersheet/WidgetUserSheetViewModelFactory;->observeStoreStateFromUsersAndChannels(Lcom/discord/models/domain/ModelUser;Lcom/discord/models/domain/ModelUser;Lcom/discord/models/domain/ModelChannel;Lcom/discord/models/domain/ModelChannel;Lcom/discord/stores/StoreUserProfile;Lcom/discord/stores/StoreUserRelationships;Lcom/discord/stores/StoreVoiceStates;Lcom/discord/stores/StoreGuilds;Lcom/discord/stores/StoreMediaSettings;Lcom/discord/stores/StoreUserPresence;Lcom/discord/stores/StorePermissions;Lcom/discord/stores/StoreUserNotes;Lrx/Scheduler;)Lrx/Observable;
|
|
|
|
move-result-object p0
|
|
|
|
return-object p0
|
|
.end method
|
|
|
|
.method private final observeStoreChunk(Lcom/discord/models/domain/ModelUser;Lcom/discord/models/domain/ModelUser;Lcom/discord/models/domain/ModelChannel;Lcom/discord/models/domain/ModelChannel;Lcom/discord/stores/StoreVoiceStates;Lcom/discord/stores/StoreGuilds;Lcom/discord/stores/StoreMediaSettings;Lcom/discord/stores/StoreUserPresence;Lcom/discord/stores/StorePermissions;Lrx/Scheduler;)Lrx/Observable;
|
|
.locals 18
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"(",
|
|
"Lcom/discord/models/domain/ModelUser;",
|
|
"Lcom/discord/models/domain/ModelUser;",
|
|
"Lcom/discord/models/domain/ModelChannel;",
|
|
"Lcom/discord/models/domain/ModelChannel;",
|
|
"Lcom/discord/stores/StoreVoiceStates;",
|
|
"Lcom/discord/stores/StoreGuilds;",
|
|
"Lcom/discord/stores/StoreMediaSettings;",
|
|
"Lcom/discord/stores/StoreUserPresence;",
|
|
"Lcom/discord/stores/StorePermissions;",
|
|
"Lrx/Scheduler;",
|
|
")",
|
|
"Lrx/Observable<",
|
|
"Lcom/discord/widgets/user/usersheet/WidgetUserSheetViewModelFactory$StoreChunk;",
|
|
">;"
|
|
}
|
|
.end annotation
|
|
|
|
move-object/from16 v0, p3
|
|
|
|
move-object/from16 v1, p4
|
|
|
|
move-object/from16 v2, p6
|
|
|
|
move-object/from16 v3, p7
|
|
|
|
const/4 v4, 0x1
|
|
|
|
const-string v5, "channel.guildId"
|
|
|
|
if-eqz v0, :cond_0
|
|
|
|
invoke-static {v0, v5}, Le/e/b/a/a;->a(Lcom/discord/models/domain/ModelChannel;Ljava/lang/String;)J
|
|
|
|
move-result-wide v6
|
|
|
|
const/4 v8, 0x2
|
|
|
|
new-array v8, v8, [Ljava/lang/Long;
|
|
|
|
const/4 v9, 0x0
|
|
|
|
invoke-virtual/range {p1 .. p1}, Lcom/discord/models/domain/ModelUser;->getId()J
|
|
|
|
move-result-wide v10
|
|
|
|
invoke-static {v10, v11}, Ljava/lang/Long;->valueOf(J)Ljava/lang/Long;
|
|
|
|
move-result-object v10
|
|
|
|
aput-object v10, v8, v9
|
|
|
|
invoke-virtual/range {p2 .. p2}, Lcom/discord/models/domain/ModelUser;->getId()J
|
|
|
|
move-result-wide v9
|
|
|
|
invoke-static {v9, v10}, Ljava/lang/Long;->valueOf(J)Ljava/lang/Long;
|
|
|
|
move-result-object v9
|
|
|
|
aput-object v9, v8, v4
|
|
|
|
invoke-static {v8}, Le/k/a/b/e/p/g;->listOf([Ljava/lang/Object;)Ljava/util/List;
|
|
|
|
move-result-object v8
|
|
|
|
invoke-virtual {v2, v6, v7, v8}, Lcom/discord/stores/StoreGuilds;->getComputed(JLjava/util/Collection;)Lrx/Observable;
|
|
|
|
move-result-object v6
|
|
|
|
move-object v8, v6
|
|
|
|
goto :goto_0
|
|
|
|
:cond_0
|
|
invoke-static {}, Ls/q/l;->emptyMap()Ljava/util/Map;
|
|
|
|
move-result-object v6
|
|
|
|
new-instance v7, La0/m/e/j;
|
|
|
|
invoke-direct {v7, v6}, La0/m/e/j;-><init>(Ljava/lang/Object;)V
|
|
|
|
move-object v8, v7
|
|
|
|
:goto_0
|
|
const-string v6, "when {\n (channel !=\u2026le.just(emptyMap())\n }"
|
|
|
|
invoke-static {v8, v6}, Ls/u/b/j;->checkExpressionValueIsNotNull(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
if-eqz v0, :cond_1
|
|
|
|
invoke-virtual/range {p3 .. p3}, Lcom/discord/models/domain/ModelChannel;->getGuildId()Ljava/lang/Long;
|
|
|
|
move-result-object v7
|
|
|
|
invoke-static {v7, v5}, Ls/u/b/j;->checkExpressionValueIsNotNull(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
invoke-virtual {v7}, Ljava/lang/Long;->longValue()J
|
|
|
|
move-result-wide v9
|
|
|
|
invoke-virtual {v2, v9, v10}, Lcom/discord/stores/StoreGuilds;->getRoles(J)Lrx/Observable;
|
|
|
|
move-result-object v7
|
|
|
|
move-object v9, v7
|
|
|
|
goto :goto_1
|
|
|
|
:cond_1
|
|
invoke-static {}, Ls/q/l;->emptyMap()Ljava/util/Map;
|
|
|
|
move-result-object v7
|
|
|
|
new-instance v9, La0/m/e/j;
|
|
|
|
invoke-direct {v9, v7}, La0/m/e/j;-><init>(Ljava/lang/Object;)V
|
|
|
|
:goto_1
|
|
invoke-static {v9, v6}, Ls/u/b/j;->checkExpressionValueIsNotNull(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
if-eqz v1, :cond_2
|
|
|
|
const-string v6, "mySelectedVoiceChannel.guildId"
|
|
|
|
invoke-static {v1, v6}, Le/e/b/a/a;->a(Lcom/discord/models/domain/ModelChannel;Ljava/lang/String;)J
|
|
|
|
move-result-wide v6
|
|
|
|
invoke-virtual/range {p4 .. p4}, Lcom/discord/models/domain/ModelChannel;->getId()J
|
|
|
|
move-result-wide v10
|
|
|
|
move-object/from16 v1, p5
|
|
|
|
invoke-virtual {v1, v6, v7, v10, v11}, Lcom/discord/stores/StoreVoiceStates;->get(JJ)Lrx/Observable;
|
|
|
|
move-result-object v1
|
|
|
|
move-object v10, v1
|
|
|
|
goto :goto_2
|
|
|
|
:cond_2
|
|
invoke-static {}, Ls/q/l;->emptyMap()Ljava/util/Map;
|
|
|
|
move-result-object v1
|
|
|
|
new-instance v6, La0/m/e/j;
|
|
|
|
invoke-direct {v6, v1}, La0/m/e/j;-><init>(Ljava/lang/Object;)V
|
|
|
|
const-string v1, "Observable.just(emptyMap())"
|
|
|
|
invoke-static {v6, v1}, Ls/u/b/j;->checkExpressionValueIsNotNull(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
move-object v10, v6
|
|
|
|
:goto_2
|
|
const/4 v1, 0x0
|
|
|
|
if-eqz v0, :cond_3
|
|
|
|
invoke-virtual/range {p3 .. p3}, Lcom/discord/models/domain/ModelChannel;->getGuildId()Ljava/lang/Long;
|
|
|
|
move-result-object v6
|
|
|
|
invoke-static {v6, v5}, Ls/u/b/j;->checkExpressionValueIsNotNull(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
invoke-virtual {v6}, Ljava/lang/Long;->longValue()J
|
|
|
|
move-result-wide v6
|
|
|
|
invoke-virtual {v2, v6, v7}, Lcom/discord/stores/StoreGuilds;->get(J)Lrx/Observable;
|
|
|
|
move-result-object v2
|
|
|
|
goto :goto_3
|
|
|
|
:cond_3
|
|
new-instance v2, La0/m/e/j;
|
|
|
|
invoke-direct {v2, v1}, La0/m/e/j;-><init>(Ljava/lang/Object;)V
|
|
|
|
:goto_3
|
|
move-object v14, v2
|
|
|
|
if-eqz v0, :cond_4
|
|
|
|
invoke-virtual/range {p3 .. p3}, Lcom/discord/models/domain/ModelChannel;->getGuildId()Ljava/lang/Long;
|
|
|
|
move-result-object v0
|
|
|
|
invoke-static {v0, v5}, Ls/u/b/j;->checkExpressionValueIsNotNull(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
invoke-virtual {v0}, Ljava/lang/Long;->longValue()J
|
|
|
|
move-result-wide v0
|
|
|
|
move-object/from16 v2, p9
|
|
|
|
invoke-virtual {v2, v0, v1}, Lcom/discord/stores/StorePermissions;->getForGuild(J)Lrx/Observable;
|
|
|
|
move-result-object v0
|
|
|
|
goto :goto_4
|
|
|
|
:cond_4
|
|
new-instance v0, La0/m/e/j;
|
|
|
|
invoke-direct {v0, v1}, La0/m/e/j;-><init>(Ljava/lang/Object;)V
|
|
|
|
:goto_4
|
|
move-object v15, v0
|
|
|
|
invoke-virtual/range {p1 .. p1}, Lcom/discord/models/domain/ModelUser;->getId()J
|
|
|
|
move-result-wide v0
|
|
|
|
invoke-virtual {v3, v0, v1}, Lcom/discord/stores/StoreMediaSettings;->getUserMuted(J)Lrx/Observable;
|
|
|
|
move-result-object v11
|
|
|
|
invoke-virtual/range {p1 .. p1}, Lcom/discord/models/domain/ModelUser;->getId()J
|
|
|
|
move-result-wide v0
|
|
|
|
invoke-virtual {v3, v0, v1}, Lcom/discord/stores/StoreMediaSettings;->getUserOutputVolume(J)Lrx/Observable;
|
|
|
|
move-result-object v12
|
|
|
|
sget-object v0, Lcom/discord/widgets/user/presence/ModelRichPresence;->Companion:Lcom/discord/widgets/user/presence/ModelRichPresence$Companion;
|
|
|
|
invoke-virtual/range {p1 .. p1}, Lcom/discord/models/domain/ModelUser;->getId()J
|
|
|
|
move-result-wide v1
|
|
|
|
move-object/from16 v3, p8
|
|
|
|
invoke-virtual {v0, v1, v2, v3}, Lcom/discord/widgets/user/presence/ModelRichPresence$Companion;->get(JLcom/discord/stores/StoreUserPresence;)Lrx/Observable;
|
|
|
|
move-result-object v13
|
|
|
|
sget-object v0, Lcom/discord/utilities/streams/StreamContext;->Companion:Lcom/discord/utilities/streams/StreamContext$Companion;
|
|
|
|
invoke-virtual/range {p1 .. p1}, Lcom/discord/models/domain/ModelUser;->getId()J
|
|
|
|
move-result-wide v1
|
|
|
|
invoke-virtual {v0, v1, v2, v4}, Lcom/discord/utilities/streams/StreamContext$Companion;->getForUser(JZ)Lrx/Observable;
|
|
|
|
move-result-object v16
|
|
|
|
sget-object v17, Lcom/discord/widgets/user/usersheet/WidgetUserSheetViewModelFactory$observeStoreChunk$1;->INSTANCE:Lcom/discord/widgets/user/usersheet/WidgetUserSheetViewModelFactory$observeStoreChunk$1;
|
|
|
|
invoke-static/range {v8 .. v17}, Lrx/Observable;->a(Lrx/Observable;Lrx/Observable;Lrx/Observable;Lrx/Observable;Lrx/Observable;Lrx/Observable;Lrx/Observable;Lrx/Observable;Lrx/Observable;Lrx/functions/Func9;)Lrx/Observable;
|
|
|
|
move-result-object v0
|
|
|
|
new-instance v1, Lcom/discord/utilities/rx/LeadingEdgeThrottle;
|
|
|
|
const-wide/16 v2, 0xfa
|
|
|
|
sget-object v4, Ljava/util/concurrent/TimeUnit;->MILLISECONDS:Ljava/util/concurrent/TimeUnit;
|
|
|
|
move-object/from16 v5, p10
|
|
|
|
invoke-direct {v1, v2, v3, v4, v5}, Lcom/discord/utilities/rx/LeadingEdgeThrottle;-><init>(JLjava/util/concurrent/TimeUnit;Lrx/Scheduler;)V
|
|
|
|
invoke-virtual {v0, v1}, Lrx/Observable;->a(Lrx/Observable$b;)Lrx/Observable;
|
|
|
|
move-result-object v0
|
|
|
|
const-string v1, "Observable.combineLatest\u2026, storeStateRxScheduler))"
|
|
|
|
invoke-static {v0, v1}, Ls/u/b/j;->checkExpressionValueIsNotNull(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
return-object v0
|
|
.end method
|
|
|
|
.method private final observeStoreState(Lcom/discord/stores/StoreUser;Lcom/discord/stores/StoreChannels;Lcom/discord/stores/StoreVoiceChannelSelected;Lcom/discord/stores/StoreUserProfile;Lcom/discord/stores/StoreUserRelationships;Lcom/discord/stores/StoreVoiceStates;Lcom/discord/stores/StoreGuilds;Lcom/discord/stores/StoreMediaSettings;Lcom/discord/stores/StoreUserPresence;Lcom/discord/stores/StorePermissions;Lcom/discord/stores/StoreUserNotes;Lrx/Scheduler;)Lrx/Observable;
|
|
.locals 16
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"(",
|
|
"Lcom/discord/stores/StoreUser;",
|
|
"Lcom/discord/stores/StoreChannels;",
|
|
"Lcom/discord/stores/StoreVoiceChannelSelected;",
|
|
"Lcom/discord/stores/StoreUserProfile;",
|
|
"Lcom/discord/stores/StoreUserRelationships;",
|
|
"Lcom/discord/stores/StoreVoiceStates;",
|
|
"Lcom/discord/stores/StoreGuilds;",
|
|
"Lcom/discord/stores/StoreMediaSettings;",
|
|
"Lcom/discord/stores/StoreUserPresence;",
|
|
"Lcom/discord/stores/StorePermissions;",
|
|
"Lcom/discord/stores/StoreUserNotes;",
|
|
"Lrx/Scheduler;",
|
|
")",
|
|
"Lrx/Observable<",
|
|
"Lcom/discord/widgets/user/usersheet/WidgetUserSheetViewModel$StoreState;",
|
|
">;"
|
|
}
|
|
.end annotation
|
|
|
|
move-object/from16 v13, p0
|
|
|
|
iget-wide v0, v13, Lcom/discord/widgets/user/usersheet/WidgetUserSheetViewModelFactory;->userId:J
|
|
|
|
move-object/from16 v2, p1
|
|
|
|
invoke-virtual {v2, v0, v1}, Lcom/discord/stores/StoreUser;->getUser(J)Lrx/Observable;
|
|
|
|
move-result-object v0
|
|
|
|
invoke-virtual/range {p1 .. p1}, Lcom/discord/stores/StoreUser;->getMe()Lrx/Observable;
|
|
|
|
move-result-object v1
|
|
|
|
sget-object v2, Lcom/discord/widgets/user/usersheet/WidgetUserSheetViewModelFactory$observeStoreState$1;->INSTANCE:Lcom/discord/widgets/user/usersheet/WidgetUserSheetViewModelFactory$observeStoreState$1;
|
|
|
|
invoke-static {v0, v1, v2}, Lrx/Observable;->a(Lrx/Observable;Lrx/Observable;Lrx/functions/Func2;)Lrx/Observable;
|
|
|
|
move-result-object v14
|
|
|
|
new-instance v15, Lcom/discord/widgets/user/usersheet/WidgetUserSheetViewModelFactory$observeStoreState$2;
|
|
|
|
move-object v0, v15
|
|
|
|
move-object/from16 v1, p0
|
|
|
|
move-object/from16 v2, p2
|
|
|
|
move-object/from16 v3, p3
|
|
|
|
move-object/from16 v4, p4
|
|
|
|
move-object/from16 v5, p5
|
|
|
|
move-object/from16 v6, p6
|
|
|
|
move-object/from16 v7, p7
|
|
|
|
move-object/from16 v8, p8
|
|
|
|
move-object/from16 v9, p9
|
|
|
|
move-object/from16 v10, p10
|
|
|
|
move-object/from16 v11, p11
|
|
|
|
move-object/from16 v12, p12
|
|
|
|
invoke-direct/range {v0 .. v12}, Lcom/discord/widgets/user/usersheet/WidgetUserSheetViewModelFactory$observeStoreState$2;-><init>(Lcom/discord/widgets/user/usersheet/WidgetUserSheetViewModelFactory;Lcom/discord/stores/StoreChannels;Lcom/discord/stores/StoreVoiceChannelSelected;Lcom/discord/stores/StoreUserProfile;Lcom/discord/stores/StoreUserRelationships;Lcom/discord/stores/StoreVoiceStates;Lcom/discord/stores/StoreGuilds;Lcom/discord/stores/StoreMediaSettings;Lcom/discord/stores/StoreUserPresence;Lcom/discord/stores/StorePermissions;Lcom/discord/stores/StoreUserNotes;Lrx/Scheduler;)V
|
|
|
|
invoke-virtual {v14, v15}, Lrx/Observable;->k(La0/l/i;)Lrx/Observable;
|
|
|
|
move-result-object v0
|
|
|
|
const-string v1, "Observable\n .comb\u2026ervable.empty()\n }"
|
|
|
|
invoke-static {v0, v1}, Ls/u/b/j;->checkExpressionValueIsNotNull(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
invoke-static {v0}, Lcom/discord/utilities/rx/ObservableExtensionsKt;->computationLatest(Lrx/Observable;)Lrx/Observable;
|
|
|
|
move-result-object v0
|
|
|
|
invoke-virtual {v0}, Lrx/Observable;->a()Lrx/Observable;
|
|
|
|
move-result-object v0
|
|
|
|
const-string v1, "Observable\n .comb\u2026 .distinctUntilChanged()"
|
|
|
|
invoke-static {v0, v1}, Ls/u/b/j;->checkExpressionValueIsNotNull(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
return-object v0
|
|
.end method
|
|
|
|
.method private final observeStoreStateFromUsersAndChannels(Lcom/discord/models/domain/ModelUser;Lcom/discord/models/domain/ModelUser;Lcom/discord/models/domain/ModelChannel;Lcom/discord/models/domain/ModelChannel;Lcom/discord/stores/StoreUserProfile;Lcom/discord/stores/StoreUserRelationships;Lcom/discord/stores/StoreVoiceStates;Lcom/discord/stores/StoreGuilds;Lcom/discord/stores/StoreMediaSettings;Lcom/discord/stores/StoreUserPresence;Lcom/discord/stores/StorePermissions;Lcom/discord/stores/StoreUserNotes;Lrx/Scheduler;)Lrx/Observable;
|
|
.locals 13
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"(",
|
|
"Lcom/discord/models/domain/ModelUser;",
|
|
"Lcom/discord/models/domain/ModelUser;",
|
|
"Lcom/discord/models/domain/ModelChannel;",
|
|
"Lcom/discord/models/domain/ModelChannel;",
|
|
"Lcom/discord/stores/StoreUserProfile;",
|
|
"Lcom/discord/stores/StoreUserRelationships;",
|
|
"Lcom/discord/stores/StoreVoiceStates;",
|
|
"Lcom/discord/stores/StoreGuilds;",
|
|
"Lcom/discord/stores/StoreMediaSettings;",
|
|
"Lcom/discord/stores/StoreUserPresence;",
|
|
"Lcom/discord/stores/StorePermissions;",
|
|
"Lcom/discord/stores/StoreUserNotes;",
|
|
"Lrx/Scheduler;",
|
|
")",
|
|
"Lrx/Observable<",
|
|
"Lcom/discord/widgets/user/usersheet/WidgetUserSheetViewModel$StoreState;",
|
|
">;"
|
|
}
|
|
.end annotation
|
|
|
|
move-object/from16 v11, p3
|
|
|
|
if-eqz v11, :cond_0
|
|
|
|
const-string v0, "channel.guildId"
|
|
|
|
invoke-static {v11, v0}, Le/e/b/a/a;->a(Lcom/discord/models/domain/ModelChannel;Ljava/lang/String;)J
|
|
|
|
move-result-wide v0
|
|
|
|
invoke-virtual/range {p3 .. p3}, Lcom/discord/models/domain/ModelChannel;->getId()J
|
|
|
|
move-result-wide v2
|
|
|
|
move-object/from16 v5, p7
|
|
|
|
invoke-virtual {v5, v0, v1, v2, v3}, Lcom/discord/stores/StoreVoiceStates;->get(JJ)Lrx/Observable;
|
|
|
|
move-result-object v0
|
|
|
|
move-object v12, v0
|
|
|
|
goto :goto_0
|
|
|
|
:cond_0
|
|
move-object/from16 v5, p7
|
|
|
|
invoke-static {}, Ls/q/l;->emptyMap()Ljava/util/Map;
|
|
|
|
move-result-object v0
|
|
|
|
new-instance v1, La0/m/e/j;
|
|
|
|
invoke-direct {v1, v0}, La0/m/e/j;-><init>(Ljava/lang/Object;)V
|
|
|
|
const-string v0, "Observable.just(emptyMap())"
|
|
|
|
invoke-static {v1, v0}, Ls/u/b/j;->checkExpressionValueIsNotNull(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
move-object v12, v1
|
|
|
|
:goto_0
|
|
move-object v0, p0
|
|
|
|
move-object v1, p1
|
|
|
|
move-object v2, p2
|
|
|
|
move-object/from16 v3, p3
|
|
|
|
move-object/from16 v4, p4
|
|
|
|
move-object/from16 v5, p7
|
|
|
|
move-object/from16 v6, p8
|
|
|
|
move-object/from16 v7, p9
|
|
|
|
move-object/from16 v8, p10
|
|
|
|
move-object/from16 v9, p11
|
|
|
|
move-object/from16 v10, p13
|
|
|
|
invoke-direct/range {v0 .. v10}, Lcom/discord/widgets/user/usersheet/WidgetUserSheetViewModelFactory;->observeStoreChunk(Lcom/discord/models/domain/ModelUser;Lcom/discord/models/domain/ModelUser;Lcom/discord/models/domain/ModelChannel;Lcom/discord/models/domain/ModelChannel;Lcom/discord/stores/StoreVoiceStates;Lcom/discord/stores/StoreGuilds;Lcom/discord/stores/StoreMediaSettings;Lcom/discord/stores/StoreUserPresence;Lcom/discord/stores/StorePermissions;Lrx/Scheduler;)Lrx/Observable;
|
|
|
|
move-result-object v0
|
|
|
|
invoke-virtual {p1}, Lcom/discord/models/domain/ModelUser;->getId()J
|
|
|
|
move-result-wide v1
|
|
|
|
move-object/from16 v3, p5
|
|
|
|
invoke-virtual {v3, v1, v2}, Lcom/discord/stores/StoreUserProfile;->get(J)Lrx/Observable;
|
|
|
|
move-result-object v1
|
|
|
|
invoke-virtual {p1}, Lcom/discord/models/domain/ModelUser;->getId()J
|
|
|
|
move-result-wide v2
|
|
|
|
move-object/from16 v4, p6
|
|
|
|
invoke-virtual {v4, v2, v3}, Lcom/discord/stores/StoreUserRelationships;->get(J)Lrx/Observable;
|
|
|
|
move-result-object v2
|
|
|
|
invoke-virtual {p1}, Lcom/discord/models/domain/ModelUser;->getId()J
|
|
|
|
move-result-wide v3
|
|
|
|
move-object/from16 v5, p12
|
|
|
|
invoke-virtual {v5, v3, v4}, Lcom/discord/stores/StoreUserNotes;->getForUserId(J)Lrx/Observable;
|
|
|
|
move-result-object v3
|
|
|
|
new-instance v4, Lcom/discord/widgets/user/usersheet/WidgetUserSheetViewModelFactory$observeStoreStateFromUsersAndChannels$1;
|
|
|
|
move-object v5, p1
|
|
|
|
move-object v6, p2
|
|
|
|
invoke-direct {v4, p1, p2, v11}, Lcom/discord/widgets/user/usersheet/WidgetUserSheetViewModelFactory$observeStoreStateFromUsersAndChannels$1;-><init>(Lcom/discord/models/domain/ModelUser;Lcom/discord/models/domain/ModelUser;Lcom/discord/models/domain/ModelChannel;)V
|
|
|
|
move-object p1, v0
|
|
|
|
move-object p2, v1
|
|
|
|
move-object/from16 p3, v2
|
|
|
|
move-object/from16 p4, v12
|
|
|
|
move-object/from16 p5, v3
|
|
|
|
move-object/from16 p6, v4
|
|
|
|
invoke-static/range {p1 .. p6}, Lrx/Observable;->a(Lrx/Observable;Lrx/Observable;Lrx/Observable;Lrx/Observable;Lrx/Observable;Lrx/functions/Func5;)Lrx/Observable;
|
|
|
|
move-result-object v0
|
|
|
|
const-string v1, "Observable\n .comb\u2026ote\n )\n }"
|
|
|
|
invoke-static {v0, v1}, Ls/u/b/j;->checkExpressionValueIsNotNull(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
return-object v0
|
|
.end method
|
|
|
|
|
|
# virtual methods
|
|
.method public create(Ljava/lang/Class;)Landroidx/lifecycle/ViewModel;
|
|
.locals 25
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"<T:",
|
|
"Landroidx/lifecycle/ViewModel;",
|
|
">(",
|
|
"Ljava/lang/Class<",
|
|
"TT;>;)TT;"
|
|
}
|
|
.end annotation
|
|
|
|
move-object/from16 v13, p0
|
|
|
|
if-eqz p1, :cond_0
|
|
|
|
new-instance v14, Lcom/discord/widgets/user/usersheet/WidgetUserSheetViewModel;
|
|
|
|
iget-wide v11, v13, Lcom/discord/widgets/user/usersheet/WidgetUserSheetViewModelFactory;->userId:J
|
|
|
|
iget-object v15, v13, Lcom/discord/widgets/user/usersheet/WidgetUserSheetViewModelFactory;->channelId:Ljava/lang/Long;
|
|
|
|
iget-boolean v10, v13, Lcom/discord/widgets/user/usersheet/WidgetUserSheetViewModelFactory;->isVoiceContext:Z
|
|
|
|
sget-object v0, Lcom/discord/stores/StoreStream;->Companion:Lcom/discord/stores/StoreStream$Companion;
|
|
|
|
invoke-virtual {v0}, Lcom/discord/stores/StoreStream$Companion;->getMediaSettings()Lcom/discord/stores/StoreMediaSettings;
|
|
|
|
move-result-object v16
|
|
|
|
sget-object v0, Lcom/discord/stores/StoreStream;->Companion:Lcom/discord/stores/StoreStream$Companion;
|
|
|
|
invoke-virtual {v0}, Lcom/discord/stores/StoreStream$Companion;->getChannels()Lcom/discord/stores/StoreChannels;
|
|
|
|
move-result-object v17
|
|
|
|
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 v18
|
|
|
|
sget-object v0, Lcom/discord/stores/StoreStream;->Companion:Lcom/discord/stores/StoreStream$Companion;
|
|
|
|
invoke-virtual {v0}, Lcom/discord/stores/StoreStream$Companion;->getUsers()Lcom/discord/stores/StoreUser;
|
|
|
|
move-result-object v1
|
|
|
|
sget-object v0, Lcom/discord/stores/StoreStream;->Companion:Lcom/discord/stores/StoreStream$Companion;
|
|
|
|
invoke-virtual {v0}, Lcom/discord/stores/StoreStream$Companion;->getChannels()Lcom/discord/stores/StoreChannels;
|
|
|
|
move-result-object v2
|
|
|
|
sget-object v0, Lcom/discord/stores/StoreStream;->Companion:Lcom/discord/stores/StoreStream$Companion;
|
|
|
|
invoke-virtual {v0}, Lcom/discord/stores/StoreStream$Companion;->getVoiceChannelSelected()Lcom/discord/stores/StoreVoiceChannelSelected;
|
|
|
|
move-result-object v3
|
|
|
|
sget-object v0, Lcom/discord/stores/StoreStream;->Companion:Lcom/discord/stores/StoreStream$Companion;
|
|
|
|
invoke-virtual {v0}, Lcom/discord/stores/StoreStream$Companion;->getUserProfile()Lcom/discord/stores/StoreUserProfile;
|
|
|
|
move-result-object v4
|
|
|
|
sget-object v0, Lcom/discord/stores/StoreStream;->Companion:Lcom/discord/stores/StoreStream$Companion;
|
|
|
|
invoke-virtual {v0}, Lcom/discord/stores/StoreStream$Companion;->getUserRelationships()Lcom/discord/stores/StoreUserRelationships;
|
|
|
|
move-result-object v5
|
|
|
|
sget-object v0, Lcom/discord/stores/StoreStream;->Companion:Lcom/discord/stores/StoreStream$Companion;
|
|
|
|
invoke-virtual {v0}, Lcom/discord/stores/StoreStream$Companion;->getVoiceStates()Lcom/discord/stores/StoreVoiceStates;
|
|
|
|
move-result-object v6
|
|
|
|
sget-object v0, Lcom/discord/stores/StoreStream;->Companion:Lcom/discord/stores/StoreStream$Companion;
|
|
|
|
invoke-virtual {v0}, Lcom/discord/stores/StoreStream$Companion;->getGuilds()Lcom/discord/stores/StoreGuilds;
|
|
|
|
move-result-object v7
|
|
|
|
sget-object v0, Lcom/discord/stores/StoreStream;->Companion:Lcom/discord/stores/StoreStream$Companion;
|
|
|
|
invoke-virtual {v0}, Lcom/discord/stores/StoreStream$Companion;->getMediaSettings()Lcom/discord/stores/StoreMediaSettings;
|
|
|
|
move-result-object v8
|
|
|
|
sget-object v0, Lcom/discord/stores/StoreStream;->Companion:Lcom/discord/stores/StoreStream$Companion;
|
|
|
|
invoke-virtual {v0}, Lcom/discord/stores/StoreStream$Companion;->getPresences()Lcom/discord/stores/StoreUserPresence;
|
|
|
|
move-result-object v9
|
|
|
|
sget-object v0, Lcom/discord/stores/StoreStream;->Companion:Lcom/discord/stores/StoreStream$Companion;
|
|
|
|
invoke-virtual {v0}, Lcom/discord/stores/StoreStream$Companion;->getPermissions()Lcom/discord/stores/StorePermissions;
|
|
|
|
move-result-object v19
|
|
|
|
sget-object v0, Lcom/discord/stores/StoreStream;->Companion:Lcom/discord/stores/StoreStream$Companion;
|
|
|
|
invoke-virtual {v0}, Lcom/discord/stores/StoreStream$Companion;->getUsersNotes()Lcom/discord/stores/StoreUserNotes;
|
|
|
|
move-result-object v20
|
|
|
|
invoke-static {}, La0/q/a;->b()Lrx/Scheduler;
|
|
|
|
move-result-object v0
|
|
|
|
move/from16 p1, v10
|
|
|
|
const-string v10, "Schedulers.computation()"
|
|
|
|
invoke-static {v0, v10}, Ls/u/b/j;->checkExpressionValueIsNotNull(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
move-object/from16 v21, v0
|
|
|
|
move-object/from16 v0, p0
|
|
|
|
move/from16 v22, p1
|
|
|
|
move-object/from16 v10, v19
|
|
|
|
move-wide/from16 v23, v11
|
|
|
|
move-object/from16 v11, v20
|
|
|
|
move-object/from16 v12, v21
|
|
|
|
invoke-direct/range {v0 .. v12}, Lcom/discord/widgets/user/usersheet/WidgetUserSheetViewModelFactory;->observeStoreState(Lcom/discord/stores/StoreUser;Lcom/discord/stores/StoreChannels;Lcom/discord/stores/StoreVoiceChannelSelected;Lcom/discord/stores/StoreUserProfile;Lcom/discord/stores/StoreUserRelationships;Lcom/discord/stores/StoreVoiceStates;Lcom/discord/stores/StoreGuilds;Lcom/discord/stores/StoreMediaSettings;Lcom/discord/stores/StoreUserPresence;Lcom/discord/stores/StorePermissions;Lcom/discord/stores/StoreUserNotes;Lrx/Scheduler;)Lrx/Observable;
|
|
|
|
move-result-object v8
|
|
|
|
move-object v0, v14
|
|
|
|
move-wide/from16 v1, v23
|
|
|
|
move-object v3, v15
|
|
|
|
move/from16 v4, v22
|
|
|
|
move-object/from16 v5, v16
|
|
|
|
move-object/from16 v6, v17
|
|
|
|
move-object/from16 v7, v18
|
|
|
|
invoke-direct/range {v0 .. v8}, Lcom/discord/widgets/user/usersheet/WidgetUserSheetViewModel;-><init>(JLjava/lang/Long;ZLcom/discord/stores/StoreMediaSettings;Lcom/discord/stores/StoreChannels;Lcom/discord/utilities/rest/RestAPI;Lrx/Observable;)V
|
|
|
|
return-object v14
|
|
|
|
:cond_0
|
|
const-string v0, "modelClass"
|
|
|
|
invoke-static {v0}, Ls/u/b/j;->a(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/usersheet/WidgetUserSheetViewModelFactory;->channelId:Ljava/lang/Long;
|
|
|
|
return-object v0
|
|
.end method
|
|
|
|
.method public final getUserId()J
|
|
.locals 2
|
|
|
|
iget-wide v0, p0, Lcom/discord/widgets/user/usersheet/WidgetUserSheetViewModelFactory;->userId:J
|
|
|
|
return-wide v0
|
|
.end method
|
|
|
|
.method public final isVoiceContext()Z
|
|
.locals 1
|
|
|
|
iget-boolean v0, p0, Lcom/discord/widgets/user/usersheet/WidgetUserSheetViewModelFactory;->isVoiceContext:Z
|
|
|
|
return v0
|
|
.end method
|