254 lines
8.7 KiB
Smali
254 lines
8.7 KiB
Smali
.class public final Lcom/discord/widgets/user/search/WidgetGlobalSearchModel$Companion$create$4$1;
|
|
.super Ly/u/b/k;
|
|
.source "WidgetGlobalSearchModel.kt"
|
|
|
|
# interfaces
|
|
.implements Lkotlin/jvm/functions/Function0;
|
|
|
|
|
|
# annotations
|
|
.annotation system Ldalvik/annotation/EnclosingMethod;
|
|
value = Lcom/discord/widgets/user/search/WidgetGlobalSearchModel$Companion$create$4;->invoke(Lcom/discord/models/domain/ModelChannel;Ljava/lang/String;)Lcom/discord/widgets/user/search/WidgetGlobalSearchModel$ItemDataPayload;
|
|
.end annotation
|
|
|
|
.annotation system Ldalvik/annotation/InnerClass;
|
|
accessFlags = 0x19
|
|
name = null
|
|
.end annotation
|
|
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"Ly/u/b/k;",
|
|
"Lkotlin/jvm/functions/Function0<",
|
|
"Lcom/discord/widgets/user/search/WidgetGlobalSearchModel$MatchedResult;",
|
|
">;"
|
|
}
|
|
.end annotation
|
|
|
|
|
|
# instance fields
|
|
.field public final synthetic $channelFilter:Ljava/lang/String;
|
|
|
|
.field public final synthetic $this_toItemChannel:Lcom/discord/models/domain/ModelChannel;
|
|
|
|
.field public final synthetic this$0:Lcom/discord/widgets/user/search/WidgetGlobalSearchModel$Companion$create$4;
|
|
|
|
|
|
# direct methods
|
|
.method public constructor <init>(Lcom/discord/widgets/user/search/WidgetGlobalSearchModel$Companion$create$4;Lcom/discord/models/domain/ModelChannel;Ljava/lang/String;)V
|
|
.locals 0
|
|
|
|
iput-object p1, p0, Lcom/discord/widgets/user/search/WidgetGlobalSearchModel$Companion$create$4$1;->this$0:Lcom/discord/widgets/user/search/WidgetGlobalSearchModel$Companion$create$4;
|
|
|
|
iput-object p2, p0, Lcom/discord/widgets/user/search/WidgetGlobalSearchModel$Companion$create$4$1;->$this_toItemChannel:Lcom/discord/models/domain/ModelChannel;
|
|
|
|
iput-object p3, p0, Lcom/discord/widgets/user/search/WidgetGlobalSearchModel$Companion$create$4$1;->$channelFilter:Ljava/lang/String;
|
|
|
|
const/4 p1, 0x0
|
|
|
|
invoke-direct {p0, p1}, Ly/u/b/k;-><init>(I)V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
|
|
# virtual methods
|
|
.method public final invoke()Lcom/discord/widgets/user/search/WidgetGlobalSearchModel$MatchedResult;
|
|
.locals 9
|
|
.annotation build Landroid/annotation/SuppressLint;
|
|
value = {
|
|
"DefaultLocale"
|
|
}
|
|
.end annotation
|
|
|
|
iget-object v0, p0, Lcom/discord/widgets/user/search/WidgetGlobalSearchModel$Companion$create$4$1;->this$0:Lcom/discord/widgets/user/search/WidgetGlobalSearchModel$Companion$create$4;
|
|
|
|
iget-object v0, v0, Lcom/discord/widgets/user/search/WidgetGlobalSearchModel$Companion$create$4;->$channelContext:Lcom/discord/widgets/user/search/WidgetGlobalSearchModel$ChannelContext;
|
|
|
|
invoke-virtual {v0}, Lcom/discord/widgets/user/search/WidgetGlobalSearchModel$ChannelContext;->getGuilds()Ljava/util/Map;
|
|
|
|
move-result-object v0
|
|
|
|
iget-object v1, p0, Lcom/discord/widgets/user/search/WidgetGlobalSearchModel$Companion$create$4$1;->$this_toItemChannel:Lcom/discord/models/domain/ModelChannel;
|
|
|
|
invoke-virtual {v1}, Lcom/discord/models/domain/ModelChannel;->getGuildId()Ljava/lang/Long;
|
|
|
|
move-result-object v1
|
|
|
|
invoke-interface {v0, v1}, Ljava/util/Map;->get(Ljava/lang/Object;)Ljava/lang/Object;
|
|
|
|
move-result-object v0
|
|
|
|
check-cast v0, Lcom/discord/models/domain/ModelGuild;
|
|
|
|
const-string v1, ""
|
|
|
|
if-eqz v0, :cond_0
|
|
|
|
invoke-virtual {v0}, Lcom/discord/models/domain/ModelGuild;->getName()Ljava/lang/String;
|
|
|
|
move-result-object v0
|
|
|
|
if-eqz v0, :cond_0
|
|
|
|
goto :goto_0
|
|
|
|
:cond_0
|
|
move-object v0, v1
|
|
|
|
:goto_0
|
|
iget-object v2, p0, Lcom/discord/widgets/user/search/WidgetGlobalSearchModel$Companion$create$4$1;->this$0:Lcom/discord/widgets/user/search/WidgetGlobalSearchModel$Companion$create$4;
|
|
|
|
iget-object v2, v2, Lcom/discord/widgets/user/search/WidgetGlobalSearchModel$Companion$create$4;->$channelContext:Lcom/discord/widgets/user/search/WidgetGlobalSearchModel$ChannelContext;
|
|
|
|
invoke-virtual {v2}, Lcom/discord/widgets/user/search/WidgetGlobalSearchModel$ChannelContext;->getChannels()Ljava/util/Map;
|
|
|
|
move-result-object v2
|
|
|
|
iget-object v3, p0, Lcom/discord/widgets/user/search/WidgetGlobalSearchModel$Companion$create$4$1;->$this_toItemChannel:Lcom/discord/models/domain/ModelChannel;
|
|
|
|
invoke-virtual {v3}, Lcom/discord/models/domain/ModelChannel;->getParentId()J
|
|
|
|
move-result-wide v3
|
|
|
|
invoke-static {v3, v4}, Ljava/lang/Long;->valueOf(J)Ljava/lang/Long;
|
|
|
|
move-result-object v3
|
|
|
|
invoke-interface {v2, v3}, Ljava/util/Map;->get(Ljava/lang/Object;)Ljava/lang/Object;
|
|
|
|
move-result-object v2
|
|
|
|
check-cast v2, Lcom/discord/models/domain/ModelChannel;
|
|
|
|
if-eqz v2, :cond_1
|
|
|
|
invoke-virtual {v2}, Lcom/discord/models/domain/ModelChannel;->getName()Ljava/lang/String;
|
|
|
|
move-result-object v2
|
|
|
|
if-eqz v2, :cond_1
|
|
|
|
move-object v1, v2
|
|
|
|
:cond_1
|
|
sget-object v2, Lcom/discord/utilities/search/SearchUtils;->INSTANCE:Lcom/discord/utilities/search/SearchUtils;
|
|
|
|
iget-object v3, p0, Lcom/discord/widgets/user/search/WidgetGlobalSearchModel$Companion$create$4$1;->$channelFilter:Ljava/lang/String;
|
|
|
|
sget-object v4, Ljava/util/Locale;->ROOT:Ljava/util/Locale;
|
|
|
|
const-string v5, "Locale.ROOT"
|
|
|
|
invoke-static {v4, v5}, Ly/u/b/j;->checkExpressionValueIsNotNull(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
const-string v6, "null cannot be cast to non-null type java.lang.String"
|
|
|
|
if-eqz v3, :cond_4
|
|
|
|
invoke-virtual {v3, v4}, Ljava/lang/String;->toLowerCase(Ljava/util/Locale;)Ljava/lang/String;
|
|
|
|
move-result-object v3
|
|
|
|
const-string v4, "(this as java.lang.String).toLowerCase(locale)"
|
|
|
|
invoke-static {v3, v4}, Ly/u/b/j;->checkExpressionValueIsNotNull(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
new-instance v7, Ljava/lang/StringBuilder;
|
|
|
|
invoke-direct {v7}, Ljava/lang/StringBuilder;-><init>()V
|
|
|
|
iget-object v8, p0, Lcom/discord/widgets/user/search/WidgetGlobalSearchModel$Companion$create$4$1;->$this_toItemChannel:Lcom/discord/models/domain/ModelChannel;
|
|
|
|
invoke-virtual {v8}, Lcom/discord/models/domain/ModelChannel;->getName()Ljava/lang/String;
|
|
|
|
move-result-object v8
|
|
|
|
invoke-virtual {v7, v8}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
const/16 v8, 0x20
|
|
|
|
invoke-virtual {v7, v8}, Ljava/lang/StringBuilder;->append(C)Ljava/lang/StringBuilder;
|
|
|
|
invoke-virtual {v7, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
invoke-virtual {v7, v8}, Ljava/lang/StringBuilder;->append(C)Ljava/lang/StringBuilder;
|
|
|
|
invoke-virtual {v7, v0}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
invoke-virtual {v7}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
|
|
|
|
move-result-object v0
|
|
|
|
sget-object v1, Ljava/util/Locale;->ROOT:Ljava/util/Locale;
|
|
|
|
invoke-static {v1, v5}, Ly/u/b/j;->checkExpressionValueIsNotNull(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
if-eqz v0, :cond_3
|
|
|
|
invoke-virtual {v0, v1}, Ljava/lang/String;->toLowerCase(Ljava/util/Locale;)Ljava/lang/String;
|
|
|
|
move-result-object v0
|
|
|
|
invoke-static {v0, v4}, Ly/u/b/j;->checkExpressionValueIsNotNull(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
invoke-virtual {v2, v3, v0}, Lcom/discord/utilities/search/SearchUtils;->fuzzyMatch(Ljava/lang/String;Ljava/lang/String;)Z
|
|
|
|
move-result v0
|
|
|
|
if-eqz v0, :cond_2
|
|
|
|
new-instance v0, Lcom/discord/widgets/user/search/WidgetGlobalSearchModel$MatchedResult;
|
|
|
|
iget-object v1, p0, Lcom/discord/widgets/user/search/WidgetGlobalSearchModel$Companion$create$4$1;->$this_toItemChannel:Lcom/discord/models/domain/ModelChannel;
|
|
|
|
invoke-virtual {v1}, Lcom/discord/models/domain/ModelChannel;->getName()Ljava/lang/String;
|
|
|
|
move-result-object v1
|
|
|
|
const-string v2, "name"
|
|
|
|
invoke-static {v1, v2}, Ly/u/b/j;->checkExpressionValueIsNotNull(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
const/4 v2, -0x1
|
|
|
|
iget-object v3, p0, Lcom/discord/widgets/user/search/WidgetGlobalSearchModel$Companion$create$4$1;->$channelFilter:Ljava/lang/String;
|
|
|
|
invoke-virtual {v3}, Ljava/lang/String;->length()I
|
|
|
|
move-result v3
|
|
|
|
invoke-direct {v0, v1, v2, v3}, Lcom/discord/widgets/user/search/WidgetGlobalSearchModel$MatchedResult;-><init>(Ljava/lang/CharSequence;II)V
|
|
|
|
goto :goto_1
|
|
|
|
:cond_2
|
|
const/4 v0, 0x0
|
|
|
|
:goto_1
|
|
return-object v0
|
|
|
|
:cond_3
|
|
new-instance v0, Ly/l;
|
|
|
|
invoke-direct {v0, v6}, Ly/l;-><init>(Ljava/lang/String;)V
|
|
|
|
throw v0
|
|
|
|
:cond_4
|
|
new-instance v0, Ly/l;
|
|
|
|
invoke-direct {v0, v6}, Ly/l;-><init>(Ljava/lang/String;)V
|
|
|
|
throw v0
|
|
.end method
|
|
|
|
.method public bridge synthetic invoke()Ljava/lang/Object;
|
|
.locals 1
|
|
|
|
invoke-virtual {p0}, Lcom/discord/widgets/user/search/WidgetGlobalSearchModel$Companion$create$4$1;->invoke()Lcom/discord/widgets/user/search/WidgetGlobalSearchModel$MatchedResult;
|
|
|
|
move-result-object v0
|
|
|
|
return-object v0
|
|
.end method
|