apkfuckery/com.discord/smali/com/discord/widgets/channels/WidgetChannelTopic$Model$Co...

346 lines
10 KiB
Smali
Raw Normal View History

2019-02-04 20:08:30 +00:00
.class public final Lcom/discord/widgets/channels/WidgetChannelTopic$Model$Companion;
.super Ljava/lang/Object;
# annotations
.annotation system Ldalvik/annotation/EnclosingClass;
value = Lcom/discord/widgets/channels/WidgetChannelTopic$Model;
.end annotation
.annotation system Ldalvik/annotation/InnerClass;
accessFlags = 0x19
name = "Companion"
.end annotation
# direct methods
.method private constructor <init>()V
.locals 0
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
return-void
.end method
.method public synthetic constructor <init>(Lkotlin/jvm/internal/DefaultConstructorMarker;)V
.locals 0
invoke-direct {p0}, Lcom/discord/widgets/channels/WidgetChannelTopic$Model$Companion;-><init>()V
return-void
.end method
2019-02-04 20:20:43 +00:00
.method public static final synthetic access$get(Lcom/discord/widgets/channels/WidgetChannelTopic$Model$Companion;Landroid/content/Context;Lcom/discord/models/domain/ModelChannel;Lcom/discord/simpleast/core/parser/Parser;)Lrx/Observable;
2019-02-04 20:08:30 +00:00
.locals 0
2019-02-04 20:20:43 +00:00
invoke-direct {p0, p1, p2, p3}, Lcom/discord/widgets/channels/WidgetChannelTopic$Model$Companion;->get(Landroid/content/Context;Lcom/discord/models/domain/ModelChannel;Lcom/discord/simpleast/core/parser/Parser;)Lrx/Observable;
2019-02-04 20:08:30 +00:00
move-result-object p0
return-object p0
.end method
2019-02-04 20:20:43 +00:00
.method public static final synthetic access$preprocessSpoilers(Lcom/discord/widgets/channels/WidgetChannelTopic$Model$Companion;Ljava/util/List;Ljava/util/Set;)V
.locals 0
invoke-direct {p0, p1, p2}, Lcom/discord/widgets/channels/WidgetChannelTopic$Model$Companion;->preprocessSpoilers(Ljava/util/List;Ljava/util/Set;)V
return-void
.end method
.method private final get(Landroid/content/Context;Lcom/discord/models/domain/ModelChannel;Lcom/discord/simpleast/core/parser/Parser;)Lrx/Observable;
2019-02-04 20:08:30 +00:00
.locals 4
.annotation system Ldalvik/annotation/Signature;
value = {
"(",
"Landroid/content/Context;",
"Lcom/discord/models/domain/ModelChannel;",
2019-02-04 20:20:43 +00:00
"Lcom/discord/simpleast/core/parser/Parser<",
"Lcom/discord/utilities/textprocessing/MessageRenderContext;",
"Lcom/discord/simpleast/core/node/Node<",
"Lcom/discord/utilities/textprocessing/MessageRenderContext;",
">;>;)",
2019-02-04 20:08:30 +00:00
"Lrx/Observable<",
"Lcom/discord/widgets/channels/WidgetChannelTopic$Model;",
">;"
}
.end annotation
const/4 v0, 0x0
if-eqz p2, :cond_4
invoke-virtual {p2}, Lcom/discord/models/domain/ModelChannel;->isPrivate()Z
move-result v1
if-eqz v1, :cond_0
goto :goto_3
:cond_0
invoke-virtual {p2}, Lcom/discord/models/domain/ModelChannel;->getTopic()Ljava/lang/String;
move-result-object v1
if-eqz v1, :cond_3
invoke-virtual {p2}, Lcom/discord/models/domain/ModelChannel;->getTopic()Ljava/lang/String;
move-result-object v1
const-string v2, "channel.topic"
invoke-static {v1, v2}, Lkotlin/jvm/internal/j;->g(Ljava/lang/Object;Ljava/lang/String;)V
check-cast v1, Ljava/lang/CharSequence;
invoke-interface {v1}, Ljava/lang/CharSequence;->length()I
move-result v1
if-nez v1, :cond_1
const/4 v1, 0x1
goto :goto_0
:cond_1
const/4 v1, 0x0
:goto_0
if-eqz v1, :cond_2
goto :goto_2
:cond_2
2019-02-04 20:20:43 +00:00
sget-object v1, Lkotlin/a/z;->bPD:Lkotlin/a/z;
check-cast v1, Ljava/util/Set;
invoke-static {v1}, Lrx/subjects/BehaviorSubject;->cl(Ljava/lang/Object;)Lrx/subjects/BehaviorSubject;
2019-02-04 20:08:30 +00:00
move-result-object v1
invoke-virtual {p2}, Lcom/discord/models/domain/ModelChannel;->getTopic()Ljava/lang/String;
move-result-object v2
check-cast v2, Ljava/lang/CharSequence;
const/4 v3, 0x2
2019-02-04 20:20:43 +00:00
invoke-static {p3, v2, v0, v3, v0}, Lcom/discord/simpleast/core/parser/Parser;->parse$default(Lcom/discord/simpleast/core/parser/Parser;Ljava/lang/CharSequence;Ljava/util/List;ILjava/lang/Object;)Ljava/util/List;
2019-02-04 20:08:30 +00:00
2019-02-04 20:20:43 +00:00
move-result-object p3
2019-02-04 20:08:30 +00:00
2019-02-04 20:20:43 +00:00
invoke-static {p3}, Lrx/Observable;->ca(Ljava/lang/Object;)Lrx/Observable;
2019-02-04 20:08:30 +00:00
2019-02-04 20:20:43 +00:00
move-result-object p3
move-object v0, v1
check-cast v0, Lrx/Observable;
sget-object v2, Lcom/discord/widgets/channels/WidgetChannelTopic$Model$Companion$get$2;->INSTANCE:Lcom/discord/widgets/channels/WidgetChannelTopic$Model$Companion$get$2;
check-cast v2, Lrx/functions/Func2;
invoke-static {p3, v0, v2}, Lrx/Observable;->a(Lrx/Observable;Lrx/Observable;Lrx/functions/Func2;)Lrx/Observable;
move-result-object p3
2019-02-04 20:08:30 +00:00
2019-02-04 20:20:43 +00:00
new-instance v0, Lcom/discord/widgets/channels/WidgetChannelTopic$Model$Companion$get$3;
2019-02-04 20:08:30 +00:00
2019-02-04 20:20:43 +00:00
invoke-direct {v0, p2, p1, v1}, Lcom/discord/widgets/channels/WidgetChannelTopic$Model$Companion$get$3;-><init>(Lcom/discord/models/domain/ModelChannel;Landroid/content/Context;Lrx/subjects/BehaviorSubject;)V
2019-02-04 20:08:30 +00:00
2019-02-04 20:20:43 +00:00
check-cast v0, Lrx/functions/b;
2019-02-04 20:08:30 +00:00
2019-02-04 20:20:43 +00:00
invoke-virtual {p3, v0}, Lrx/Observable;->g(Lrx/functions/b;)Lrx/Observable;
2019-02-04 20:08:30 +00:00
move-result-object p1
2019-02-04 20:20:43 +00:00
const-string p2, "Observable\n .\u2026 }\n }"
2019-02-04 20:08:30 +00:00
:goto_1
invoke-static {p1, p2}, Lkotlin/jvm/internal/j;->g(Ljava/lang/Object;Ljava/lang/String;)V
return-object p1
:cond_3
:goto_2
new-instance p2, Lcom/discord/widgets/channels/WidgetChannelTopic$Model;
2019-02-04 20:20:43 +00:00
const p3, 0x7f120329
2019-02-04 20:08:30 +00:00
2019-02-04 20:20:43 +00:00
invoke-virtual {p1, p3}, Landroid/content/Context;->getString(I)Ljava/lang/String;
2019-02-04 20:08:30 +00:00
move-result-object p1
check-cast p1, Ljava/lang/CharSequence;
invoke-direct {p2, p1}, Lcom/discord/widgets/channels/WidgetChannelTopic$Model;-><init>(Ljava/lang/CharSequence;)V
invoke-static {p2}, Lrx/Observable;->ca(Ljava/lang/Object;)Lrx/Observable;
move-result-object p1
const-string p2, "Observable.just(Model(co\u2026ng.channel_topic_empty)))"
goto :goto_1
:cond_4
:goto_3
new-instance p1, Lcom/discord/widgets/channels/WidgetChannelTopic$Model;
invoke-direct {p1, v0}, Lcom/discord/widgets/channels/WidgetChannelTopic$Model;-><init>(Ljava/lang/CharSequence;)V
invoke-static {p1}, Lrx/Observable;->ca(Ljava/lang/Object;)Lrx/Observable;
move-result-object p1
const-string p2, "Observable.just(Model(null))"
goto :goto_1
.end method
2019-02-04 20:20:43 +00:00
.method private final preprocessSpoilers(Ljava/util/List;Ljava/util/Set;)V
.locals 4
.annotation system Ldalvik/annotation/Signature;
value = {
"(",
"Ljava/util/List<",
"Lcom/discord/simpleast/core/node/Node<",
"Lcom/discord/utilities/textprocessing/MessageRenderContext;",
">;>;",
"Ljava/util/Set<",
"Ljava/lang/Integer;",
">;)V"
}
.end annotation
new-instance v0, Lcom/discord/utilities/textprocessing/MessagePreprocessor;
const-wide/16 v1, -0x1
const/4 v3, 0x0
invoke-direct {v0, v1, v2, v3}, Lcom/discord/utilities/textprocessing/MessagePreprocessor;-><init>(JLcom/discord/stores/StoreMessageState$State;)V
check-cast p1, Ljava/util/Collection;
invoke-virtual {v0, p1}, Lcom/discord/utilities/textprocessing/MessagePreprocessor;->process(Ljava/util/Collection;)V
invoke-virtual {v0}, Lcom/discord/utilities/textprocessing/MessagePreprocessor;->getSpoilers()Ljava/util/List;
move-result-object p1
if-eqz p1, :cond_0
check-cast p1, Ljava/lang/Iterable;
invoke-interface {p1}, Ljava/lang/Iterable;->iterator()Ljava/util/Iterator;
move-result-object p1
:goto_0
invoke-interface {p1}, Ljava/util/Iterator;->hasNext()Z
move-result v0
if-eqz v0, :cond_0
invoke-interface {p1}, Ljava/util/Iterator;->next()Ljava/lang/Object;
move-result-object v0
check-cast v0, Lcom/discord/utilities/textprocessing/node/SpoilerNode;
invoke-virtual {v0}, Lcom/discord/utilities/textprocessing/node/SpoilerNode;->getId()I
move-result v1
invoke-virtual {v0}, Lcom/discord/utilities/textprocessing/node/SpoilerNode;->getId()I
move-result v2
invoke-static {v2}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;
move-result-object v2
invoke-interface {p2, v2}, Ljava/util/Set;->contains(Ljava/lang/Object;)Z
move-result v2
invoke-virtual {v0, v1, v2}, Lcom/discord/utilities/textprocessing/node/SpoilerNode;->updateState(IZ)V
goto :goto_0
:cond_0
return-void
.end method
2019-02-04 20:08:30 +00:00
# virtual methods
.method public final get(Landroid/content/Context;)Lrx/Observable;
2019-02-04 20:20:43 +00:00
.locals 3
2019-02-04 20:08:30 +00:00
.annotation system Ldalvik/annotation/Signature;
value = {
"(",
"Landroid/content/Context;",
")",
"Lrx/Observable<",
"Lcom/discord/widgets/channels/WidgetChannelTopic$Model;",
">;"
}
.end annotation
const-string v0, "context"
invoke-static {p1, v0}, Lkotlin/jvm/internal/j;->h(Ljava/lang/Object;Ljava/lang/String;)V
2019-02-04 20:20:43 +00:00
const/4 v0, 0x0
2019-02-04 20:08:30 +00:00
2019-02-04 20:20:43 +00:00
const/4 v1, 0x1
2019-02-04 20:08:30 +00:00
2019-02-04 20:20:43 +00:00
invoke-static {v0, v1}, Lcom/discord/utilities/textprocessing/Parsers;->createParser(ZZ)Lcom/discord/simpleast/core/parser/Parser;
2019-02-04 20:08:30 +00:00
move-result-object v0
2019-02-04 20:20:43 +00:00
invoke-static {}, Lcom/discord/stores/StoreStream;->getChannelsSelected()Lcom/discord/stores/StoreChannelsSelected;
move-result-object v1
invoke-virtual {v1}, Lcom/discord/stores/StoreChannelsSelected;->get()Lrx/Observable;
move-result-object v1
new-instance v2, Lcom/discord/widgets/channels/WidgetChannelTopic$Model$Companion$get$1;
2019-02-04 20:08:30 +00:00
2019-02-04 20:20:43 +00:00
invoke-direct {v2, p1, v0}, Lcom/discord/widgets/channels/WidgetChannelTopic$Model$Companion$get$1;-><init>(Landroid/content/Context;Lcom/discord/simpleast/core/parser/Parser;)V
2019-02-04 20:08:30 +00:00
2019-02-04 20:20:43 +00:00
check-cast v2, Lrx/functions/b;
2019-02-04 20:08:30 +00:00
2019-02-04 20:20:43 +00:00
invoke-virtual {v1, v2}, Lrx/Observable;->g(Lrx/functions/b;)Lrx/Observable;
2019-02-04 20:08:30 +00:00
move-result-object p1
2019-02-04 20:20:43 +00:00
const-string v0, "StoreStream\n \u2026, channel, topicParser) }"
2019-02-04 20:08:30 +00:00
invoke-static {p1, v0}, Lkotlin/jvm/internal/j;->g(Ljava/lang/Object;Ljava/lang/String;)V
invoke-static {p1}, Lcom/discord/utilities/rx/ObservableExtensionsKt;->computationBuffered(Lrx/Observable;)Lrx/Observable;
move-result-object p1
2019-02-04 20:17:36 +00:00
invoke-virtual {p1}, Lrx/Observable;->KD()Lrx/Observable;
2019-02-04 20:08:30 +00:00
move-result-object p1
const-string v0, "StoreStream\n \u2026 .distinctUntilChanged()"
invoke-static {p1, v0}, Lkotlin/jvm/internal/j;->g(Ljava/lang/Object;Ljava/lang/String;)V
return-object p1
.end method