988 lines
30 KiB
Smali
988 lines
30 KiB
Smali
.class public final Lcom/discord/stores/StoreSearchInput;
|
|
.super Ljava/lang/Object;
|
|
.source "StoreSearchInput.kt"
|
|
|
|
|
|
# instance fields
|
|
.field public final astSubject:Lrx/subjects/SerializedSubject;
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"Lrx/subjects/SerializedSubject<",
|
|
"Ljava/util/List<",
|
|
"Lcom/discord/utilities/search/query/node/QueryNode;",
|
|
">;",
|
|
"Ljava/util/List<",
|
|
"Lcom/discord/utilities/search/query/node/QueryNode;",
|
|
">;>;"
|
|
}
|
|
.end annotation
|
|
.end field
|
|
|
|
.field public final currentParsedInput:Lrx/Observable;
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"Lrx/Observable<",
|
|
"Ljava/util/List<",
|
|
"Lcom/discord/utilities/search/query/node/QueryNode;",
|
|
">;>;"
|
|
}
|
|
.end annotation
|
|
.end field
|
|
|
|
.field public final forcedInput:Lrx/Observable;
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"Lrx/Observable<",
|
|
"Ljava/util/List<",
|
|
"Lcom/discord/utilities/search/query/node/QueryNode;",
|
|
">;>;"
|
|
}
|
|
.end annotation
|
|
.end field
|
|
|
|
.field public final forcedInputSubject:Lrx/subjects/PublishSubject;
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"Lrx/subjects/PublishSubject<",
|
|
"Ljava/util/List<",
|
|
"Lcom/discord/utilities/search/query/node/QueryNode;",
|
|
">;>;"
|
|
}
|
|
.end annotation
|
|
.end field
|
|
|
|
.field public final inputSubject:Lrx/subjects/SerializedSubject;
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"Lrx/subjects/SerializedSubject<",
|
|
"Ljava/lang/String;",
|
|
"Ljava/lang/String;",
|
|
">;"
|
|
}
|
|
.end annotation
|
|
.end field
|
|
|
|
.field public inputSubscription:Lrx/Subscription;
|
|
|
|
.field public final isInputValid:Lrx/Observable;
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"Lrx/Observable<",
|
|
"Ljava/lang/Boolean;",
|
|
">;"
|
|
}
|
|
.end annotation
|
|
.end field
|
|
|
|
.field public final isInputValidSubject:Lrx/subjects/SerializedSubject;
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"Lrx/subjects/SerializedSubject<",
|
|
"Ljava/lang/Boolean;",
|
|
"Ljava/lang/Boolean;",
|
|
">;"
|
|
}
|
|
.end annotation
|
|
.end field
|
|
|
|
|
|
# direct methods
|
|
.method public constructor <init>()V
|
|
.locals 9
|
|
|
|
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
|
|
|
|
new-instance v0, Lrx/subjects/SerializedSubject;
|
|
|
|
invoke-static {}, Lrx/subjects/BehaviorSubject;->g0()Lrx/subjects/BehaviorSubject;
|
|
|
|
move-result-object v1
|
|
|
|
invoke-direct {v0, v1}, Lrx/subjects/SerializedSubject;-><init>(Lrx/subjects/Subject;)V
|
|
|
|
iput-object v0, p0, Lcom/discord/stores/StoreSearchInput;->astSubject:Lrx/subjects/SerializedSubject;
|
|
|
|
new-instance v0, Lrx/subjects/SerializedSubject;
|
|
|
|
const-string v1, ""
|
|
|
|
invoke-static {v1}, Lrx/subjects/BehaviorSubject;->h0(Ljava/lang/Object;)Lrx/subjects/BehaviorSubject;
|
|
|
|
move-result-object v1
|
|
|
|
invoke-direct {v0, v1}, Lrx/subjects/SerializedSubject;-><init>(Lrx/subjects/Subject;)V
|
|
|
|
iput-object v0, p0, Lcom/discord/stores/StoreSearchInput;->inputSubject:Lrx/subjects/SerializedSubject;
|
|
|
|
new-instance v0, Lrx/subjects/SerializedSubject;
|
|
|
|
sget-object v1, Ljava/lang/Boolean;->FALSE:Ljava/lang/Boolean;
|
|
|
|
invoke-static {v1}, Lrx/subjects/BehaviorSubject;->h0(Ljava/lang/Object;)Lrx/subjects/BehaviorSubject;
|
|
|
|
move-result-object v1
|
|
|
|
invoke-direct {v0, v1}, Lrx/subjects/SerializedSubject;-><init>(Lrx/subjects/Subject;)V
|
|
|
|
iput-object v0, p0, Lcom/discord/stores/StoreSearchInput;->isInputValidSubject:Lrx/subjects/SerializedSubject;
|
|
|
|
invoke-static {}, Lrx/subjects/PublishSubject;->g0()Lrx/subjects/PublishSubject;
|
|
|
|
move-result-object v0
|
|
|
|
iput-object v0, p0, Lcom/discord/stores/StoreSearchInput;->forcedInputSubject:Lrx/subjects/PublishSubject;
|
|
|
|
iget-object v1, p0, Lcom/discord/stores/StoreSearchInput;->isInputValidSubject:Lrx/subjects/SerializedSubject;
|
|
|
|
iput-object v1, p0, Lcom/discord/stores/StoreSearchInput;->isInputValid:Lrx/Observable;
|
|
|
|
iget-object v1, p0, Lcom/discord/stores/StoreSearchInput;->astSubject:Lrx/subjects/SerializedSubject;
|
|
|
|
iput-object v1, p0, Lcom/discord/stores/StoreSearchInput;->currentParsedInput:Lrx/Observable;
|
|
|
|
const-string v1, "forcedInputSubject"
|
|
|
|
invoke-static {v0, v1}, Lz/n/c/j;->checkNotNullExpressionValue(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
iput-object v0, p0, Lcom/discord/stores/StoreSearchInput;->forcedInput:Lrx/Observable;
|
|
|
|
iget-object v0, p0, Lcom/discord/stores/StoreSearchInput;->astSubject:Lrx/subjects/SerializedSubject;
|
|
|
|
sget-object v1, Ljava/util/concurrent/TimeUnit;->MILLISECONDS:Ljava/util/concurrent/TimeUnit;
|
|
|
|
const-wide/16 v2, 0x32
|
|
|
|
invoke-static {v0, v2, v3, v1}, Lcom/discord/utilities/rx/ObservableExtensionsKt;->leadingEdgeThrottle(Lrx/Observable;JLjava/util/concurrent/TimeUnit;)Lrx/Observable;
|
|
|
|
move-result-object v0
|
|
|
|
sget-object v1, Lcom/discord/stores/StoreSearchInput$1;->INSTANCE:Lcom/discord/stores/StoreSearchInput$1;
|
|
|
|
invoke-virtual {v0, v1}, Lrx/Observable;->D(Li0/k/b;)Lrx/Observable;
|
|
|
|
move-result-object v0
|
|
|
|
invoke-static {}, Li0/p/a;->a()Lrx/Scheduler;
|
|
|
|
move-result-object v1
|
|
|
|
invoke-virtual {v0, v1}, Lrx/Observable;->T(Lrx/Scheduler;)Lrx/Observable;
|
|
|
|
move-result-object v0
|
|
|
|
new-instance v5, Lcom/discord/stores/StoreSearchInput$2;
|
|
|
|
invoke-direct {v5, p0}, Lcom/discord/stores/StoreSearchInput$2;-><init>(Lcom/discord/stores/StoreSearchInput;)V
|
|
|
|
const/16 v1, 0x3c
|
|
|
|
and-int/lit8 v2, v1, 0x4
|
|
|
|
and-int/lit8 v2, v1, 0x8
|
|
|
|
and-int/lit8 v2, v1, 0x10
|
|
|
|
and-int/lit8 v1, v1, 0x20
|
|
|
|
const-string v1, "onNext"
|
|
|
|
invoke-static {v5, v1}, Lz/n/c/j;->checkNotNullParameter(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
const-string/jumbo v3, "validateSearchInput"
|
|
|
|
const-string v1, "errorTag"
|
|
|
|
invoke-static {v3, v1}, Lz/n/c/j;->checkNotNullParameter(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
new-instance v8, Lf/a/b/e0;
|
|
|
|
const/4 v7, 0x0
|
|
|
|
move-object v1, v8
|
|
|
|
move-object v2, v7
|
|
|
|
move-object v4, v7
|
|
|
|
move-object v6, v7
|
|
|
|
invoke-direct/range {v1 .. v7}, Lf/a/b/e0;-><init>(Landroid/content/Context;Ljava/lang/String;Lkotlin/jvm/functions/Function1;Lkotlin/jvm/functions/Function1;Lkotlin/jvm/functions/Function1;Lkotlin/jvm/functions/Function0;)V
|
|
|
|
invoke-virtual {v0, v8}, Lrx/Observable;->k(Lrx/Observable$c;)Lrx/Observable;
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public static final synthetic access$handleInputSubscription(Lcom/discord/stores/StoreSearchInput;Lrx/Subscription;)V
|
|
.locals 0
|
|
|
|
invoke-direct {p0, p1}, Lcom/discord/stores/StoreSearchInput;->handleInputSubscription(Lrx/Subscription;)V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public static final synthetic access$isInputValidSubject$p(Lcom/discord/stores/StoreSearchInput;)Lrx/subjects/SerializedSubject;
|
|
.locals 0
|
|
|
|
iget-object p0, p0, Lcom/discord/stores/StoreSearchInput;->isInputValidSubject:Lrx/subjects/SerializedSubject;
|
|
|
|
return-object p0
|
|
.end method
|
|
|
|
.method private final getAnswerReplacementStart(Ljava/util/List;)I
|
|
.locals 4
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"(",
|
|
"Ljava/util/List<",
|
|
"+",
|
|
"Lcom/discord/utilities/search/query/node/QueryNode;",
|
|
">;)I"
|
|
}
|
|
.end annotation
|
|
|
|
invoke-interface {p1}, Ljava/util/List;->size()I
|
|
|
|
move-result v0
|
|
|
|
const/4 v1, 0x1
|
|
|
|
if-gt v0, v1, :cond_0
|
|
|
|
const/4 p1, 0x0
|
|
|
|
return p1
|
|
|
|
:cond_0
|
|
invoke-static {p1}, Lf/h/a/f/f/n/f;->getLastIndex(Ljava/util/List;)I
|
|
|
|
move-result v0
|
|
|
|
invoke-interface {p1, v0}, Ljava/util/List;->get(I)Ljava/lang/Object;
|
|
|
|
move-result-object v1
|
|
|
|
check-cast v1, Lcom/discord/utilities/search/query/node/QueryNode;
|
|
|
|
add-int/lit8 v2, v0, -0x1
|
|
|
|
invoke-interface {p1, v2}, Ljava/util/List;->get(I)Ljava/lang/Object;
|
|
|
|
move-result-object p1
|
|
|
|
check-cast p1, Lcom/discord/utilities/search/query/node/QueryNode;
|
|
|
|
instance-of v3, v1, Lcom/discord/utilities/search/query/node/filter/FilterNode;
|
|
|
|
if-eqz v3, :cond_1
|
|
|
|
goto :goto_0
|
|
|
|
:cond_1
|
|
instance-of v0, v1, Lcom/discord/utilities/search/query/node/content/ContentNode;
|
|
|
|
if-eqz v0, :cond_2
|
|
|
|
instance-of p1, p1, Lcom/discord/utilities/search/query/node/filter/FilterNode;
|
|
|
|
if-eqz p1, :cond_2
|
|
|
|
move v0, v2
|
|
|
|
goto :goto_0
|
|
|
|
:cond_2
|
|
const/4 v0, -0x1
|
|
|
|
:goto_0
|
|
return v0
|
|
.end method
|
|
|
|
.method private final declared-synchronized handleInputSubscription(Lrx/Subscription;)V
|
|
.locals 1
|
|
|
|
monitor-enter p0
|
|
|
|
:try_start_0
|
|
iget-object v0, p0, Lcom/discord/stores/StoreSearchInput;->inputSubscription:Lrx/Subscription;
|
|
|
|
if-eqz v0, :cond_0
|
|
|
|
invoke-interface {v0}, Lrx/Subscription;->unsubscribe()V
|
|
|
|
:cond_0
|
|
iput-object p1, p0, Lcom/discord/stores/StoreSearchInput;->inputSubscription:Lrx/Subscription;
|
|
:try_end_0
|
|
.catchall {:try_start_0 .. :try_end_0} :catchall_0
|
|
|
|
monitor-exit p0
|
|
|
|
return-void
|
|
|
|
:catchall_0
|
|
move-exception p1
|
|
|
|
monitor-exit p0
|
|
|
|
throw p1
|
|
.end method
|
|
|
|
.method private final replaceAndPublish(ILjava/util/List;Ljava/util/List;)V
|
|
.locals 1
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"(I",
|
|
"Ljava/util/List<",
|
|
"+",
|
|
"Lcom/discord/utilities/search/query/node/QueryNode;",
|
|
">;",
|
|
"Ljava/util/List<",
|
|
"Lcom/discord/utilities/search/query/node/QueryNode;",
|
|
">;)V"
|
|
}
|
|
.end annotation
|
|
|
|
if-ltz p1, :cond_1
|
|
|
|
invoke-interface {p3}, Ljava/util/List;->size()I
|
|
|
|
move-result v0
|
|
|
|
if-le p1, v0, :cond_0
|
|
|
|
goto :goto_0
|
|
|
|
:cond_0
|
|
invoke-interface {p3}, Ljava/util/List;->size()I
|
|
|
|
move-result v0
|
|
|
|
invoke-interface {p3, p1, v0}, Ljava/util/List;->subList(II)Ljava/util/List;
|
|
|
|
move-result-object v0
|
|
|
|
invoke-interface {v0}, Ljava/util/List;->clear()V
|
|
|
|
invoke-interface {p3, p1, p2}, Ljava/util/List;->addAll(ILjava/util/Collection;)Z
|
|
|
|
iget-object p1, p0, Lcom/discord/stores/StoreSearchInput;->forcedInputSubject:Lrx/subjects/PublishSubject;
|
|
|
|
iget-object p1, p1, Lrx/subjects/PublishSubject;->e:Lrx/subjects/PublishSubject$b;
|
|
|
|
invoke-virtual {p1, p3}, Lrx/subjects/PublishSubject$b;->onNext(Ljava/lang/Object;)V
|
|
|
|
:cond_1
|
|
:goto_0
|
|
return-void
|
|
.end method
|
|
|
|
|
|
# virtual methods
|
|
.method public final clear()V
|
|
.locals 2
|
|
|
|
const/4 v0, 0x0
|
|
|
|
invoke-direct {p0, v0}, Lcom/discord/stores/StoreSearchInput;->handleInputSubscription(Lrx/Subscription;)V
|
|
|
|
iget-object v0, p0, Lcom/discord/stores/StoreSearchInput;->inputSubject:Lrx/subjects/SerializedSubject;
|
|
|
|
iget-object v0, v0, Lrx/subjects/SerializedSubject;->e:Li0/n/c;
|
|
|
|
const-string v1, ""
|
|
|
|
invoke-virtual {v0, v1}, Li0/n/c;->onNext(Ljava/lang/Object;)V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public final getCurrentParsedInput()Lrx/Observable;
|
|
.locals 1
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"()",
|
|
"Lrx/Observable<",
|
|
"Ljava/util/List<",
|
|
"Lcom/discord/utilities/search/query/node/QueryNode;",
|
|
">;>;"
|
|
}
|
|
.end annotation
|
|
|
|
iget-object v0, p0, Lcom/discord/stores/StoreSearchInput;->currentParsedInput:Lrx/Observable;
|
|
|
|
return-object v0
|
|
.end method
|
|
|
|
.method public final getForcedInput()Lrx/Observable;
|
|
.locals 1
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"()",
|
|
"Lrx/Observable<",
|
|
"Ljava/util/List<",
|
|
"Lcom/discord/utilities/search/query/node/QueryNode;",
|
|
">;>;"
|
|
}
|
|
.end annotation
|
|
|
|
iget-object v0, p0, Lcom/discord/stores/StoreSearchInput;->forcedInput:Lrx/Observable;
|
|
|
|
return-object v0
|
|
.end method
|
|
|
|
.method public final init(Lcom/discord/utilities/search/strings/SearchStringProvider;)V
|
|
.locals 10
|
|
|
|
const-string v0, "searchStringProvider"
|
|
|
|
invoke-static {p1, v0}, Lz/n/c/j;->checkNotNullParameter(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
new-instance v0, Lcom/discord/utilities/search/query/parsing/QueryParser;
|
|
|
|
invoke-direct {v0, p1}, Lcom/discord/utilities/search/query/parsing/QueryParser;-><init>(Lcom/discord/utilities/search/strings/SearchStringProvider;)V
|
|
|
|
iget-object p1, p0, Lcom/discord/stores/StoreSearchInput;->inputSubject:Lrx/subjects/SerializedSubject;
|
|
|
|
sget-object v1, Ljava/util/concurrent/TimeUnit;->MILLISECONDS:Ljava/util/concurrent/TimeUnit;
|
|
|
|
const-wide/16 v2, 0x64
|
|
|
|
invoke-static {p1, v2, v3, v1}, Lcom/discord/utilities/rx/ObservableExtensionsKt;->leadingEdgeThrottle(Lrx/Observable;JLjava/util/concurrent/TimeUnit;)Lrx/Observable;
|
|
|
|
move-result-object p1
|
|
|
|
invoke-virtual {p1}, Lrx/Observable;->q()Lrx/Observable;
|
|
|
|
move-result-object p1
|
|
|
|
new-instance v1, Lcom/discord/stores/StoreSearchInput$init$1;
|
|
|
|
invoke-direct {v1, v0}, Lcom/discord/stores/StoreSearchInput$init$1;-><init>(Lcom/discord/utilities/search/query/parsing/QueryParser;)V
|
|
|
|
invoke-virtual {p1, v1}, Lrx/Observable;->D(Li0/k/b;)Lrx/Observable;
|
|
|
|
move-result-object p1
|
|
|
|
invoke-static {}, Li0/p/a;->a()Lrx/Scheduler;
|
|
|
|
move-result-object v0
|
|
|
|
invoke-virtual {p1, v0}, Lrx/Observable;->T(Lrx/Scheduler;)Lrx/Observable;
|
|
|
|
move-result-object v1
|
|
|
|
const-string p1, "inputSubject\n .le\u2026Schedulers.computation())"
|
|
|
|
invoke-static {v1, p1}, Lz/n/c/j;->checkNotNullExpressionValue(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
const-class v2, Lcom/discord/stores/StoreSearchInput;
|
|
|
|
new-instance v4, Lcom/discord/stores/StoreSearchInput$init$2;
|
|
|
|
invoke-direct {v4, p0}, Lcom/discord/stores/StoreSearchInput$init$2;-><init>(Lcom/discord/stores/StoreSearchInput;)V
|
|
|
|
new-instance v7, Lcom/discord/stores/StoreSearchInput$init$3;
|
|
|
|
iget-object p1, p0, Lcom/discord/stores/StoreSearchInput;->astSubject:Lrx/subjects/SerializedSubject;
|
|
|
|
invoke-direct {v7, p1}, Lcom/discord/stores/StoreSearchInput$init$3;-><init>(Lrx/subjects/SerializedSubject;)V
|
|
|
|
const/4 v3, 0x0
|
|
|
|
const/4 v5, 0x0
|
|
|
|
const/4 v6, 0x0
|
|
|
|
const/16 v8, 0x1a
|
|
|
|
const/4 v9, 0x0
|
|
|
|
invoke-static/range {v1 .. v9}, Lcom/discord/utilities/rx/ObservableExtensionsKt;->appSubscribe$default(Lrx/Observable;Ljava/lang/Class;Landroid/content/Context;Lkotlin/jvm/functions/Function1;Lkotlin/jvm/functions/Function1;Lkotlin/jvm/functions/Function0;Lkotlin/jvm/functions/Function1;ILjava/lang/Object;)V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public final isInputValid()Lrx/Observable;
|
|
.locals 1
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"()",
|
|
"Lrx/Observable<",
|
|
"Ljava/lang/Boolean;",
|
|
">;"
|
|
}
|
|
.end annotation
|
|
|
|
iget-object v0, p0, Lcom/discord/stores/StoreSearchInput;->isInputValid:Lrx/Observable;
|
|
|
|
return-object v0
|
|
.end method
|
|
|
|
.method public final onFilterClicked(Lcom/discord/utilities/search/query/FilterType;Lcom/discord/utilities/search/strings/SearchStringProvider;Ljava/util/List;)V
|
|
.locals 2
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"(",
|
|
"Lcom/discord/utilities/search/query/FilterType;",
|
|
"Lcom/discord/utilities/search/strings/SearchStringProvider;",
|
|
"Ljava/util/List<",
|
|
"Lcom/discord/utilities/search/query/node/QueryNode;",
|
|
">;)V"
|
|
}
|
|
.end annotation
|
|
|
|
const-string v0, "filterType"
|
|
|
|
invoke-static {p1, v0}, Lz/n/c/j;->checkNotNullParameter(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
const-string v0, "searchStringProvider"
|
|
|
|
invoke-static {p2, v0}, Lz/n/c/j;->checkNotNullParameter(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
const-string v0, "query"
|
|
|
|
invoke-static {p3, v0}, Lz/n/c/j;->checkNotNullParameter(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
new-instance v0, Ljava/util/ArrayList;
|
|
|
|
invoke-direct {v0, p3}, Ljava/util/ArrayList;-><init>(Ljava/util/Collection;)V
|
|
|
|
invoke-virtual {p1}, Ljava/lang/Enum;->ordinal()I
|
|
|
|
move-result p1
|
|
|
|
if-eqz p1, :cond_3
|
|
|
|
const/4 v1, 0x1
|
|
|
|
if-eq p1, v1, :cond_2
|
|
|
|
const/4 v1, 0x2
|
|
|
|
if-eq p1, v1, :cond_1
|
|
|
|
const/4 v1, 0x3
|
|
|
|
if-ne p1, v1, :cond_0
|
|
|
|
new-instance p1, Lcom/discord/utilities/search/query/node/filter/FilterNode;
|
|
|
|
sget-object v1, Lcom/discord/utilities/search/query/FilterType;->IN:Lcom/discord/utilities/search/query/FilterType;
|
|
|
|
invoke-interface {p2}, Lcom/discord/utilities/search/strings/SearchStringProvider;->getInFilterString()Ljava/lang/String;
|
|
|
|
move-result-object p2
|
|
|
|
invoke-direct {p1, v1, p2}, Lcom/discord/utilities/search/query/node/filter/FilterNode;-><init>(Lcom/discord/utilities/search/query/FilterType;Ljava/lang/String;)V
|
|
|
|
goto :goto_0
|
|
|
|
:cond_0
|
|
new-instance p1, Lkotlin/NoWhenBranchMatchedException;
|
|
|
|
invoke-direct {p1}, Lkotlin/NoWhenBranchMatchedException;-><init>()V
|
|
|
|
throw p1
|
|
|
|
:cond_1
|
|
new-instance p1, Lcom/discord/utilities/search/query/node/filter/FilterNode;
|
|
|
|
sget-object v1, Lcom/discord/utilities/search/query/FilterType;->HAS:Lcom/discord/utilities/search/query/FilterType;
|
|
|
|
invoke-interface {p2}, Lcom/discord/utilities/search/strings/SearchStringProvider;->getHasFilterString()Ljava/lang/String;
|
|
|
|
move-result-object p2
|
|
|
|
invoke-direct {p1, v1, p2}, Lcom/discord/utilities/search/query/node/filter/FilterNode;-><init>(Lcom/discord/utilities/search/query/FilterType;Ljava/lang/String;)V
|
|
|
|
goto :goto_0
|
|
|
|
:cond_2
|
|
new-instance p1, Lcom/discord/utilities/search/query/node/filter/FilterNode;
|
|
|
|
sget-object v1, Lcom/discord/utilities/search/query/FilterType;->MENTIONS:Lcom/discord/utilities/search/query/FilterType;
|
|
|
|
invoke-interface {p2}, Lcom/discord/utilities/search/strings/SearchStringProvider;->getMentionsFilterString()Ljava/lang/String;
|
|
|
|
move-result-object p2
|
|
|
|
invoke-direct {p1, v1, p2}, Lcom/discord/utilities/search/query/node/filter/FilterNode;-><init>(Lcom/discord/utilities/search/query/FilterType;Ljava/lang/String;)V
|
|
|
|
goto :goto_0
|
|
|
|
:cond_3
|
|
new-instance p1, Lcom/discord/utilities/search/query/node/filter/FilterNode;
|
|
|
|
sget-object v1, Lcom/discord/utilities/search/query/FilterType;->FROM:Lcom/discord/utilities/search/query/FilterType;
|
|
|
|
invoke-interface {p2}, Lcom/discord/utilities/search/strings/SearchStringProvider;->getFromFilterString()Ljava/lang/String;
|
|
|
|
move-result-object p2
|
|
|
|
invoke-direct {p1, v1, p2}, Lcom/discord/utilities/search/query/node/filter/FilterNode;-><init>(Lcom/discord/utilities/search/query/FilterType;Ljava/lang/String;)V
|
|
|
|
:goto_0
|
|
invoke-virtual {v0}, Ljava/util/ArrayList;->isEmpty()Z
|
|
|
|
move-result p2
|
|
|
|
if-eqz p2, :cond_4
|
|
|
|
const/4 p2, 0x0
|
|
|
|
goto :goto_1
|
|
|
|
:cond_4
|
|
invoke-static {v0}, Lz/i/f;->last(Ljava/util/List;)Ljava/lang/Object;
|
|
|
|
move-result-object p2
|
|
|
|
check-cast p2, Lcom/discord/utilities/search/query/node/QueryNode;
|
|
|
|
instance-of p2, p2, Lcom/discord/utilities/search/query/node/content/ContentNode;
|
|
|
|
if-eqz p2, :cond_5
|
|
|
|
invoke-static {p3}, Lf/h/a/f/f/n/f;->getLastIndex(Ljava/util/List;)I
|
|
|
|
move-result p2
|
|
|
|
goto :goto_1
|
|
|
|
:cond_5
|
|
invoke-interface {p3}, Ljava/util/List;->size()I
|
|
|
|
move-result p2
|
|
|
|
:goto_1
|
|
invoke-static {p1}, Lf/h/a/f/f/n/f;->listOf(Ljava/lang/Object;)Ljava/util/List;
|
|
|
|
move-result-object p1
|
|
|
|
invoke-direct {p0, p2, p1, p3}, Lcom/discord/stores/StoreSearchInput;->replaceAndPublish(ILjava/util/List;Ljava/util/List;)V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public final onFromUserClicked(Lcom/discord/utilities/search/suggestion/entries/UserSuggestion;Ljava/lang/String;Ljava/util/List;)V
|
|
.locals 2
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"(",
|
|
"Lcom/discord/utilities/search/suggestion/entries/UserSuggestion;",
|
|
"Ljava/lang/String;",
|
|
"Ljava/util/List<",
|
|
"Lcom/discord/utilities/search/query/node/QueryNode;",
|
|
">;)V"
|
|
}
|
|
.end annotation
|
|
|
|
const-string/jumbo v0, "userSuggestion"
|
|
|
|
invoke-static {p1, v0}, Lz/n/c/j;->checkNotNullParameter(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
const-string v0, "fromFilterString"
|
|
|
|
invoke-static {p2, v0}, Lz/n/c/j;->checkNotNullParameter(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
const-string v0, "query"
|
|
|
|
invoke-static {p3, v0}, Lz/n/c/j;->checkNotNullParameter(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
new-instance v0, Lcom/discord/utilities/search/query/node/filter/FilterNode;
|
|
|
|
sget-object v1, Lcom/discord/utilities/search/query/FilterType;->FROM:Lcom/discord/utilities/search/query/FilterType;
|
|
|
|
invoke-direct {v0, v1, p2}, Lcom/discord/utilities/search/query/node/filter/FilterNode;-><init>(Lcom/discord/utilities/search/query/FilterType;Ljava/lang/String;)V
|
|
|
|
new-instance p2, Lcom/discord/utilities/search/query/node/answer/UserNode;
|
|
|
|
invoke-virtual {p1}, Lcom/discord/utilities/search/suggestion/entries/UserSuggestion;->getUserName()Ljava/lang/String;
|
|
|
|
move-result-object v1
|
|
|
|
invoke-virtual {p1}, Lcom/discord/utilities/search/suggestion/entries/UserSuggestion;->getDiscriminator()I
|
|
|
|
move-result p1
|
|
|
|
invoke-direct {p2, v1, p1}, Lcom/discord/utilities/search/query/node/answer/UserNode;-><init>(Ljava/lang/String;I)V
|
|
|
|
const/4 p1, 0x2
|
|
|
|
new-array p1, p1, [Lcom/discord/utilities/search/query/node/QueryNode;
|
|
|
|
const/4 v1, 0x0
|
|
|
|
aput-object v0, p1, v1
|
|
|
|
const/4 v0, 0x1
|
|
|
|
aput-object p2, p1, v0
|
|
|
|
invoke-static {p1}, Ljava/util/Arrays;->asList([Ljava/lang/Object;)Ljava/util/List;
|
|
|
|
move-result-object p1
|
|
|
|
invoke-direct {p0, p3}, Lcom/discord/stores/StoreSearchInput;->getAnswerReplacementStart(Ljava/util/List;)I
|
|
|
|
move-result p2
|
|
|
|
const-string v0, "replacement"
|
|
|
|
invoke-static {p1, v0}, Lz/n/c/j;->checkNotNullExpressionValue(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
invoke-direct {p0, p2, p1, p3}, Lcom/discord/stores/StoreSearchInput;->replaceAndPublish(ILjava/util/List;Ljava/util/List;)V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public final onHasClicked(Lcom/discord/utilities/search/query/node/answer/HasAnswerOption;Ljava/lang/String;Ljava/lang/String;Ljava/util/List;)V
|
|
.locals 2
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"(",
|
|
"Lcom/discord/utilities/search/query/node/answer/HasAnswerOption;",
|
|
"Ljava/lang/String;",
|
|
"Ljava/lang/String;",
|
|
"Ljava/util/List<",
|
|
"Lcom/discord/utilities/search/query/node/QueryNode;",
|
|
">;)V"
|
|
}
|
|
.end annotation
|
|
|
|
const-string v0, "hasAnswerOption"
|
|
|
|
invoke-static {p1, v0}, Lz/n/c/j;->checkNotNullParameter(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
const-string v0, "hasFilterString"
|
|
|
|
invoke-static {p2, v0}, Lz/n/c/j;->checkNotNullParameter(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
const-string v0, "hasAnswerString"
|
|
|
|
invoke-static {p3, v0}, Lz/n/c/j;->checkNotNullParameter(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
const-string v0, "query"
|
|
|
|
invoke-static {p4, v0}, Lz/n/c/j;->checkNotNullParameter(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
new-instance v0, Lcom/discord/utilities/search/query/node/filter/FilterNode;
|
|
|
|
sget-object v1, Lcom/discord/utilities/search/query/FilterType;->HAS:Lcom/discord/utilities/search/query/FilterType;
|
|
|
|
invoke-direct {v0, v1, p2}, Lcom/discord/utilities/search/query/node/filter/FilterNode;-><init>(Lcom/discord/utilities/search/query/FilterType;Ljava/lang/String;)V
|
|
|
|
new-instance p2, Lcom/discord/utilities/search/query/node/answer/HasNode;
|
|
|
|
invoke-direct {p2, p1, p3}, Lcom/discord/utilities/search/query/node/answer/HasNode;-><init>(Lcom/discord/utilities/search/query/node/answer/HasAnswerOption;Ljava/lang/String;)V
|
|
|
|
const/4 p1, 0x2
|
|
|
|
new-array p1, p1, [Lcom/discord/utilities/search/query/node/QueryNode;
|
|
|
|
const/4 p3, 0x0
|
|
|
|
aput-object v0, p1, p3
|
|
|
|
const/4 p3, 0x1
|
|
|
|
aput-object p2, p1, p3
|
|
|
|
invoke-static {p1}, Ljava/util/Arrays;->asList([Ljava/lang/Object;)Ljava/util/List;
|
|
|
|
move-result-object p1
|
|
|
|
invoke-direct {p0, p4}, Lcom/discord/stores/StoreSearchInput;->getAnswerReplacementStart(Ljava/util/List;)I
|
|
|
|
move-result p2
|
|
|
|
const-string p3, "replacement"
|
|
|
|
invoke-static {p1, p3}, Lz/n/c/j;->checkNotNullExpressionValue(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
invoke-direct {p0, p2, p1, p4}, Lcom/discord/stores/StoreSearchInput;->replaceAndPublish(ILjava/util/List;Ljava/util/List;)V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public final onInChannelClicked(Lcom/discord/utilities/search/suggestion/entries/ChannelSuggestion;Ljava/lang/String;Ljava/util/List;)V
|
|
.locals 2
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"(",
|
|
"Lcom/discord/utilities/search/suggestion/entries/ChannelSuggestion;",
|
|
"Ljava/lang/String;",
|
|
"Ljava/util/List<",
|
|
"Lcom/discord/utilities/search/query/node/QueryNode;",
|
|
">;)V"
|
|
}
|
|
.end annotation
|
|
|
|
const-string v0, "channelSuggestion"
|
|
|
|
invoke-static {p1, v0}, Lz/n/c/j;->checkNotNullParameter(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
const-string v0, "inFilterString"
|
|
|
|
invoke-static {p2, v0}, Lz/n/c/j;->checkNotNullParameter(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
const-string v0, "query"
|
|
|
|
invoke-static {p3, v0}, Lz/n/c/j;->checkNotNullParameter(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
new-instance v0, Lcom/discord/utilities/search/query/node/filter/FilterNode;
|
|
|
|
sget-object v1, Lcom/discord/utilities/search/query/FilterType;->IN:Lcom/discord/utilities/search/query/FilterType;
|
|
|
|
invoke-direct {v0, v1, p2}, Lcom/discord/utilities/search/query/node/filter/FilterNode;-><init>(Lcom/discord/utilities/search/query/FilterType;Ljava/lang/String;)V
|
|
|
|
new-instance p2, Lcom/discord/utilities/search/query/node/answer/ChannelNode;
|
|
|
|
invoke-virtual {p1}, Lcom/discord/utilities/search/suggestion/entries/ChannelSuggestion;->getChannelName()Ljava/lang/String;
|
|
|
|
move-result-object p1
|
|
|
|
invoke-direct {p2, p1}, Lcom/discord/utilities/search/query/node/answer/ChannelNode;-><init>(Ljava/lang/String;)V
|
|
|
|
const/4 p1, 0x2
|
|
|
|
new-array p1, p1, [Lcom/discord/utilities/search/query/node/QueryNode;
|
|
|
|
const/4 v1, 0x0
|
|
|
|
aput-object v0, p1, v1
|
|
|
|
const/4 v0, 0x1
|
|
|
|
aput-object p2, p1, v0
|
|
|
|
invoke-static {p1}, Ljava/util/Arrays;->asList([Ljava/lang/Object;)Ljava/util/List;
|
|
|
|
move-result-object p1
|
|
|
|
invoke-direct {p0, p3}, Lcom/discord/stores/StoreSearchInput;->getAnswerReplacementStart(Ljava/util/List;)I
|
|
|
|
move-result p2
|
|
|
|
const-string v0, "replacement"
|
|
|
|
invoke-static {p1, v0}, Lz/n/c/j;->checkNotNullExpressionValue(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
invoke-direct {p0, p2, p1, p3}, Lcom/discord/stores/StoreSearchInput;->replaceAndPublish(ILjava/util/List;Ljava/util/List;)V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public final onMentionsUserClicked(Lcom/discord/utilities/search/suggestion/entries/UserSuggestion;Ljava/lang/String;Ljava/util/List;)V
|
|
.locals 2
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"(",
|
|
"Lcom/discord/utilities/search/suggestion/entries/UserSuggestion;",
|
|
"Ljava/lang/String;",
|
|
"Ljava/util/List<",
|
|
"Lcom/discord/utilities/search/query/node/QueryNode;",
|
|
">;)V"
|
|
}
|
|
.end annotation
|
|
|
|
const-string/jumbo v0, "userSuggestion"
|
|
|
|
invoke-static {p1, v0}, Lz/n/c/j;->checkNotNullParameter(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
const-string v0, "mentionsFilterString"
|
|
|
|
invoke-static {p2, v0}, Lz/n/c/j;->checkNotNullParameter(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
const-string v0, "query"
|
|
|
|
invoke-static {p3, v0}, Lz/n/c/j;->checkNotNullParameter(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
new-instance v0, Lcom/discord/utilities/search/query/node/filter/FilterNode;
|
|
|
|
sget-object v1, Lcom/discord/utilities/search/query/FilterType;->MENTIONS:Lcom/discord/utilities/search/query/FilterType;
|
|
|
|
invoke-direct {v0, v1, p2}, Lcom/discord/utilities/search/query/node/filter/FilterNode;-><init>(Lcom/discord/utilities/search/query/FilterType;Ljava/lang/String;)V
|
|
|
|
new-instance p2, Lcom/discord/utilities/search/query/node/answer/UserNode;
|
|
|
|
invoke-virtual {p1}, Lcom/discord/utilities/search/suggestion/entries/UserSuggestion;->getUserName()Ljava/lang/String;
|
|
|
|
move-result-object v1
|
|
|
|
invoke-virtual {p1}, Lcom/discord/utilities/search/suggestion/entries/UserSuggestion;->getDiscriminator()I
|
|
|
|
move-result p1
|
|
|
|
invoke-direct {p2, v1, p1}, Lcom/discord/utilities/search/query/node/answer/UserNode;-><init>(Ljava/lang/String;I)V
|
|
|
|
const/4 p1, 0x2
|
|
|
|
new-array p1, p1, [Lcom/discord/utilities/search/query/node/QueryNode;
|
|
|
|
const/4 v1, 0x0
|
|
|
|
aput-object v0, p1, v1
|
|
|
|
const/4 v0, 0x1
|
|
|
|
aput-object p2, p1, v0
|
|
|
|
invoke-static {p1}, Ljava/util/Arrays;->asList([Ljava/lang/Object;)Ljava/util/List;
|
|
|
|
move-result-object p1
|
|
|
|
invoke-direct {p0, p3}, Lcom/discord/stores/StoreSearchInput;->getAnswerReplacementStart(Ljava/util/List;)I
|
|
|
|
move-result p2
|
|
|
|
const-string v0, "replacement"
|
|
|
|
invoke-static {p1, v0}, Lz/n/c/j;->checkNotNullExpressionValue(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
invoke-direct {p0, p2, p1, p3}, Lcom/discord/stores/StoreSearchInput;->replaceAndPublish(ILjava/util/List;Ljava/util/List;)V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public final onQueryClicked(Ljava/util/List;)V
|
|
.locals 1
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"(",
|
|
"Ljava/util/List<",
|
|
"+",
|
|
"Lcom/discord/utilities/search/query/node/QueryNode;",
|
|
">;)V"
|
|
}
|
|
.end annotation
|
|
|
|
const-string v0, "query"
|
|
|
|
invoke-static {p1, v0}, Lz/n/c/j;->checkNotNullParameter(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
iget-object v0, p0, Lcom/discord/stores/StoreSearchInput;->forcedInputSubject:Lrx/subjects/PublishSubject;
|
|
|
|
iget-object v0, v0, Lrx/subjects/PublishSubject;->e:Lrx/subjects/PublishSubject$b;
|
|
|
|
invoke-virtual {v0, p1}, Lrx/subjects/PublishSubject$b;->onNext(Ljava/lang/Object;)V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public final updateInput(Ljava/lang/String;)V
|
|
.locals 1
|
|
|
|
const-string v0, "input"
|
|
|
|
invoke-static {p1, v0}, Lz/n/c/j;->checkNotNullParameter(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
iget-object v0, p0, Lcom/discord/stores/StoreSearchInput;->inputSubject:Lrx/subjects/SerializedSubject;
|
|
|
|
iget-object v0, v0, Lrx/subjects/SerializedSubject;->e:Li0/n/c;
|
|
|
|
invoke-virtual {v0, p1}, Li0/n/c;->onNext(Ljava/lang/Object;)V
|
|
|
|
return-void
|
|
.end method
|