apkfuckery/com.discord/smali/com/discord/stores/StoreChat.smali

489 lines
14 KiB
Smali

.class public final Lcom/discord/stores/StoreChat;
.super Ljava/lang/Object;
.source "StoreChat.kt"
# annotations
.annotation system Ldalvik/annotation/MemberClasses;
value = {
Lcom/discord/stores/StoreChat$EditingMessage;,
Lcom/discord/stores/StoreChat$InteractionState;
}
.end annotation
# instance fields
.field private final editingMessageSubject:Lrx/subjects/SerializedSubject;
.annotation system Ldalvik/annotation/Signature;
value = {
"Lrx/subjects/SerializedSubject<",
"Lcom/discord/stores/StoreChat$EditingMessage;",
"Lcom/discord/stores/StoreChat$EditingMessage;",
">;"
}
.end annotation
.end field
.field private final expandedBlockedMessageGroups:Lrx/subjects/SerializedSubject;
.annotation system Ldalvik/annotation/Signature;
value = {
"Lrx/subjects/SerializedSubject<",
"Ljava/util/List<",
"Ljava/lang/Long;",
">;",
"Ljava/util/List<",
"Ljava/lang/Long;",
">;>;"
}
.end annotation
.end field
.field private final externalMessageTextSubject:Lrx/subjects/BehaviorSubject;
.annotation system Ldalvik/annotation/Signature;
value = {
"Lrx/subjects/BehaviorSubject<",
"Ljava/lang/String;",
">;"
}
.end annotation
.end field
.field private final interactionStateSubject:Lrx/subjects/SerializedSubject;
.annotation system Ldalvik/annotation/Signature;
value = {
"Lrx/subjects/SerializedSubject<",
"Lcom/discord/stores/StoreChat$InteractionState;",
"Lcom/discord/stores/StoreChat$InteractionState;",
">;"
}
.end annotation
.end field
.field private final textChannelInput:Ljava/util/HashMap;
.annotation system Ldalvik/annotation/Signature;
value = {
"Ljava/util/HashMap<",
"Ljava/lang/Long;",
"Ljava/lang/CharSequence;",
">;"
}
.end annotation
.end field
# direct methods
.method public constructor <init>()V
.locals 2
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
new-instance v0, Lrx/subjects/SerializedSubject;
invoke-static {}, Lrx/subjects/BehaviorSubject;->Fg()Lrx/subjects/BehaviorSubject;
move-result-object v1
check-cast v1, Lrx/subjects/Subject;
invoke-direct {v0, v1}, Lrx/subjects/SerializedSubject;-><init>(Lrx/subjects/Subject;)V
iput-object v0, p0, Lcom/discord/stores/StoreChat;->interactionStateSubject:Lrx/subjects/SerializedSubject;
new-instance v0, Lrx/subjects/SerializedSubject;
const/4 v1, 0x0
invoke-static {v1}, Lrx/subjects/BehaviorSubject;->bI(Ljava/lang/Object;)Lrx/subjects/BehaviorSubject;
move-result-object v1
check-cast v1, Lrx/subjects/Subject;
invoke-direct {v0, v1}, Lrx/subjects/SerializedSubject;-><init>(Lrx/subjects/Subject;)V
iput-object v0, p0, Lcom/discord/stores/StoreChat;->editingMessageSubject:Lrx/subjects/SerializedSubject;
const-string v0, ""
invoke-static {v0}, Lrx/subjects/BehaviorSubject;->bI(Ljava/lang/Object;)Lrx/subjects/BehaviorSubject;
move-result-object v0
iput-object v0, p0, Lcom/discord/stores/StoreChat;->externalMessageTextSubject:Lrx/subjects/BehaviorSubject;
new-instance v0, Lrx/subjects/SerializedSubject;
sget-object v1, Lkotlin/a/x;->bck:Lkotlin/a/x;
check-cast v1, Ljava/util/List;
invoke-static {v1}, Lrx/subjects/BehaviorSubject;->bI(Ljava/lang/Object;)Lrx/subjects/BehaviorSubject;
move-result-object v1
check-cast v1, Lrx/subjects/Subject;
invoke-direct {v0, v1}, Lrx/subjects/SerializedSubject;-><init>(Lrx/subjects/Subject;)V
iput-object v0, p0, Lcom/discord/stores/StoreChat;->expandedBlockedMessageGroups:Lrx/subjects/SerializedSubject;
new-instance v0, Ljava/util/HashMap;
invoke-direct {v0}, Ljava/util/HashMap;-><init>()V
iput-object v0, p0, Lcom/discord/stores/StoreChat;->textChannelInput:Ljava/util/HashMap;
return-void
.end method
# virtual methods
.method public final appendMention(Lcom/discord/models/domain/ModelUser;J)V
.locals 3
if-eqz p1, :cond_3
invoke-virtual {p1}, Lcom/discord/models/domain/ModelUser;->getUsername()Ljava/lang/String;
move-result-object v0
check-cast v0, Ljava/lang/CharSequence;
if-eqz v0, :cond_1
invoke-interface {v0}, Ljava/lang/CharSequence;->length()I
move-result v0
if-nez v0, :cond_0
goto :goto_0
:cond_0
const/4 v0, 0x0
goto :goto_1
:cond_1
:goto_0
const/4 v0, 0x1
:goto_1
if-eqz v0, :cond_2
goto :goto_2
:cond_2
invoke-static {}, Lcom/discord/stores/StoreStream;->getGatewaySocket()Lcom/discord/stores/StoreGatewayConnection;
move-result-object v0
invoke-virtual {p1}, Lcom/discord/models/domain/ModelUser;->getUsername()Ljava/lang/String;
move-result-object v1
const-string v2, "user.username"
invoke-static {v1, v2}, Lkotlin/jvm/internal/j;->g(Ljava/lang/Object;Ljava/lang/String;)V
invoke-virtual {v0, p2, p3, v1}, Lcom/discord/stores/StoreGatewayConnection;->requestGuildMembers(JLjava/lang/String;)Z
invoke-virtual {p1}, Lcom/discord/models/domain/ModelUser;->getMention()Ljava/lang/String;
move-result-object p1
const-string p2, "user.mention"
invoke-static {p1, p2}, Lkotlin/jvm/internal/j;->g(Ljava/lang/Object;Ljava/lang/String;)V
invoke-virtual {p0, p1}, Lcom/discord/stores/StoreChat;->setExternalMessageText(Ljava/lang/String;)V
return-void
:cond_3
:goto_2
return-void
.end method
.method public final getEditingMessage()Lrx/Observable;
.locals 2
.annotation system Ldalvik/annotation/Signature;
value = {
"()",
"Lrx/Observable<",
"Lcom/discord/stores/StoreChat$EditingMessage;",
">;"
}
.end annotation
iget-object v0, p0, Lcom/discord/stores/StoreChat;->editingMessageSubject:Lrx/subjects/SerializedSubject;
invoke-static {}, Lcom/discord/app/g;->dw()Lrx/Observable$Transformer;
move-result-object v1
invoke-virtual {v0, v1}, Lrx/subjects/SerializedSubject;->a(Lrx/Observable$Transformer;)Lrx/Observable;
move-result-object v0
const-string v1, "editingMessageSubject.co\u2026onDistinctUntilChanged())"
invoke-static {v0, v1}, Lkotlin/jvm/internal/j;->g(Ljava/lang/Object;Ljava/lang/String;)V
return-object v0
.end method
.method public final getExpandedBlockedMessageIds()Lrx/Observable;
.locals 1
.annotation system Ldalvik/annotation/Signature;
value = {
"()",
"Lrx/Observable<",
"Ljava/util/List<",
"Ljava/lang/Long;",
">;>;"
}
.end annotation
iget-object v0, p0, Lcom/discord/stores/StoreChat;->expandedBlockedMessageGroups:Lrx/subjects/SerializedSubject;
check-cast v0, Lrx/Observable;
invoke-static {v0}, Lcom/discord/utilities/rx/ObservableExtensionsKt;->computationBuffered(Lrx/Observable;)Lrx/Observable;
move-result-object v0
return-object v0
.end method
.method public final getExternalMessageText()Lrx/Observable;
.locals 2
.annotation system Ldalvik/annotation/Signature;
value = {
"()",
"Lrx/Observable<",
"Ljava/lang/String;",
">;"
}
.end annotation
iget-object v0, p0, Lcom/discord/stores/StoreChat;->externalMessageTextSubject:Lrx/subjects/BehaviorSubject;
const-string v1, "externalMessageTextSubject"
invoke-static {v0, v1}, Lkotlin/jvm/internal/j;->g(Ljava/lang/Object;Ljava/lang/String;)V
check-cast v0, Lrx/Observable;
return-object v0
.end method
.method public final getInteractionState()Lrx/Observable;
.locals 2
.annotation system Ldalvik/annotation/Signature;
value = {
"()",
"Lrx/Observable<",
"Lcom/discord/stores/StoreChat$InteractionState;",
">;"
}
.end annotation
iget-object v0, p0, Lcom/discord/stores/StoreChat;->interactionStateSubject:Lrx/subjects/SerializedSubject;
invoke-static {}, Lcom/discord/app/g;->dw()Lrx/Observable$Transformer;
move-result-object v1
invoke-virtual {v0, v1}, Lrx/subjects/SerializedSubject;->a(Lrx/Observable$Transformer;)Lrx/Observable;
move-result-object v0
const-string v1, "interactionStateSubject.\u2026onDistinctUntilChanged())"
invoke-static {v0, v1}, Lkotlin/jvm/internal/j;->g(Ljava/lang/Object;Ljava/lang/String;)V
return-object v0
.end method
.method public final getTextChannelInput(J)Ljava/lang/CharSequence;
.locals 1
.annotation build Landroidx/annotation/UiThread;
.end annotation
iget-object v0, p0, Lcom/discord/stores/StoreChat;->textChannelInput: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/lang/CharSequence;
return-object p1
.end method
.method public final setEditingMessage(Lcom/discord/stores/StoreChat$EditingMessage;)V
.locals 1
iget-object v0, p0, Lcom/discord/stores/StoreChat;->editingMessageSubject:Lrx/subjects/SerializedSubject;
invoke-virtual {v0, p1}, Lrx/subjects/SerializedSubject;->onNext(Ljava/lang/Object;)V
return-void
.end method
.method public final setExternalMessageText(Ljava/lang/String;)V
.locals 1
const-string v0, "text"
invoke-static {p1, v0}, Lkotlin/jvm/internal/j;->h(Ljava/lang/Object;Ljava/lang/String;)V
iget-object v0, p0, Lcom/discord/stores/StoreChat;->externalMessageTextSubject:Lrx/subjects/BehaviorSubject;
invoke-virtual {v0, p1}, Lrx/subjects/BehaviorSubject;->onNext(Ljava/lang/Object;)V
iget-object p1, p0, Lcom/discord/stores/StoreChat;->externalMessageTextSubject:Lrx/subjects/BehaviorSubject;
const-string v0, ""
invoke-virtual {p1, v0}, Lrx/subjects/BehaviorSubject;->onNext(Ljava/lang/Object;)V
return-void
.end method
.method public final setInteractionState(Lcom/discord/stores/StoreChat$InteractionState;)V
.locals 1
const-string v0, "interactionState"
invoke-static {p1, v0}, Lkotlin/jvm/internal/j;->h(Ljava/lang/Object;Ljava/lang/String;)V
iget-object v0, p0, Lcom/discord/stores/StoreChat;->interactionStateSubject:Lrx/subjects/SerializedSubject;
invoke-virtual {v0, p1}, Lrx/subjects/SerializedSubject;->onNext(Ljava/lang/Object;)V
return-void
.end method
.method public final setTextChannelInput(JLjava/lang/CharSequence;)V
.locals 1
.annotation build Landroidx/annotation/UiThread;
.end annotation
if-eqz p3, :cond_2
invoke-interface {p3}, Ljava/lang/CharSequence;->length()I
move-result v0
if-nez v0, :cond_0
const/4 v0, 0x1
goto :goto_0
:cond_0
const/4 v0, 0x0
:goto_0
if-eqz v0, :cond_1
goto :goto_1
:cond_1
iget-object v0, p0, Lcom/discord/stores/StoreChat;->textChannelInput:Ljava/util/HashMap;
check-cast v0, Ljava/util/Map;
invoke-static {p1, p2}, Ljava/lang/Long;->valueOf(J)Ljava/lang/Long;
move-result-object p1
invoke-interface {v0, p1, p3}, Ljava/util/Map;->put(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
return-void
:cond_2
:goto_1
iget-object p3, p0, Lcom/discord/stores/StoreChat;->textChannelInput:Ljava/util/HashMap;
invoke-static {p1, p2}, Ljava/lang/Long;->valueOf(J)Ljava/lang/Long;
move-result-object p1
invoke-virtual {p3, p1}, Ljava/util/HashMap;->remove(Ljava/lang/Object;)Ljava/lang/Object;
return-void
.end method
.method public final toggleBlockedMessageGroup(J)V
.locals 18
move-object/from16 v0, p0
iget-object v1, v0, Lcom/discord/stores/StoreChat;->expandedBlockedMessageGroups:Lrx/subjects/SerializedSubject;
new-instance v2, Lcom/discord/stores/StoreChat$toggleBlockedMessageGroup$1;
move-wide/from16 v3, p1
invoke-direct {v2, v3, v4}, Lcom/discord/stores/StoreChat$toggleBlockedMessageGroup$1;-><init>(J)V
check-cast v2, Lrx/functions/b;
invoke-virtual {v1, v2}, Lrx/subjects/SerializedSubject;->e(Lrx/functions/b;)Lrx/Observable;
move-result-object v3
const-string v1, "expandedBlockedMessageGr\u2026 }\n }\n }"
invoke-static {v3, v1}, Lkotlin/jvm/internal/j;->g(Ljava/lang/Object;Ljava/lang/String;)V
const-wide/16 v4, 0x0
const/4 v6, 0x0
const/4 v7, 0x3
const/4 v8, 0x0
invoke-static/range {v3 .. v8}, Lcom/discord/utilities/rx/ObservableExtensionsKt;->takeSingleUntilTimeout$default(Lrx/Observable;JZILjava/lang/Object;)Lrx/Observable;
move-result-object v9
invoke-virtual/range {p0 .. p0}, Ljava/lang/Object;->getClass()Ljava/lang/Class;
move-result-object v10
new-instance v1, Lcom/discord/stores/StoreChat$toggleBlockedMessageGroup$2;
iget-object v2, v0, Lcom/discord/stores/StoreChat;->expandedBlockedMessageGroups:Lrx/subjects/SerializedSubject;
invoke-direct {v1, v2}, Lcom/discord/stores/StoreChat$toggleBlockedMessageGroup$2;-><init>(Lrx/subjects/SerializedSubject;)V
move-object v15, v1
check-cast v15, Lkotlin/jvm/functions/Function1;
const/4 v11, 0x0
const/4 v12, 0x0
const/4 v13, 0x0
const/4 v14, 0x0
const/16 v16, 0x1e
const/16 v17, 0x0
invoke-static/range {v9 .. v17}, Lcom/discord/utilities/rx/ObservableExtensionsKt;->appSubscribe$default(Lrx/Observable;Ljava/lang/Class;Landroid/content/Context;Lkotlin/jvm/functions/Function1;Lkotlin/jvm/functions/Function1;Lkotlin/jvm/functions/Function0;Lkotlin/jvm/functions/Function1;ILjava/lang/Object;)V
return-void
.end method