1607 lines
48 KiB
Smali
1607 lines
48 KiB
Smali
.class public final Lcom/discord/stores/StoreChannelMembers;
|
|
.super Lcom/discord/stores/Store;
|
|
.source "StoreChannelMembers.kt"
|
|
|
|
# interfaces
|
|
.implements Lcom/discord/stores/DispatchHandler;
|
|
|
|
|
|
# annotations
|
|
.annotation system Ldalvik/annotation/MemberClasses;
|
|
value = {
|
|
Lcom/discord/stores/StoreChannelMembers$MemberListIdCalculator;,
|
|
Lcom/discord/stores/StoreChannelMembers$MemberListUpdateLogger;,
|
|
Lcom/discord/stores/StoreChannelMembers$MemberListUpdateException;
|
|
}
|
|
.end annotation
|
|
|
|
|
|
# instance fields
|
|
.field public final channelsProvider:Lkotlin/jvm/functions/Function1;
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"Lkotlin/jvm/functions/Function1<",
|
|
"Ljava/lang/Long;",
|
|
"Lrx/Observable<",
|
|
"Lcom/discord/models/domain/ModelChannel;",
|
|
">;>;"
|
|
}
|
|
.end annotation
|
|
.end field
|
|
|
|
.field public final dispatcher:Lcom/discord/stores/Dispatcher;
|
|
|
|
.field public final flushTrigger:Lrx/subjects/PublishSubject;
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"Lrx/subjects/PublishSubject<",
|
|
"Lkotlin/Unit;",
|
|
">;"
|
|
}
|
|
.end annotation
|
|
.end field
|
|
|
|
.field public final guildMemberCountsProvider:Lkotlin/jvm/functions/Function1;
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"Lkotlin/jvm/functions/Function1<",
|
|
"Ljava/lang/Long;",
|
|
"Lrx/Observable<",
|
|
"Ljava/lang/Integer;",
|
|
">;>;"
|
|
}
|
|
.end annotation
|
|
.end field
|
|
|
|
.field public isDirty:Z
|
|
|
|
.field public final memberListPublisher:Lrx/subjects/BehaviorSubject;
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"Lrx/subjects/BehaviorSubject<",
|
|
"Ljava/util/Map<",
|
|
"Ljava/lang/Long;",
|
|
"Ljava/util/Map<",
|
|
"Ljava/lang/String;",
|
|
"Lcom/discord/utilities/lazy/memberlist/ChannelMemberList;",
|
|
">;>;>;"
|
|
}
|
|
.end annotation
|
|
.end field
|
|
|
|
.field public final memberLists:Ljava/util/HashMap;
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"Ljava/util/HashMap<",
|
|
"Ljava/lang/Long;",
|
|
"Ljava/util/Map<",
|
|
"Ljava/lang/String;",
|
|
"Lcom/discord/utilities/lazy/memberlist/ChannelMemberList;",
|
|
">;>;"
|
|
}
|
|
.end annotation
|
|
.end field
|
|
|
|
.field public final storeStream:Lcom/discord/stores/StoreStream;
|
|
|
|
|
|
# direct methods
|
|
.method public constructor <init>(Lcom/discord/stores/StoreStream;Lcom/discord/stores/Dispatcher;Lkotlin/jvm/functions/Function1;Lkotlin/jvm/functions/Function1;)V
|
|
.locals 8
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"(",
|
|
"Lcom/discord/stores/StoreStream;",
|
|
"Lcom/discord/stores/Dispatcher;",
|
|
"Lkotlin/jvm/functions/Function1<",
|
|
"-",
|
|
"Ljava/lang/Long;",
|
|
"+",
|
|
"Lrx/Observable<",
|
|
"Lcom/discord/models/domain/ModelChannel;",
|
|
">;>;",
|
|
"Lkotlin/jvm/functions/Function1<",
|
|
"-",
|
|
"Ljava/lang/Long;",
|
|
"+",
|
|
"Lrx/Observable<",
|
|
"Ljava/lang/Integer;",
|
|
">;>;)V"
|
|
}
|
|
.end annotation
|
|
|
|
const/4 v0, 0x0
|
|
|
|
if-eqz p1, :cond_3
|
|
|
|
if-eqz p2, :cond_2
|
|
|
|
if-eqz p3, :cond_1
|
|
|
|
if-eqz p4, :cond_0
|
|
|
|
invoke-direct {p0}, Lcom/discord/stores/Store;-><init>()V
|
|
|
|
iput-object p1, p0, Lcom/discord/stores/StoreChannelMembers;->storeStream:Lcom/discord/stores/StoreStream;
|
|
|
|
iput-object p2, p0, Lcom/discord/stores/StoreChannelMembers;->dispatcher:Lcom/discord/stores/Dispatcher;
|
|
|
|
iput-object p3, p0, Lcom/discord/stores/StoreChannelMembers;->channelsProvider:Lkotlin/jvm/functions/Function1;
|
|
|
|
iput-object p4, p0, Lcom/discord/stores/StoreChannelMembers;->guildMemberCountsProvider:Lkotlin/jvm/functions/Function1;
|
|
|
|
new-instance p1, Ljava/util/HashMap;
|
|
|
|
invoke-direct {p1}, Ljava/util/HashMap;-><init>()V
|
|
|
|
iput-object p1, p0, Lcom/discord/stores/StoreChannelMembers;->memberLists:Ljava/util/HashMap;
|
|
|
|
invoke-static {}, Lz/q/l;->emptyMap()Ljava/util/Map;
|
|
|
|
move-result-object p1
|
|
|
|
invoke-static {p1}, Lrx/subjects/BehaviorSubject;->a(Ljava/lang/Object;)Lrx/subjects/BehaviorSubject;
|
|
|
|
move-result-object p1
|
|
|
|
iput-object p1, p0, Lcom/discord/stores/StoreChannelMembers;->memberListPublisher:Lrx/subjects/BehaviorSubject;
|
|
|
|
invoke-static {}, Lrx/subjects/PublishSubject;->o()Lrx/subjects/PublishSubject;
|
|
|
|
move-result-object p1
|
|
|
|
iput-object p1, p0, Lcom/discord/stores/StoreChannelMembers;->flushTrigger:Lrx/subjects/PublishSubject;
|
|
|
|
iget-object p1, p0, Lcom/discord/stores/StoreChannelMembers;->flushTrigger:Lrx/subjects/PublishSubject;
|
|
|
|
const-string p2, "flushTrigger"
|
|
|
|
invoke-static {p1, p2}, Lz/u/b/j;->checkExpressionValueIsNotNull(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
const-wide/16 p2, 0x1
|
|
|
|
sget-object p4, Ljava/util/concurrent/TimeUnit;->SECONDS:Ljava/util/concurrent/TimeUnit;
|
|
|
|
invoke-static {p1, p2, p3, p4}, Lcom/discord/utilities/rx/ObservableExtensionsKt;->leadingEdgeThrottle(Lrx/Observable;JLjava/util/concurrent/TimeUnit;)Lrx/Observable;
|
|
|
|
move-result-object p1
|
|
|
|
sget-object v0, Lf/a/b/k;->a:Lf/a/b/k;
|
|
|
|
new-instance v1, Lcom/discord/stores/StoreChannelMembers$1;
|
|
|
|
invoke-direct {v1, p0}, Lcom/discord/stores/StoreChannelMembers$1;-><init>(Lcom/discord/stores/StoreChannelMembers;)V
|
|
|
|
const-class v2, Lcom/discord/stores/StoreChannelMembers;
|
|
|
|
const/4 v3, 0x0
|
|
|
|
const/4 v4, 0x0
|
|
|
|
const/4 v5, 0x0
|
|
|
|
const/4 v6, 0x0
|
|
|
|
const/16 v7, 0x3c
|
|
|
|
invoke-static/range {v0 .. v7}, Lf/a/b/k;->a(Lf/a/b/k;Lkotlin/jvm/functions/Function1;Ljava/lang/Class;Lrx/functions/Action1;Lkotlin/jvm/functions/Function1;Landroid/content/Context;Lkotlin/jvm/functions/Function0;I)Lrx/Observable$c;
|
|
|
|
move-result-object p2
|
|
|
|
invoke-virtual {p1, p2}, Lrx/Observable;->a(Lrx/Observable$c;)Lrx/Observable;
|
|
|
|
return-void
|
|
|
|
:cond_0
|
|
const-string p1, "guildMemberCountsProvider"
|
|
|
|
invoke-static {p1}, Lz/u/b/j;->a(Ljava/lang/String;)V
|
|
|
|
throw v0
|
|
|
|
:cond_1
|
|
const-string p1, "channelsProvider"
|
|
|
|
invoke-static {p1}, Lz/u/b/j;->a(Ljava/lang/String;)V
|
|
|
|
throw v0
|
|
|
|
:cond_2
|
|
const-string p1, "dispatcher"
|
|
|
|
invoke-static {p1}, Lz/u/b/j;->a(Ljava/lang/String;)V
|
|
|
|
throw v0
|
|
|
|
:cond_3
|
|
const-string p1, "storeStream"
|
|
|
|
invoke-static {p1}, Lz/u/b/j;->a(Ljava/lang/String;)V
|
|
|
|
throw v0
|
|
.end method
|
|
|
|
.method public static final synthetic access$doFlush(Lcom/discord/stores/StoreChannelMembers;)V
|
|
.locals 0
|
|
|
|
invoke-direct {p0}, Lcom/discord/stores/StoreChannelMembers;->doFlush()V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public static final synthetic access$getGuildMemberCountsProvider$p(Lcom/discord/stores/StoreChannelMembers;)Lkotlin/jvm/functions/Function1;
|
|
.locals 0
|
|
|
|
iget-object p0, p0, Lcom/discord/stores/StoreChannelMembers;->guildMemberCountsProvider:Lkotlin/jvm/functions/Function1;
|
|
|
|
return-object p0
|
|
.end method
|
|
|
|
.method public static final synthetic access$getMemberListObservable(Lcom/discord/stores/StoreChannelMembers;JLjava/lang/String;)Lrx/Observable;
|
|
.locals 0
|
|
|
|
invoke-direct {p0, p1, p2, p3}, Lcom/discord/stores/StoreChannelMembers;->getMemberListObservable(JLjava/lang/String;)Lrx/Observable;
|
|
|
|
move-result-object p0
|
|
|
|
return-object p0
|
|
.end method
|
|
|
|
.method public static final synthetic access$getMemberListPublisher$p(Lcom/discord/stores/StoreChannelMembers;)Lrx/subjects/BehaviorSubject;
|
|
.locals 0
|
|
|
|
iget-object p0, p0, Lcom/discord/stores/StoreChannelMembers;->memberListPublisher:Lrx/subjects/BehaviorSubject;
|
|
|
|
return-object p0
|
|
.end method
|
|
|
|
.method public static final synthetic access$getMemberLists$p(Lcom/discord/stores/StoreChannelMembers;)Ljava/util/HashMap;
|
|
.locals 0
|
|
|
|
iget-object p0, p0, Lcom/discord/stores/StoreChannelMembers;->memberLists:Ljava/util/HashMap;
|
|
|
|
return-object p0
|
|
.end method
|
|
|
|
.method public static final synthetic access$isDirty$p(Lcom/discord/stores/StoreChannelMembers;)Z
|
|
.locals 0
|
|
|
|
iget-boolean p0, p0, Lcom/discord/stores/StoreChannelMembers;->isDirty:Z
|
|
|
|
return p0
|
|
.end method
|
|
|
|
.method public static final synthetic access$makeGroup(Lcom/discord/stores/StoreChannelMembers;JLcom/discord/models/domain/ModelGuildMemberListUpdate$Group;)Lcom/discord/utilities/lazy/memberlist/ChannelMemberList$Row;
|
|
.locals 0
|
|
|
|
invoke-direct {p0, p1, p2, p3}, Lcom/discord/stores/StoreChannelMembers;->makeGroup(JLcom/discord/models/domain/ModelGuildMemberListUpdate$Group;)Lcom/discord/utilities/lazy/memberlist/ChannelMemberList$Row;
|
|
|
|
move-result-object p0
|
|
|
|
return-object p0
|
|
.end method
|
|
|
|
.method public static final synthetic access$makeMember(Lcom/discord/stores/StoreChannelMembers;JJZ)Lcom/discord/utilities/lazy/memberlist/ChannelMemberList$Row;
|
|
.locals 0
|
|
|
|
invoke-direct/range {p0 .. p5}, Lcom/discord/stores/StoreChannelMembers;->makeMember(JJZ)Lcom/discord/utilities/lazy/memberlist/ChannelMemberList$Row;
|
|
|
|
move-result-object p0
|
|
|
|
return-object p0
|
|
.end method
|
|
|
|
.method public static final synthetic access$setDirty$p(Lcom/discord/stores/StoreChannelMembers;Z)V
|
|
.locals 0
|
|
|
|
iput-boolean p1, p0, Lcom/discord/stores/StoreChannelMembers;->isDirty:Z
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method private final allowOwnerIndicator(J)Z
|
|
.locals 3
|
|
.annotation runtime Lcom/discord/stores/StoreThread;
|
|
.end annotation
|
|
|
|
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 v0
|
|
|
|
invoke-virtual {v0}, Lcom/discord/stores/StoreGuilds;->getGuildRolesInternal$app_productionDiscordExternalRelease()Ljava/util/Map;
|
|
|
|
move-result-object v0
|
|
|
|
invoke-static {p1, p2}, Ljava/lang/Long;->valueOf(J)Ljava/lang/Long;
|
|
|
|
move-result-object p1
|
|
|
|
invoke-interface {v0, p1}, Ljava/util/Map;->get(Ljava/lang/Object;)Ljava/lang/Object;
|
|
|
|
move-result-object p1
|
|
|
|
check-cast p1, Ljava/util/Map;
|
|
|
|
const/4 p2, 0x1
|
|
|
|
const/4 v0, 0x0
|
|
|
|
if-eqz p1, :cond_3
|
|
|
|
invoke-interface {p1}, Ljava/util/Map;->values()Ljava/util/Collection;
|
|
|
|
move-result-object p1
|
|
|
|
if-eqz p1, :cond_3
|
|
|
|
invoke-interface {p1}, Ljava/util/Collection;->isEmpty()Z
|
|
|
|
move-result v1
|
|
|
|
if-eqz v1, :cond_0
|
|
|
|
goto :goto_1
|
|
|
|
:cond_0
|
|
invoke-interface {p1}, Ljava/lang/Iterable;->iterator()Ljava/util/Iterator;
|
|
|
|
move-result-object p1
|
|
|
|
:cond_1
|
|
invoke-interface {p1}, Ljava/util/Iterator;->hasNext()Z
|
|
|
|
move-result v1
|
|
|
|
if-eqz v1, :cond_3
|
|
|
|
invoke-interface {p1}, Ljava/util/Iterator;->next()Ljava/lang/Object;
|
|
|
|
move-result-object v1
|
|
|
|
check-cast v1, Lcom/discord/models/domain/ModelGuildRole;
|
|
|
|
invoke-virtual {v1}, Lcom/discord/models/domain/ModelGuildRole;->isHoist()Z
|
|
|
|
move-result v2
|
|
|
|
if-eqz v2, :cond_2
|
|
|
|
const/16 v2, 0x8
|
|
|
|
invoke-virtual {v1}, Lcom/discord/models/domain/ModelGuildRole;->getPermissions()I
|
|
|
|
move-result v1
|
|
|
|
invoke-static {v1}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;
|
|
|
|
move-result-object v1
|
|
|
|
invoke-static {v2, v1}, Lcom/discord/utilities/permissions/PermissionUtils;->can(ILjava/lang/Integer;)Z
|
|
|
|
move-result v1
|
|
|
|
if-eqz v1, :cond_2
|
|
|
|
const/4 v1, 0x1
|
|
|
|
goto :goto_0
|
|
|
|
:cond_2
|
|
const/4 v1, 0x0
|
|
|
|
:goto_0
|
|
if-eqz v1, :cond_1
|
|
|
|
const/4 v0, 0x1
|
|
|
|
:cond_3
|
|
:goto_1
|
|
xor-int/lit8 p1, v0, 0x1
|
|
|
|
return p1
|
|
.end method
|
|
|
|
.method private final doFlush()V
|
|
.locals 2
|
|
|
|
iget-object v0, p0, Lcom/discord/stores/StoreChannelMembers;->dispatcher:Lcom/discord/stores/Dispatcher;
|
|
|
|
new-instance v1, Lcom/discord/stores/StoreChannelMembers$doFlush$1;
|
|
|
|
invoke-direct {v1, p0}, Lcom/discord/stores/StoreChannelMembers$doFlush$1;-><init>(Lcom/discord/stores/StoreChannelMembers;)V
|
|
|
|
invoke-virtual {v0, v1}, Lcom/discord/stores/Dispatcher;->schedule(Lkotlin/jvm/functions/Function0;)V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method private final getMemberList(JLjava/lang/String;)Lcom/discord/utilities/lazy/memberlist/ChannelMemberList;
|
|
.locals 1
|
|
.annotation runtime Lcom/discord/stores/StoreThread;
|
|
.end annotation
|
|
|
|
iget-object v0, p0, Lcom/discord/stores/StoreChannelMembers;->memberLists:Ljava/util/HashMap;
|
|
|
|
invoke-static {p1, p2}, Ljava/lang/Long;->valueOf(J)Ljava/lang/Long;
|
|
|
|
move-result-object p1
|
|
|
|
invoke-virtual {v0, p1}, Ljava/util/HashMap;->get(Ljava/lang/Object;)Ljava/lang/Object;
|
|
|
|
move-result-object p1
|
|
|
|
check-cast p1, Ljava/util/Map;
|
|
|
|
if-eqz p1, :cond_0
|
|
|
|
invoke-interface {p1, p3}, Ljava/util/Map;->get(Ljava/lang/Object;)Ljava/lang/Object;
|
|
|
|
move-result-object p1
|
|
|
|
check-cast p1, Lcom/discord/utilities/lazy/memberlist/ChannelMemberList;
|
|
|
|
goto :goto_0
|
|
|
|
:cond_0
|
|
const/4 p1, 0x0
|
|
|
|
:goto_0
|
|
return-object p1
|
|
.end method
|
|
|
|
.method private final getMemberListObservable(JLjava/lang/String;)Lrx/Observable;
|
|
.locals 2
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"(J",
|
|
"Ljava/lang/String;",
|
|
")",
|
|
"Lrx/Observable<",
|
|
"Lcom/discord/utilities/lazy/memberlist/ChannelMemberList;",
|
|
">;"
|
|
}
|
|
.end annotation
|
|
|
|
iget-object v0, p0, Lcom/discord/stores/StoreChannelMembers;->memberListPublisher:Lrx/subjects/BehaviorSubject;
|
|
|
|
new-instance v1, Lcom/discord/stores/StoreChannelMembers$getMemberListObservable$1;
|
|
|
|
invoke-direct {v1, p1, p2, p3}, Lcom/discord/stores/StoreChannelMembers$getMemberListObservable$1;-><init>(JLjava/lang/String;)V
|
|
|
|
invoke-virtual {v0, v1}, Lrx/Observable;->f(Lh0/l/i;)Lrx/Observable;
|
|
|
|
move-result-object v0
|
|
|
|
new-instance v1, Lcom/discord/stores/StoreChannelMembers$getMemberListObservable$2;
|
|
|
|
invoke-direct {v1, p0, p1, p2, p3}, Lcom/discord/stores/StoreChannelMembers$getMemberListObservable$2;-><init>(Lcom/discord/stores/StoreChannelMembers;JLjava/lang/String;)V
|
|
|
|
invoke-virtual {v0, v1}, Lrx/Observable;->k(Lh0/l/i;)Lrx/Observable;
|
|
|
|
move-result-object p1
|
|
|
|
const-string p2, "memberListPublisher\n \u2026 }\n }"
|
|
|
|
invoke-static {p1, p2}, Lz/u/b/j;->checkExpressionValueIsNotNull(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
return-object p1
|
|
.end method
|
|
|
|
.method private final handleDelete(Ljava/lang/String;Lcom/discord/models/domain/ModelGuildMemberListUpdate$Operation$Delete;J)V
|
|
.locals 0
|
|
.annotation runtime Lcom/discord/stores/StoreThread;
|
|
.end annotation
|
|
|
|
invoke-direct {p0, p3, p4, p1}, Lcom/discord/stores/StoreChannelMembers;->getMemberList(JLjava/lang/String;)Lcom/discord/utilities/lazy/memberlist/ChannelMemberList;
|
|
|
|
move-result-object p1
|
|
|
|
if-eqz p1, :cond_0
|
|
|
|
invoke-virtual {p2}, Lcom/discord/models/domain/ModelGuildMemberListUpdate$Operation$Delete;->getIndex()I
|
|
|
|
move-result p2
|
|
|
|
invoke-virtual {p1, p2}, Lcom/discord/utilities/lazy/memberlist/ChannelMemberList;->delete(I)V
|
|
|
|
:cond_0
|
|
return-void
|
|
.end method
|
|
|
|
.method private final handleInsert(Ljava/lang/String;Lcom/discord/models/domain/ModelGuildMemberListUpdate$Operation$Insert;J)V
|
|
.locals 1
|
|
.annotation runtime Lcom/discord/stores/StoreThread;
|
|
.end annotation
|
|
|
|
invoke-virtual {p2}, Lcom/discord/models/domain/ModelGuildMemberListUpdate$Operation$Insert;->getIndex()I
|
|
|
|
move-result v0
|
|
|
|
invoke-direct {p0, p3, p4, p1}, Lcom/discord/stores/StoreChannelMembers;->getMemberList(JLjava/lang/String;)Lcom/discord/utilities/lazy/memberlist/ChannelMemberList;
|
|
|
|
move-result-object p1
|
|
|
|
if-eqz p1, :cond_0
|
|
|
|
invoke-virtual {p2}, Lcom/discord/models/domain/ModelGuildMemberListUpdate$Operation$Insert;->getItem()Lcom/discord/models/domain/ModelGuildMemberListUpdate$Operation$Item;
|
|
|
|
move-result-object p2
|
|
|
|
invoke-direct {p0, p3, p4, p2}, Lcom/discord/stores/StoreChannelMembers;->makeRow(JLcom/discord/models/domain/ModelGuildMemberListUpdate$Operation$Item;)Lcom/discord/utilities/lazy/memberlist/ChannelMemberList$Row;
|
|
|
|
move-result-object p2
|
|
|
|
invoke-virtual {p1, v0, p2}, Lcom/discord/utilities/lazy/memberlist/ChannelMemberList;->insert(ILcom/discord/utilities/lazy/memberlist/ChannelMemberList$Row;)V
|
|
|
|
:cond_0
|
|
return-void
|
|
.end method
|
|
|
|
.method private final handleInvalidate(Ljava/lang/String;Lcom/discord/models/domain/ModelGuildMemberListUpdate$Operation$Invalidate;J)V
|
|
.locals 0
|
|
.annotation runtime Lcom/discord/stores/StoreThread;
|
|
.end annotation
|
|
|
|
invoke-virtual {p2}, Lcom/discord/models/domain/ModelGuildMemberListUpdate$Operation$Invalidate;->getRange()Lkotlin/ranges/IntRange;
|
|
|
|
move-result-object p2
|
|
|
|
invoke-direct {p0, p3, p4, p1}, Lcom/discord/stores/StoreChannelMembers;->getMemberList(JLjava/lang/String;)Lcom/discord/utilities/lazy/memberlist/ChannelMemberList;
|
|
|
|
move-result-object p1
|
|
|
|
if-eqz p1, :cond_0
|
|
|
|
invoke-virtual {p1, p2}, Lcom/discord/utilities/lazy/memberlist/ChannelMemberList;->invalidate(Lkotlin/ranges/IntRange;)V
|
|
|
|
:cond_0
|
|
return-void
|
|
.end method
|
|
|
|
.method private final handleSync(Ljava/lang/String;Lcom/discord/models/domain/ModelGuildMemberListUpdate$Operation$Sync;J)V
|
|
.locals 18
|
|
.annotation runtime Lcom/discord/stores/StoreThread;
|
|
.end annotation
|
|
|
|
move-object/from16 v6, p0
|
|
|
|
move-object/from16 v7, p1
|
|
|
|
move-wide/from16 v8, p3
|
|
|
|
iget-object v0, v6, Lcom/discord/stores/StoreChannelMembers;->memberLists:Ljava/util/HashMap;
|
|
|
|
invoke-static/range {p3 .. p4}, Ljava/lang/Long;->valueOf(J)Ljava/lang/Long;
|
|
|
|
move-result-object v1
|
|
|
|
invoke-virtual {v0, v1}, Ljava/util/HashMap;->get(Ljava/lang/Object;)Ljava/lang/Object;
|
|
|
|
move-result-object v0
|
|
|
|
check-cast v0, Ljava/util/Map;
|
|
|
|
if-eqz v0, :cond_0
|
|
|
|
goto :goto_0
|
|
|
|
:cond_0
|
|
new-instance v0, Ljava/util/HashMap;
|
|
|
|
invoke-direct {v0}, Ljava/util/HashMap;-><init>()V
|
|
|
|
iget-object v1, v6, Lcom/discord/stores/StoreChannelMembers;->memberLists:Ljava/util/HashMap;
|
|
|
|
invoke-static/range {p3 .. p4}, Ljava/lang/Long;->valueOf(J)Ljava/lang/Long;
|
|
|
|
move-result-object v2
|
|
|
|
invoke-interface {v1, v2, v0}, Ljava/util/Map;->put(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
|
|
|
|
:goto_0
|
|
move-object v10, v0
|
|
|
|
invoke-interface {v10, v7}, Ljava/util/Map;->get(Ljava/lang/Object;)Ljava/lang/Object;
|
|
|
|
move-result-object v0
|
|
|
|
check-cast v0, Lcom/discord/utilities/lazy/memberlist/ChannelMemberList;
|
|
|
|
if-eqz v0, :cond_1
|
|
|
|
move-object v11, v0
|
|
|
|
goto :goto_1
|
|
|
|
:cond_1
|
|
new-instance v11, Lcom/discord/utilities/lazy/memberlist/ChannelMemberList;
|
|
|
|
const/4 v2, 0x0
|
|
|
|
sget-object v3, Lcom/discord/app/AppLog;->c:Lcom/discord/app/AppLog;
|
|
|
|
const/4 v4, 0x2
|
|
|
|
const/4 v5, 0x0
|
|
|
|
move-object v0, v11
|
|
|
|
move-object/from16 v1, p1
|
|
|
|
invoke-direct/range {v0 .. v5}, Lcom/discord/utilities/lazy/memberlist/ChannelMemberList;-><init>(Ljava/lang/String;ILcom/discord/utilities/logging/Logger;ILkotlin/jvm/internal/DefaultConstructorMarker;)V
|
|
|
|
invoke-interface {v10, v7, v11}, Ljava/util/Map;->put(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
|
|
|
|
sget-object v12, Lcom/discord/app/AppLog;->c:Lcom/discord/app/AppLog;
|
|
|
|
new-instance v0, Ljava/lang/StringBuilder;
|
|
|
|
invoke-direct {v0}, Ljava/lang/StringBuilder;-><init>()V
|
|
|
|
invoke-virtual {v11}, Lcom/discord/utilities/lazy/memberlist/ChannelMemberList;->getListId()Ljava/lang/String;
|
|
|
|
move-result-object v1
|
|
|
|
invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
const-string v1, " INSTANTIATE"
|
|
|
|
invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
invoke-virtual {v0}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
|
|
|
|
move-result-object v13
|
|
|
|
const/4 v15, 0x0
|
|
|
|
const/16 v16, 0x4
|
|
|
|
const/16 v17, 0x0
|
|
|
|
const-string v14, "ChannelMemberList"
|
|
|
|
invoke-static/range {v12 .. v17}, Lcom/discord/utilities/logging/Logger;->recordBreadcrumb$default(Lcom/discord/utilities/logging/Logger;Ljava/lang/String;Ljava/lang/String;Ljava/util/Map;ILjava/lang/Object;)V
|
|
|
|
:goto_1
|
|
invoke-direct {v6, v8, v9}, Lcom/discord/stores/StoreChannelMembers;->allowOwnerIndicator(J)Z
|
|
|
|
move-result v7
|
|
|
|
invoke-virtual/range {p2 .. p2}, Lcom/discord/models/domain/ModelGuildMemberListUpdate$Operation$Sync;->getItems()Ljava/util/List;
|
|
|
|
move-result-object v0
|
|
|
|
new-instance v10, Ljava/util/ArrayList;
|
|
|
|
const/16 v1, 0xa
|
|
|
|
invoke-static {v0, v1}, Lf/n/a/j/a;->collectionSizeOrDefault(Ljava/lang/Iterable;I)I
|
|
|
|
move-result v1
|
|
|
|
invoke-direct {v10, v1}, Ljava/util/ArrayList;-><init>(I)V
|
|
|
|
invoke-interface {v0}, Ljava/lang/Iterable;->iterator()Ljava/util/Iterator;
|
|
|
|
move-result-object v12
|
|
|
|
:goto_2
|
|
invoke-interface {v12}, Ljava/util/Iterator;->hasNext()Z
|
|
|
|
move-result v0
|
|
|
|
if-eqz v0, :cond_5
|
|
|
|
invoke-interface {v12}, Ljava/util/Iterator;->next()Ljava/lang/Object;
|
|
|
|
move-result-object v0
|
|
|
|
check-cast v0, Lcom/discord/models/domain/ModelGuildMemberListUpdate$Operation$Item;
|
|
|
|
instance-of v1, v0, Lcom/discord/models/domain/ModelGuildMemberListUpdate$Operation$Item$MemberItem;
|
|
|
|
if-eqz v1, :cond_3
|
|
|
|
check-cast v0, Lcom/discord/models/domain/ModelGuildMemberListUpdate$Operation$Item$MemberItem;
|
|
|
|
invoke-virtual {v0}, Lcom/discord/models/domain/ModelGuildMemberListUpdate$Operation$Item$MemberItem;->getMember()Lcom/discord/models/domain/ModelGuildMember;
|
|
|
|
move-result-object v0
|
|
|
|
invoke-virtual {v0}, Lcom/discord/models/domain/ModelGuildMember;->getUser()Lcom/discord/models/domain/ModelUser;
|
|
|
|
move-result-object v0
|
|
|
|
if-eqz v0, :cond_2
|
|
|
|
const-string v1, "item.member.user!!"
|
|
|
|
invoke-static {v0, v1}, Lz/u/b/j;->checkExpressionValueIsNotNull(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
invoke-virtual {v0}, Lcom/discord/models/domain/ModelUser;->getId()J
|
|
|
|
move-result-wide v3
|
|
|
|
move-object/from16 v0, p0
|
|
|
|
move-wide/from16 v1, p3
|
|
|
|
move v5, v7
|
|
|
|
invoke-direct/range {v0 .. v5}, Lcom/discord/stores/StoreChannelMembers;->makeMember(JJZ)Lcom/discord/utilities/lazy/memberlist/ChannelMemberList$Row;
|
|
|
|
move-result-object v0
|
|
|
|
goto :goto_3
|
|
|
|
:cond_2
|
|
invoke-static {}, Lz/u/b/j;->throwNpe()V
|
|
|
|
const/4 v0, 0x0
|
|
|
|
throw v0
|
|
|
|
:cond_3
|
|
instance-of v1, v0, Lcom/discord/models/domain/ModelGuildMemberListUpdate$Operation$Item$GroupItem;
|
|
|
|
if-eqz v1, :cond_4
|
|
|
|
check-cast v0, Lcom/discord/models/domain/ModelGuildMemberListUpdate$Operation$Item$GroupItem;
|
|
|
|
invoke-virtual {v0}, Lcom/discord/models/domain/ModelGuildMemberListUpdate$Operation$Item$GroupItem;->getGroup()Lcom/discord/models/domain/ModelGuildMemberListUpdate$Group;
|
|
|
|
move-result-object v0
|
|
|
|
invoke-direct {v6, v8, v9, v0}, Lcom/discord/stores/StoreChannelMembers;->makeGroup(JLcom/discord/models/domain/ModelGuildMemberListUpdate$Group;)Lcom/discord/utilities/lazy/memberlist/ChannelMemberList$Row;
|
|
|
|
move-result-object v0
|
|
|
|
:goto_3
|
|
invoke-interface {v10, v0}, Ljava/util/Collection;->add(Ljava/lang/Object;)Z
|
|
|
|
goto :goto_2
|
|
|
|
:cond_4
|
|
new-instance v0, Lz/g;
|
|
|
|
invoke-direct {v0}, Lz/g;-><init>()V
|
|
|
|
throw v0
|
|
|
|
:cond_5
|
|
invoke-virtual/range {p2 .. p2}, Lcom/discord/models/domain/ModelGuildMemberListUpdate$Operation$Sync;->getRange()Lkotlin/ranges/IntRange;
|
|
|
|
move-result-object v0
|
|
|
|
invoke-static {v0}, Lz/q/l;->first(Ljava/lang/Iterable;)Ljava/lang/Object;
|
|
|
|
move-result-object v0
|
|
|
|
check-cast v0, Ljava/lang/Number;
|
|
|
|
invoke-virtual {v0}, Ljava/lang/Number;->intValue()I
|
|
|
|
move-result v0
|
|
|
|
invoke-virtual {v11, v0, v10}, Lcom/discord/utilities/lazy/memberlist/ChannelMemberList;->sync(ILjava/util/List;)V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method private final handleUpdate(Ljava/lang/String;Lcom/discord/models/domain/ModelGuildMemberListUpdate$Operation$Update;J)V
|
|
.locals 1
|
|
|
|
invoke-virtual {p2}, Lcom/discord/models/domain/ModelGuildMemberListUpdate$Operation$Update;->getIndex()I
|
|
|
|
move-result v0
|
|
|
|
invoke-direct {p0, p3, p4, p1}, Lcom/discord/stores/StoreChannelMembers;->getMemberList(JLjava/lang/String;)Lcom/discord/utilities/lazy/memberlist/ChannelMemberList;
|
|
|
|
move-result-object p1
|
|
|
|
if-eqz p1, :cond_0
|
|
|
|
invoke-virtual {p2}, Lcom/discord/models/domain/ModelGuildMemberListUpdate$Operation$Update;->getItem()Lcom/discord/models/domain/ModelGuildMemberListUpdate$Operation$Item;
|
|
|
|
move-result-object p2
|
|
|
|
invoke-direct {p0, p3, p4, p2}, Lcom/discord/stores/StoreChannelMembers;->makeRow(JLcom/discord/models/domain/ModelGuildMemberListUpdate$Operation$Item;)Lcom/discord/utilities/lazy/memberlist/ChannelMemberList$Row;
|
|
|
|
move-result-object p2
|
|
|
|
invoke-virtual {p1, v0, p2}, Lcom/discord/utilities/lazy/memberlist/ChannelMemberList;->update(ILcom/discord/utilities/lazy/memberlist/ChannelMemberList$Row;)V
|
|
|
|
:cond_0
|
|
return-void
|
|
.end method
|
|
|
|
.method private final makeGroup(JLcom/discord/models/domain/ModelGuildMemberListUpdate$Group;)Lcom/discord/utilities/lazy/memberlist/ChannelMemberList$Row;
|
|
.locals 3
|
|
.annotation runtime Lcom/discord/stores/StoreThread;
|
|
.end annotation
|
|
|
|
invoke-virtual {p3}, Lcom/discord/models/domain/ModelGuildMemberListUpdate$Group;->getId()Ljava/lang/String;
|
|
|
|
move-result-object v0
|
|
|
|
invoke-virtual {p3}, Lcom/discord/models/domain/ModelGuildMemberListUpdate$Group;->getType()Lcom/discord/models/domain/ModelGuildMemberListUpdate$Group$Type;
|
|
|
|
move-result-object v1
|
|
|
|
sget-object v2, Lcom/discord/stores/StoreChannelMembers$WhenMappings;->$EnumSwitchMapping$0:[I
|
|
|
|
invoke-virtual {v1}, Ljava/lang/Enum;->ordinal()I
|
|
|
|
move-result v1
|
|
|
|
aget v1, v2, v1
|
|
|
|
const/4 v2, 0x1
|
|
|
|
if-eq v1, v2, :cond_2
|
|
|
|
const/4 p1, 0x2
|
|
|
|
if-eq v1, p1, :cond_1
|
|
|
|
const/4 p1, 0x3
|
|
|
|
if-ne v1, p1, :cond_0
|
|
|
|
new-instance p1, Lcom/discord/utilities/lazy/memberlist/ChannelMemberList$Row$StatusHeader;
|
|
|
|
sget-object p2, Lcom/discord/utilities/lazy/memberlist/ChannelMemberList$Row$StatusHeader$Type;->ONLINE:Lcom/discord/utilities/lazy/memberlist/ChannelMemberList$Row$StatusHeader$Type;
|
|
|
|
invoke-virtual {p3}, Lcom/discord/models/domain/ModelGuildMemberListUpdate$Group;->getCount()I
|
|
|
|
move-result p3
|
|
|
|
invoke-direct {p1, v0, p2, p3}, Lcom/discord/utilities/lazy/memberlist/ChannelMemberList$Row$StatusHeader;-><init>(Ljava/lang/String;Lcom/discord/utilities/lazy/memberlist/ChannelMemberList$Row$StatusHeader$Type;I)V
|
|
|
|
return-object p1
|
|
|
|
:cond_0
|
|
new-instance p1, Lz/g;
|
|
|
|
invoke-direct {p1}, Lz/g;-><init>()V
|
|
|
|
throw p1
|
|
|
|
:cond_1
|
|
new-instance p1, Lcom/discord/utilities/lazy/memberlist/ChannelMemberList$Row$StatusHeader;
|
|
|
|
sget-object p2, Lcom/discord/utilities/lazy/memberlist/ChannelMemberList$Row$StatusHeader$Type;->OFFLINE:Lcom/discord/utilities/lazy/memberlist/ChannelMemberList$Row$StatusHeader$Type;
|
|
|
|
invoke-virtual {p3}, Lcom/discord/models/domain/ModelGuildMemberListUpdate$Group;->getCount()I
|
|
|
|
move-result p3
|
|
|
|
invoke-direct {p1, v0, p2, p3}, Lcom/discord/utilities/lazy/memberlist/ChannelMemberList$Row$StatusHeader;-><init>(Ljava/lang/String;Lcom/discord/utilities/lazy/memberlist/ChannelMemberList$Row$StatusHeader$Type;I)V
|
|
|
|
return-object p1
|
|
|
|
:cond_2
|
|
invoke-static {v0}, Ljava/lang/Long;->parseLong(Ljava/lang/String;)J
|
|
|
|
move-result-wide v0
|
|
|
|
sget-object v2, Lcom/discord/stores/StoreStream;->Companion:Lcom/discord/stores/StoreStream$Companion;
|
|
|
|
invoke-virtual {v2}, Lcom/discord/stores/StoreStream$Companion;->getGuilds()Lcom/discord/stores/StoreGuilds;
|
|
|
|
move-result-object v2
|
|
|
|
invoke-virtual {v2}, Lcom/discord/stores/StoreGuilds;->getGuildRolesInternal$app_productionDiscordExternalRelease()Ljava/util/Map;
|
|
|
|
move-result-object v2
|
|
|
|
invoke-static {p1, p2}, Ljava/lang/Long;->valueOf(J)Ljava/lang/Long;
|
|
|
|
move-result-object p1
|
|
|
|
invoke-interface {v2, p1}, Ljava/util/Map;->get(Ljava/lang/Object;)Ljava/lang/Object;
|
|
|
|
move-result-object p1
|
|
|
|
check-cast p1, Ljava/util/Map;
|
|
|
|
if-eqz p1, :cond_3
|
|
|
|
invoke-static {v0, v1}, Ljava/lang/Long;->valueOf(J)Ljava/lang/Long;
|
|
|
|
move-result-object p2
|
|
|
|
invoke-interface {p1, p2}, Ljava/util/Map;->get(Ljava/lang/Object;)Ljava/lang/Object;
|
|
|
|
move-result-object p1
|
|
|
|
check-cast p1, Lcom/discord/models/domain/ModelGuildRole;
|
|
|
|
if-eqz p1, :cond_3
|
|
|
|
invoke-virtual {p1}, Lcom/discord/models/domain/ModelGuildRole;->getName()Ljava/lang/String;
|
|
|
|
move-result-object p1
|
|
|
|
if-eqz p1, :cond_3
|
|
|
|
goto :goto_0
|
|
|
|
:cond_3
|
|
const-string p1, ""
|
|
|
|
:goto_0
|
|
new-instance p2, Lcom/discord/utilities/lazy/memberlist/ChannelMemberList$Row$RoleHeader;
|
|
|
|
invoke-virtual {p3}, Lcom/discord/models/domain/ModelGuildMemberListUpdate$Group;->getCount()I
|
|
|
|
move-result p3
|
|
|
|
invoke-direct {p2, v0, v1, p1, p3}, Lcom/discord/utilities/lazy/memberlist/ChannelMemberList$Row$RoleHeader;-><init>(JLjava/lang/String;I)V
|
|
|
|
return-object p2
|
|
.end method
|
|
|
|
.method private final makeMember(JJZ)Lcom/discord/utilities/lazy/memberlist/ChannelMemberList$Row;
|
|
.locals 24
|
|
.annotation runtime Lcom/discord/stores/StoreThread;
|
|
.end annotation
|
|
|
|
move-wide/from16 v1, p3
|
|
|
|
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 v0
|
|
|
|
invoke-virtual {v0}, Lcom/discord/stores/StoreGuilds;->getGuildsInternal$app_productionDiscordExternalRelease()Ljava/util/Map;
|
|
|
|
move-result-object v0
|
|
|
|
invoke-static/range {p1 .. p2}, Ljava/lang/Long;->valueOf(J)Ljava/lang/Long;
|
|
|
|
move-result-object v3
|
|
|
|
invoke-interface {v0, v3}, Ljava/util/Map;->get(Ljava/lang/Object;)Ljava/lang/Object;
|
|
|
|
move-result-object v0
|
|
|
|
check-cast v0, Lcom/discord/models/domain/ModelGuild;
|
|
|
|
sget-object v3, Lcom/discord/stores/StoreStream;->Companion:Lcom/discord/stores/StoreStream$Companion;
|
|
|
|
invoke-virtual {v3}, Lcom/discord/stores/StoreStream$Companion;->getGuilds()Lcom/discord/stores/StoreGuilds;
|
|
|
|
move-result-object v3
|
|
|
|
invoke-virtual {v3}, Lcom/discord/stores/StoreGuilds;->getGuildMembersComputedInternal$app_productionDiscordExternalRelease()Ljava/util/Map;
|
|
|
|
move-result-object v3
|
|
|
|
invoke-static/range {p1 .. p2}, Ljava/lang/Long;->valueOf(J)Ljava/lang/Long;
|
|
|
|
move-result-object v4
|
|
|
|
invoke-interface {v3, v4}, Ljava/util/Map;->get(Ljava/lang/Object;)Ljava/lang/Object;
|
|
|
|
move-result-object v3
|
|
|
|
check-cast v3, Ljava/util/Map;
|
|
|
|
const/4 v4, 0x0
|
|
|
|
if-eqz v3, :cond_0
|
|
|
|
invoke-static/range {p3 .. p4}, Ljava/lang/Long;->valueOf(J)Ljava/lang/Long;
|
|
|
|
move-result-object v5
|
|
|
|
invoke-interface {v3, v5}, Ljava/util/Map;->get(Ljava/lang/Object;)Ljava/lang/Object;
|
|
|
|
move-result-object v3
|
|
|
|
check-cast v3, Lcom/discord/models/domain/ModelGuildMember$Computed;
|
|
|
|
move-object/from16 v13, p0
|
|
|
|
goto :goto_0
|
|
|
|
:cond_0
|
|
move-object/from16 v13, p0
|
|
|
|
move-object v3, v4
|
|
|
|
:goto_0
|
|
iget-object v5, v13, Lcom/discord/stores/StoreChannelMembers;->storeStream:Lcom/discord/stores/StoreStream;
|
|
|
|
invoke-virtual {v5}, Lcom/discord/stores/StoreStream;->getUsers$app_productionDiscordExternalRelease()Lcom/discord/stores/StoreUser;
|
|
|
|
move-result-object v5
|
|
|
|
invoke-virtual {v5}, Lcom/discord/stores/StoreUser;->getUsersInternal$app_productionDiscordExternalRelease()Ljava/util/Map;
|
|
|
|
move-result-object v5
|
|
|
|
invoke-static/range {p3 .. p4}, Ljava/lang/Long;->valueOf(J)Ljava/lang/Long;
|
|
|
|
move-result-object v6
|
|
|
|
invoke-interface {v5, v6}, Ljava/util/Map;->get(Ljava/lang/Object;)Ljava/lang/Object;
|
|
|
|
move-result-object v5
|
|
|
|
check-cast v5, Lcom/discord/models/domain/ModelUser;
|
|
|
|
if-eqz v5, :cond_5
|
|
|
|
if-nez v3, :cond_1
|
|
|
|
goto/16 :goto_3
|
|
|
|
:cond_1
|
|
invoke-virtual {v3}, Lcom/discord/models/domain/ModelGuildMember$Computed;->getColor()I
|
|
|
|
move-result v6
|
|
|
|
const/high16 v7, -0x1000000
|
|
|
|
if-eq v6, v7, :cond_2
|
|
|
|
invoke-virtual {v3}, Lcom/discord/models/domain/ModelGuildMember$Computed;->getColor()I
|
|
|
|
move-result v6
|
|
|
|
invoke-static {v6}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;
|
|
|
|
move-result-object v6
|
|
|
|
move-object v8, v6
|
|
|
|
goto :goto_1
|
|
|
|
:cond_2
|
|
move-object v8, v4
|
|
|
|
:goto_1
|
|
invoke-virtual {v5}, Lcom/discord/models/domain/ModelUser;->isSystem()Z
|
|
|
|
move-result v6
|
|
|
|
if-eqz v6, :cond_3
|
|
|
|
const v6, 0x7f1213b3
|
|
|
|
goto :goto_2
|
|
|
|
:cond_3
|
|
const v6, 0x7f120340
|
|
|
|
:goto_2
|
|
new-instance v14, Lcom/discord/utilities/lazy/memberlist/ChannelMemberList$Row$Member;
|
|
|
|
invoke-virtual {v5, v3}, Lcom/discord/models/domain/ModelUser;->getNickOrUsername(Lcom/discord/models/domain/ModelGuildMember$Computed;)Ljava/lang/String;
|
|
|
|
move-result-object v7
|
|
|
|
const-string v9, "user.getNickOrUsername(member)"
|
|
|
|
invoke-static {v7, v9}, Lz/u/b/j;->checkExpressionValueIsNotNull(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
invoke-virtual {v5}, Lcom/discord/models/domain/ModelUser;->isBot()Z
|
|
|
|
move-result v9
|
|
|
|
invoke-static {v6}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;
|
|
|
|
move-result-object v6
|
|
|
|
invoke-virtual {v5}, Lcom/discord/models/domain/ModelUser;->isVerifiedBot()Z
|
|
|
|
move-result v10
|
|
|
|
sget-object v11, Lcom/discord/stores/StoreStream;->Companion:Lcom/discord/stores/StoreStream$Companion;
|
|
|
|
invoke-virtual {v11}, Lcom/discord/stores/StoreStream$Companion;->getPresences()Lcom/discord/stores/StoreUserPresence;
|
|
|
|
move-result-object v11
|
|
|
|
invoke-virtual {v11}, Lcom/discord/stores/StoreUserPresence;->getPresences()Lcom/discord/utilities/collections/SnowflakePartitionMap$CopiablePartitionMap;
|
|
|
|
move-result-object v11
|
|
|
|
invoke-static/range {p3 .. p4}, Ljava/lang/Long;->valueOf(J)Ljava/lang/Long;
|
|
|
|
move-result-object v12
|
|
|
|
invoke-virtual {v11, v12}, Lcom/discord/utilities/collections/SnowflakePartitionMap$CopiablePartitionMap;->get(Ljava/lang/Object;)Ljava/lang/Object;
|
|
|
|
move-result-object v11
|
|
|
|
check-cast v11, Lcom/discord/models/domain/ModelPresence;
|
|
|
|
const/4 v12, 0x2
|
|
|
|
const/4 v15, 0x0
|
|
|
|
invoke-static {v5, v15, v12, v4}, Lcom/discord/utilities/icon/IconUtils;->getForUser$default(Lcom/discord/models/domain/ModelUser;ZILjava/lang/Object;)Ljava/lang/String;
|
|
|
|
move-result-object v12
|
|
|
|
if-eqz p5, :cond_4
|
|
|
|
if-eqz v0, :cond_4
|
|
|
|
invoke-virtual {v0}, Lcom/discord/models/domain/ModelGuild;->getOwnerId()J
|
|
|
|
move-result-wide v4
|
|
|
|
cmp-long v0, v4, v1
|
|
|
|
if-nez v0, :cond_4
|
|
|
|
const/4 v0, 0x1
|
|
|
|
const/4 v15, 0x1
|
|
|
|
:cond_4
|
|
invoke-virtual {v3}, Lcom/discord/models/domain/ModelGuildMember$Computed;->getPremiumSince()Ljava/lang/String;
|
|
|
|
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;->getApplicationStreaming()Lcom/discord/stores/StoreApplicationStreaming;
|
|
|
|
move-result-object v0
|
|
|
|
invoke-virtual {v0, v1, v2}, Lcom/discord/stores/StoreApplicationStreaming;->isUserStreaming(J)Z
|
|
|
|
move-result v17
|
|
|
|
move-object v0, v14
|
|
|
|
move-wide/from16 v1, p3
|
|
|
|
move-object v3, v7
|
|
|
|
move v4, v9
|
|
|
|
move-object v5, v6
|
|
|
|
move v6, v10
|
|
|
|
move-object v7, v11
|
|
|
|
move-object v9, v12
|
|
|
|
move v10, v15
|
|
|
|
move-object/from16 v11, v16
|
|
|
|
move/from16 v12, v17
|
|
|
|
invoke-direct/range {v0 .. v12}, Lcom/discord/utilities/lazy/memberlist/ChannelMemberList$Row$Member;-><init>(JLjava/lang/String;ZLjava/lang/Integer;ZLcom/discord/models/domain/ModelPresence;Ljava/lang/Integer;Ljava/lang/String;ZLjava/lang/String;Z)V
|
|
|
|
return-object v14
|
|
|
|
:cond_5
|
|
:goto_3
|
|
sget-object v18, Lcom/discord/app/AppLog;->c:Lcom/discord/app/AppLog;
|
|
|
|
const-string v0, "Unable to make member. GuildID: "
|
|
|
|
const-string v3, " -- UserID: "
|
|
|
|
move-wide/from16 v5, p1
|
|
|
|
invoke-static {v0, v5, v6, v3}, Lf/e/b/a/a;->a(Ljava/lang/String;JLjava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
move-result-object v0
|
|
|
|
invoke-virtual {v0, v1, v2}, Ljava/lang/StringBuilder;->append(J)Ljava/lang/StringBuilder;
|
|
|
|
invoke-virtual {v0}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
|
|
|
|
move-result-object v19
|
|
|
|
const/16 v20, 0x0
|
|
|
|
const/16 v21, 0x0
|
|
|
|
const/16 v22, 0x6
|
|
|
|
const/16 v23, 0x0
|
|
|
|
invoke-static/range {v18 .. v23}, Lcom/discord/utilities/logging/Logger;->e$default(Lcom/discord/utilities/logging/Logger;Ljava/lang/String;Ljava/lang/Throwable;Ljava/util/Map;ILjava/lang/Object;)V
|
|
|
|
return-object v4
|
|
.end method
|
|
|
|
.method private final makeRow(JLcom/discord/models/domain/ModelGuildMemberListUpdate$Operation$Item;)Lcom/discord/utilities/lazy/memberlist/ChannelMemberList$Row;
|
|
.locals 7
|
|
.annotation runtime Lcom/discord/stores/StoreThread;
|
|
.end annotation
|
|
|
|
instance-of v0, p3, Lcom/discord/models/domain/ModelGuildMemberListUpdate$Operation$Item$MemberItem;
|
|
|
|
if-eqz v0, :cond_1
|
|
|
|
check-cast p3, Lcom/discord/models/domain/ModelGuildMemberListUpdate$Operation$Item$MemberItem;
|
|
|
|
invoke-virtual {p3}, Lcom/discord/models/domain/ModelGuildMemberListUpdate$Operation$Item$MemberItem;->getMember()Lcom/discord/models/domain/ModelGuildMember;
|
|
|
|
move-result-object p3
|
|
|
|
invoke-virtual {p3}, Lcom/discord/models/domain/ModelGuildMember;->getUser()Lcom/discord/models/domain/ModelUser;
|
|
|
|
move-result-object p3
|
|
|
|
if-eqz p3, :cond_0
|
|
|
|
const-string v0, "item.member.user!!"
|
|
|
|
invoke-static {p3, v0}, Lz/u/b/j;->checkExpressionValueIsNotNull(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
invoke-virtual {p3}, Lcom/discord/models/domain/ModelUser;->getId()J
|
|
|
|
move-result-wide v4
|
|
|
|
invoke-direct {p0, p1, p2}, Lcom/discord/stores/StoreChannelMembers;->allowOwnerIndicator(J)Z
|
|
|
|
move-result v6
|
|
|
|
move-object v1, p0
|
|
|
|
move-wide v2, p1
|
|
|
|
invoke-direct/range {v1 .. v6}, Lcom/discord/stores/StoreChannelMembers;->makeMember(JJZ)Lcom/discord/utilities/lazy/memberlist/ChannelMemberList$Row;
|
|
|
|
move-result-object p1
|
|
|
|
goto :goto_0
|
|
|
|
:cond_0
|
|
invoke-static {}, Lz/u/b/j;->throwNpe()V
|
|
|
|
const/4 p1, 0x0
|
|
|
|
throw p1
|
|
|
|
:cond_1
|
|
instance-of v0, p3, Lcom/discord/models/domain/ModelGuildMemberListUpdate$Operation$Item$GroupItem;
|
|
|
|
if-eqz v0, :cond_2
|
|
|
|
check-cast p3, Lcom/discord/models/domain/ModelGuildMemberListUpdate$Operation$Item$GroupItem;
|
|
|
|
invoke-virtual {p3}, Lcom/discord/models/domain/ModelGuildMemberListUpdate$Operation$Item$GroupItem;->getGroup()Lcom/discord/models/domain/ModelGuildMemberListUpdate$Group;
|
|
|
|
move-result-object p3
|
|
|
|
invoke-direct {p0, p1, p2, p3}, Lcom/discord/stores/StoreChannelMembers;->makeGroup(JLcom/discord/models/domain/ModelGuildMemberListUpdate$Group;)Lcom/discord/utilities/lazy/memberlist/ChannelMemberList$Row;
|
|
|
|
move-result-object p1
|
|
|
|
:goto_0
|
|
return-object p1
|
|
|
|
:cond_2
|
|
new-instance p1, Lz/g;
|
|
|
|
invoke-direct {p1}, Lz/g;-><init>()V
|
|
|
|
throw p1
|
|
.end method
|
|
|
|
|
|
# virtual methods
|
|
.method public final get(JJ)Lrx/Observable;
|
|
.locals 2
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"(JJ)",
|
|
"Lrx/Observable<",
|
|
"Lcom/discord/utilities/lazy/memberlist/ChannelMemberList;",
|
|
">;"
|
|
}
|
|
.end annotation
|
|
|
|
sget-object v0, Lcom/discord/stores/StoreChannelMembers$MemberListIdCalculator;->INSTANCE:Lcom/discord/stores/StoreChannelMembers$MemberListIdCalculator;
|
|
|
|
iget-object v1, p0, Lcom/discord/stores/StoreChannelMembers;->channelsProvider:Lkotlin/jvm/functions/Function1;
|
|
|
|
invoke-virtual {v0, v1, p3, p4}, Lcom/discord/stores/StoreChannelMembers$MemberListIdCalculator;->computeMemberListId(Lkotlin/jvm/functions/Function1;J)Lrx/Observable;
|
|
|
|
move-result-object p3
|
|
|
|
invoke-virtual {p3}, Lrx/Observable;->a()Lrx/Observable;
|
|
|
|
move-result-object p3
|
|
|
|
new-instance p4, Lcom/discord/stores/StoreChannelMembers$get$1;
|
|
|
|
invoke-direct {p4, p0, p1, p2}, Lcom/discord/stores/StoreChannelMembers$get$1;-><init>(Lcom/discord/stores/StoreChannelMembers;J)V
|
|
|
|
invoke-virtual {p3, p4}, Lrx/Observable;->k(Lh0/l/i;)Lrx/Observable;
|
|
|
|
move-result-object p1
|
|
|
|
const-string p2, "MemberListIdCalculator.c\u2026ldId, listId)\n }"
|
|
|
|
invoke-static {p1, p2}, Lz/u/b/j;->checkExpressionValueIsNotNull(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
return-object p1
|
|
.end method
|
|
|
|
.method public final handleGuildMemberListUpdate(Lcom/discord/models/domain/ModelGuildMemberListUpdate;)V
|
|
.locals 6
|
|
.annotation runtime Lcom/discord/stores/StoreThread;
|
|
.end annotation
|
|
|
|
if-eqz p1, :cond_7
|
|
|
|
invoke-virtual {p1}, Lcom/discord/models/domain/ModelGuildMemberListUpdate;->getGuildId()J
|
|
|
|
move-result-wide v0
|
|
|
|
invoke-virtual {p1}, Lcom/discord/models/domain/ModelGuildMemberListUpdate;->getId()Ljava/lang/String;
|
|
|
|
move-result-object v2
|
|
|
|
sget-object v3, Lcom/discord/stores/StoreChannelMembers$MemberListUpdateLogger;->INSTANCE:Lcom/discord/stores/StoreChannelMembers$MemberListUpdateLogger;
|
|
|
|
invoke-virtual {v3, p1}, Lcom/discord/stores/StoreChannelMembers$MemberListUpdateLogger;->logUpdate(Lcom/discord/models/domain/ModelGuildMemberListUpdate;)V
|
|
|
|
:try_start_0
|
|
invoke-virtual {p1}, Lcom/discord/models/domain/ModelGuildMemberListUpdate;->getOperations()Ljava/util/List;
|
|
|
|
move-result-object v3
|
|
|
|
invoke-interface {v3}, Ljava/lang/Iterable;->iterator()Ljava/util/Iterator;
|
|
|
|
move-result-object v3
|
|
|
|
:cond_0
|
|
:goto_0
|
|
invoke-interface {v3}, Ljava/util/Iterator;->hasNext()Z
|
|
|
|
move-result v4
|
|
|
|
if-eqz v4, :cond_5
|
|
|
|
invoke-interface {v3}, Ljava/util/Iterator;->next()Ljava/lang/Object;
|
|
|
|
move-result-object v4
|
|
|
|
check-cast v4, Lcom/discord/models/domain/ModelGuildMemberListUpdate$Operation;
|
|
|
|
instance-of v5, v4, Lcom/discord/models/domain/ModelGuildMemberListUpdate$Operation$Sync;
|
|
|
|
if-eqz v5, :cond_1
|
|
|
|
check-cast v4, Lcom/discord/models/domain/ModelGuildMemberListUpdate$Operation$Sync;
|
|
|
|
invoke-direct {p0, v2, v4, v0, v1}, Lcom/discord/stores/StoreChannelMembers;->handleSync(Ljava/lang/String;Lcom/discord/models/domain/ModelGuildMemberListUpdate$Operation$Sync;J)V
|
|
|
|
goto :goto_0
|
|
|
|
:cond_1
|
|
instance-of v5, v4, Lcom/discord/models/domain/ModelGuildMemberListUpdate$Operation$Update;
|
|
|
|
if-eqz v5, :cond_2
|
|
|
|
check-cast v4, Lcom/discord/models/domain/ModelGuildMemberListUpdate$Operation$Update;
|
|
|
|
invoke-direct {p0, v2, v4, v0, v1}, Lcom/discord/stores/StoreChannelMembers;->handleUpdate(Ljava/lang/String;Lcom/discord/models/domain/ModelGuildMemberListUpdate$Operation$Update;J)V
|
|
|
|
goto :goto_0
|
|
|
|
:cond_2
|
|
instance-of v5, v4, Lcom/discord/models/domain/ModelGuildMemberListUpdate$Operation$Insert;
|
|
|
|
if-eqz v5, :cond_3
|
|
|
|
check-cast v4, Lcom/discord/models/domain/ModelGuildMemberListUpdate$Operation$Insert;
|
|
|
|
invoke-direct {p0, v2, v4, v0, v1}, Lcom/discord/stores/StoreChannelMembers;->handleInsert(Ljava/lang/String;Lcom/discord/models/domain/ModelGuildMemberListUpdate$Operation$Insert;J)V
|
|
|
|
goto :goto_0
|
|
|
|
:cond_3
|
|
instance-of v5, v4, Lcom/discord/models/domain/ModelGuildMemberListUpdate$Operation$Delete;
|
|
|
|
if-eqz v5, :cond_4
|
|
|
|
check-cast v4, Lcom/discord/models/domain/ModelGuildMemberListUpdate$Operation$Delete;
|
|
|
|
invoke-direct {p0, v2, v4, v0, v1}, Lcom/discord/stores/StoreChannelMembers;->handleDelete(Ljava/lang/String;Lcom/discord/models/domain/ModelGuildMemberListUpdate$Operation$Delete;J)V
|
|
|
|
goto :goto_0
|
|
|
|
:cond_4
|
|
instance-of v5, v4, Lcom/discord/models/domain/ModelGuildMemberListUpdate$Operation$Invalidate;
|
|
|
|
if-eqz v5, :cond_0
|
|
|
|
check-cast v4, Lcom/discord/models/domain/ModelGuildMemberListUpdate$Operation$Invalidate;
|
|
|
|
invoke-direct {p0, v2, v4, v0, v1}, Lcom/discord/stores/StoreChannelMembers;->handleInvalidate(Ljava/lang/String;Lcom/discord/models/domain/ModelGuildMemberListUpdate$Operation$Invalidate;J)V
|
|
|
|
goto :goto_0
|
|
|
|
:cond_5
|
|
invoke-virtual {p1}, Lcom/discord/models/domain/ModelGuildMemberListUpdate;->getGuildId()J
|
|
|
|
move-result-wide v3
|
|
|
|
invoke-direct {p0, v3, v4, v2}, Lcom/discord/stores/StoreChannelMembers;->getMemberList(JLjava/lang/String;)Lcom/discord/utilities/lazy/memberlist/ChannelMemberList;
|
|
|
|
move-result-object v3
|
|
|
|
if-eqz v3, :cond_6
|
|
|
|
invoke-virtual {p1}, Lcom/discord/models/domain/ModelGuildMemberListUpdate;->getGroups()Ljava/util/List;
|
|
|
|
move-result-object p1
|
|
|
|
new-instance v4, Lcom/discord/stores/StoreChannelMembers$handleGuildMemberListUpdate$2;
|
|
|
|
invoke-direct {v4, p0, v0, v1}, Lcom/discord/stores/StoreChannelMembers$handleGuildMemberListUpdate$2;-><init>(Lcom/discord/stores/StoreChannelMembers;J)V
|
|
|
|
invoke-virtual {v3, p1, v4}, Lcom/discord/utilities/lazy/memberlist/ChannelMemberList;->setGroups(Ljava/util/List;Lkotlin/jvm/functions/Function1;)V
|
|
:try_end_0
|
|
.catch Ljava/lang/Exception; {:try_start_0 .. :try_end_0} :catch_0
|
|
|
|
goto :goto_1
|
|
|
|
:catch_0
|
|
move-exception p1
|
|
|
|
sget-object v3, Lcom/discord/stores/StoreChannelMembers$MemberListUpdateLogger;->INSTANCE:Lcom/discord/stores/StoreChannelMembers$MemberListUpdateLogger;
|
|
|
|
invoke-virtual {v3, v0, v1, v2, p1}, Lcom/discord/stores/StoreChannelMembers$MemberListUpdateLogger;->dumpLogs(JLjava/lang/String;Ljava/lang/Exception;)V
|
|
|
|
:cond_6
|
|
:goto_1
|
|
const/4 p1, 0x1
|
|
|
|
iput-boolean p1, p0, Lcom/discord/stores/StoreChannelMembers;->isDirty:Z
|
|
|
|
return-void
|
|
|
|
:cond_7
|
|
const-string p1, "update"
|
|
|
|
invoke-static {p1}, Lz/u/b/j;->a(Ljava/lang/String;)V
|
|
|
|
const/4 p1, 0x0
|
|
|
|
throw p1
|
|
.end method
|
|
|
|
.method public final handleGuildRemove(J)V
|
|
.locals 1
|
|
.annotation runtime Lcom/discord/stores/StoreThread;
|
|
.end annotation
|
|
|
|
iget-object v0, p0, Lcom/discord/stores/StoreChannelMembers;->memberLists:Ljava/util/HashMap;
|
|
|
|
invoke-static {p1, p2}, Ljava/lang/Long;->valueOf(J)Ljava/lang/Long;
|
|
|
|
move-result-object p1
|
|
|
|
invoke-virtual {v0, p1}, Ljava/util/HashMap;->remove(Ljava/lang/Object;)Ljava/lang/Object;
|
|
|
|
move-result-object p1
|
|
|
|
if-eqz p1, :cond_0
|
|
|
|
const/4 p1, 0x1
|
|
|
|
iput-boolean p1, p0, Lcom/discord/stores/StoreChannelMembers;->isDirty:Z
|
|
|
|
:cond_0
|
|
return-void
|
|
.end method
|
|
|
|
.method public final handleGuildRoleUpdate(Lcom/discord/models/domain/ModelGuildRole$Payload;)V
|
|
.locals 5
|
|
.annotation runtime Lcom/discord/stores/StoreThread;
|
|
.end annotation
|
|
|
|
if-eqz p1, :cond_1
|
|
|
|
invoke-virtual {p1}, Lcom/discord/models/domain/ModelGuildRole$Payload;->getGuildId()J
|
|
|
|
move-result-wide v0
|
|
|
|
invoke-direct {p0, v0, v1}, Lcom/discord/stores/StoreChannelMembers;->allowOwnerIndicator(J)Z
|
|
|
|
move-result p1
|
|
|
|
iget-object v2, p0, Lcom/discord/stores/StoreChannelMembers;->memberLists:Ljava/util/HashMap;
|
|
|
|
invoke-static {v0, v1}, Ljava/lang/Long;->valueOf(J)Ljava/lang/Long;
|
|
|
|
move-result-object v3
|
|
|
|
invoke-virtual {v2, v3}, Ljava/util/HashMap;->get(Ljava/lang/Object;)Ljava/lang/Object;
|
|
|
|
move-result-object v2
|
|
|
|
check-cast v2, Ljava/util/Map;
|
|
|
|
if-eqz v2, :cond_0
|
|
|
|
invoke-interface {v2}, Ljava/util/Map;->entrySet()Ljava/util/Set;
|
|
|
|
move-result-object v2
|
|
|
|
invoke-interface {v2}, Ljava/util/Set;->iterator()Ljava/util/Iterator;
|
|
|
|
move-result-object v2
|
|
|
|
:goto_0
|
|
invoke-interface {v2}, Ljava/util/Iterator;->hasNext()Z
|
|
|
|
move-result v3
|
|
|
|
if-eqz v3, :cond_0
|
|
|
|
invoke-interface {v2}, Ljava/util/Iterator;->next()Ljava/lang/Object;
|
|
|
|
move-result-object v3
|
|
|
|
check-cast v3, Ljava/util/Map$Entry;
|
|
|
|
invoke-interface {v3}, Ljava/util/Map$Entry;->getValue()Ljava/lang/Object;
|
|
|
|
move-result-object v3
|
|
|
|
check-cast v3, Lcom/discord/utilities/lazy/memberlist/ChannelMemberList;
|
|
|
|
new-instance v4, Lcom/discord/stores/StoreChannelMembers$handleGuildRoleUpdate$$inlined$forEach$lambda$1;
|
|
|
|
invoke-direct {v4, p0, v0, v1, p1}, Lcom/discord/stores/StoreChannelMembers$handleGuildRoleUpdate$$inlined$forEach$lambda$1;-><init>(Lcom/discord/stores/StoreChannelMembers;JZ)V
|
|
|
|
invoke-virtual {v3, v4}, Lcom/discord/utilities/lazy/memberlist/ChannelMemberList;->rebuildMembers(Lkotlin/jvm/functions/Function1;)V
|
|
|
|
goto :goto_0
|
|
|
|
:cond_0
|
|
const/4 p1, 0x1
|
|
|
|
iput-boolean p1, p0, Lcom/discord/stores/StoreChannelMembers;->isDirty:Z
|
|
|
|
return-void
|
|
|
|
:cond_1
|
|
const-string p1, "roleUpdate"
|
|
|
|
invoke-static {p1}, Lz/u/b/j;->a(Ljava/lang/String;)V
|
|
|
|
const/4 p1, 0x0
|
|
|
|
throw p1
|
|
.end method
|
|
|
|
.method public onDispatchEnded()V
|
|
.locals 2
|
|
|
|
iget-boolean v0, p0, Lcom/discord/stores/StoreChannelMembers;->isDirty:Z
|
|
|
|
if-eqz v0, :cond_0
|
|
|
|
iget-object v0, p0, Lcom/discord/stores/StoreChannelMembers;->flushTrigger:Lrx/subjects/PublishSubject;
|
|
|
|
sget-object v1, Lkotlin/Unit;->a:Lkotlin/Unit;
|
|
|
|
invoke-virtual {v0, v1}, Lrx/subjects/PublishSubject;->onNext(Ljava/lang/Object;)V
|
|
|
|
:cond_0
|
|
return-void
|
|
.end method
|