2019-07-24 11:27:29 +00:00
|
|
|
.class public final Lcom/discord/widgets/chat/list/WidgetChatListAdapterItemEmbed$Companion;
|
|
|
|
.super Ljava/lang/Object;
|
|
|
|
.source "WidgetChatListAdapterItemEmbed.kt"
|
|
|
|
|
|
|
|
|
|
|
|
# annotations
|
|
|
|
.annotation system Ldalvik/annotation/EnclosingClass;
|
|
|
|
value = Lcom/discord/widgets/chat/list/WidgetChatListAdapterItemEmbed;
|
|
|
|
.end annotation
|
|
|
|
|
|
|
|
.annotation system Ldalvik/annotation/InnerClass;
|
|
|
|
accessFlags = 0x19
|
|
|
|
name = "Companion"
|
|
|
|
.end annotation
|
|
|
|
|
|
|
|
|
|
|
|
# direct methods
|
2019-12-06 03:29:40 +00:00
|
|
|
.method public constructor <init>()V
|
2019-07-24 11:27:29 +00:00
|
|
|
.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/chat/list/WidgetChatListAdapterItemEmbed$Companion;-><init>()V
|
|
|
|
|
|
|
|
return-void
|
|
|
|
.end method
|
|
|
|
|
2020-03-16 23:08:34 +00:00
|
|
|
.method public static final synthetic access$bindUrlOnClick(Lcom/discord/widgets/chat/list/WidgetChatListAdapterItemEmbed$Companion;Landroid/view/View;Ljava/lang/String;Ljava/lang/String;)V
|
2019-07-24 11:27:29 +00:00
|
|
|
.locals 0
|
|
|
|
|
2020-03-16 23:08:34 +00:00
|
|
|
invoke-direct {p0, p1, p2, p3}, Lcom/discord/widgets/chat/list/WidgetChatListAdapterItemEmbed$Companion;->bindUrlOnClick(Landroid/view/View;Ljava/lang/String;Ljava/lang/String;)V
|
2019-07-24 11:27:29 +00:00
|
|
|
|
|
|
|
return-void
|
|
|
|
.end method
|
|
|
|
|
|
|
|
.method public static final synthetic access$configureEmbedImage(Lcom/discord/widgets/chat/list/WidgetChatListAdapterItemEmbed$Companion;Landroid/widget/ImageView;ILcom/discord/models/domain/ModelMessageEmbed$Item;I)V
|
|
|
|
.locals 0
|
|
|
|
|
|
|
|
invoke-direct {p0, p1, p2, p3, p4}, Lcom/discord/widgets/chat/list/WidgetChatListAdapterItemEmbed$Companion;->configureEmbedImage(Landroid/widget/ImageView;ILcom/discord/models/domain/ModelMessageEmbed$Item;I)V
|
|
|
|
|
|
|
|
return-void
|
|
|
|
.end method
|
|
|
|
|
|
|
|
.method public static final synthetic access$createTitlesParser(Lcom/discord/widgets/chat/list/WidgetChatListAdapterItemEmbed$Companion;)Lcom/discord/simpleast/core/parser/Parser;
|
|
|
|
.locals 0
|
|
|
|
|
|
|
|
invoke-direct {p0}, Lcom/discord/widgets/chat/list/WidgetChatListAdapterItemEmbed$Companion;->createTitlesParser()Lcom/discord/simpleast/core/parser/Parser;
|
|
|
|
|
|
|
|
move-result-object p0
|
|
|
|
|
|
|
|
return-object p0
|
|
|
|
.end method
|
|
|
|
|
|
|
|
.method public static final synthetic access$getEmbedFieldVisibleIndices(Lcom/discord/widgets/chat/list/WidgetChatListAdapterItemEmbed$Companion;Ljava/util/Map;ILjava/lang/String;)Ljava/util/List;
|
|
|
|
.locals 0
|
|
|
|
|
|
|
|
invoke-direct {p0, p1, p2, p3}, Lcom/discord/widgets/chat/list/WidgetChatListAdapterItemEmbed$Companion;->getEmbedFieldVisibleIndices(Ljava/util/Map;ILjava/lang/String;)Ljava/util/List;
|
|
|
|
|
|
|
|
move-result-object p0
|
|
|
|
|
|
|
|
return-object p0
|
|
|
|
.end method
|
|
|
|
|
|
|
|
.method public static final synthetic access$getModel(Lcom/discord/widgets/chat/list/WidgetChatListAdapterItemEmbed$Companion;Lcom/discord/widgets/chat/list/WidgetChatListAdapterItemEmbed$Model;)Lrx/Observable;
|
|
|
|
.locals 0
|
|
|
|
|
|
|
|
invoke-direct {p0, p1}, Lcom/discord/widgets/chat/list/WidgetChatListAdapterItemEmbed$Companion;->getModel(Lcom/discord/widgets/chat/list/WidgetChatListAdapterItemEmbed$Model;)Lrx/Observable;
|
|
|
|
|
|
|
|
move-result-object p0
|
|
|
|
|
|
|
|
return-object p0
|
|
|
|
.end method
|
|
|
|
|
2020-03-16 23:08:34 +00:00
|
|
|
.method private final bindUrlOnClick(Landroid/view/View;Ljava/lang/String;Ljava/lang/String;)V
|
2019-07-24 11:27:29 +00:00
|
|
|
.locals 1
|
|
|
|
|
|
|
|
if-eqz p2, :cond_0
|
|
|
|
|
|
|
|
new-instance v0, Lcom/discord/widgets/chat/list/WidgetChatListAdapterItemEmbed$Companion$bindUrlOnClick$1;
|
|
|
|
|
2020-03-16 23:08:34 +00:00
|
|
|
invoke-direct {v0, p2, p3}, Lcom/discord/widgets/chat/list/WidgetChatListAdapterItemEmbed$Companion$bindUrlOnClick$1;-><init>(Ljava/lang/String;Ljava/lang/String;)V
|
2019-07-24 11:27:29 +00:00
|
|
|
|
|
|
|
invoke-virtual {p1, v0}, Landroid/view/View;->setOnClickListener(Landroid/view/View$OnClickListener;)V
|
|
|
|
|
2019-12-06 03:29:40 +00:00
|
|
|
goto :goto_0
|
2019-07-24 11:27:29 +00:00
|
|
|
|
|
|
|
:cond_0
|
|
|
|
const/4 p2, 0x0
|
|
|
|
|
|
|
|
invoke-virtual {p1, p2}, Landroid/view/View;->setOnClickListener(Landroid/view/View$OnClickListener;)V
|
|
|
|
|
2019-12-06 03:29:40 +00:00
|
|
|
:goto_0
|
2019-07-24 11:27:29 +00:00
|
|
|
return-void
|
|
|
|
.end method
|
|
|
|
|
|
|
|
.method private final configureEmbedImage(Landroid/widget/ImageView;IIILjava/lang/String;I)V
|
|
|
|
.locals 9
|
|
|
|
|
|
|
|
if-nez p5, :cond_0
|
|
|
|
|
|
|
|
return-void
|
|
|
|
|
|
|
|
:cond_0
|
|
|
|
const/4 v0, 0x0
|
|
|
|
|
|
|
|
invoke-virtual {p1, v0}, Landroid/widget/ImageView;->setVisibility(I)V
|
|
|
|
|
|
|
|
sget-object v1, Lcom/discord/utilities/embed/EmbedResourceUtils;->INSTANCE:Lcom/discord/utilities/embed/EmbedResourceUtils;
|
|
|
|
|
|
|
|
invoke-static {}, Lcom/discord/widgets/chat/list/WidgetChatListAdapterItemEmbed;->access$getMAX_IMAGE_VIEW_HEIGHT_PX$cp()I
|
|
|
|
|
|
|
|
move-result v5
|
|
|
|
|
|
|
|
move v2, p3
|
|
|
|
|
|
|
|
move v3, p4
|
|
|
|
|
|
|
|
move v4, p2
|
|
|
|
|
|
|
|
move v6, p6
|
|
|
|
|
|
|
|
invoke-virtual/range {v1 .. v6}, Lcom/discord/utilities/embed/EmbedResourceUtils;->calculateSize(IIIII)Lkotlin/Pair;
|
|
|
|
|
|
|
|
move-result-object p2
|
|
|
|
|
2019-10-09 23:16:36 +00:00
|
|
|
invoke-virtual {p2}, Lkotlin/Pair;->component1()Ljava/lang/Object;
|
|
|
|
|
|
|
|
move-result-object p3
|
2019-07-24 11:27:29 +00:00
|
|
|
|
|
|
|
check-cast p3, Ljava/lang/Number;
|
|
|
|
|
|
|
|
invoke-virtual {p3}, Ljava/lang/Number;->intValue()I
|
|
|
|
|
|
|
|
move-result p3
|
|
|
|
|
2019-10-09 23:16:36 +00:00
|
|
|
invoke-virtual {p2}, Lkotlin/Pair;->component2()Ljava/lang/Object;
|
|
|
|
|
|
|
|
move-result-object p2
|
2019-07-24 11:27:29 +00:00
|
|
|
|
|
|
|
check-cast p2, Ljava/lang/Number;
|
|
|
|
|
|
|
|
invoke-virtual {p2}, Ljava/lang/Number;->intValue()I
|
|
|
|
|
|
|
|
move-result p2
|
|
|
|
|
|
|
|
invoke-virtual {p1}, Landroid/widget/ImageView;->getLayoutParams()Landroid/view/ViewGroup$LayoutParams;
|
|
|
|
|
|
|
|
move-result-object p4
|
|
|
|
|
|
|
|
iget p6, p4, Landroid/view/ViewGroup$LayoutParams;->width:I
|
|
|
|
|
|
|
|
if-ne p6, p3, :cond_1
|
|
|
|
|
|
|
|
iget p6, p4, Landroid/view/ViewGroup$LayoutParams;->height:I
|
|
|
|
|
|
|
|
if-eq p6, p2, :cond_2
|
|
|
|
|
|
|
|
:cond_1
|
|
|
|
iput p3, p4, Landroid/view/ViewGroup$LayoutParams;->width:I
|
|
|
|
|
|
|
|
iput p2, p4, Landroid/view/ViewGroup$LayoutParams;->height:I
|
|
|
|
|
|
|
|
invoke-virtual {p1}, Landroid/widget/ImageView;->requestLayout()V
|
|
|
|
|
|
|
|
:cond_2
|
|
|
|
sget-object p4, Lcom/discord/utilities/embed/EmbedResourceUtils;->INSTANCE:Lcom/discord/utilities/embed/EmbedResourceUtils;
|
|
|
|
|
|
|
|
invoke-virtual {p4, p5, p3, p2}, Lcom/discord/utilities/embed/EmbedResourceUtils;->getPreviewUrls(Ljava/lang/String;II)[Ljava/lang/String;
|
|
|
|
|
|
|
|
move-result-object v1
|
|
|
|
|
|
|
|
const/4 v2, 0x0
|
|
|
|
|
|
|
|
const/4 v3, 0x0
|
|
|
|
|
|
|
|
const/4 v4, 0x0
|
|
|
|
|
|
|
|
const/4 v5, 0x0
|
|
|
|
|
|
|
|
const/4 v6, 0x0
|
|
|
|
|
|
|
|
const/16 v7, 0x7c
|
|
|
|
|
|
|
|
const/4 v8, 0x0
|
|
|
|
|
|
|
|
move-object v0, p1
|
|
|
|
|
|
|
|
invoke-static/range {v0 .. v8}, Lcom/discord/utilities/images/MGImages;->setImage$default(Landroid/widget/ImageView;[Ljava/lang/String;IIZLkotlin/jvm/functions/Function1;Lcom/discord/utilities/images/MGImages$ChangeDetector;ILjava/lang/Object;)V
|
|
|
|
|
|
|
|
return-void
|
|
|
|
.end method
|
|
|
|
|
|
|
|
.method private final configureEmbedImage(Landroid/widget/ImageView;ILcom/discord/models/domain/ModelMessageEmbed$Item;I)V
|
|
|
|
.locals 7
|
|
|
|
|
|
|
|
invoke-virtual {p3}, Lcom/discord/models/domain/ModelMessageEmbed$Item;->getWidth()I
|
|
|
|
|
|
|
|
move-result v3
|
|
|
|
|
|
|
|
invoke-virtual {p3}, Lcom/discord/models/domain/ModelMessageEmbed$Item;->getHeight()I
|
|
|
|
|
|
|
|
move-result v4
|
|
|
|
|
|
|
|
invoke-virtual {p3}, Lcom/discord/models/domain/ModelMessageEmbed$Item;->getProxyUrl()Ljava/lang/String;
|
|
|
|
|
|
|
|
move-result-object v5
|
|
|
|
|
2019-12-06 03:29:40 +00:00
|
|
|
move-object v0, p0
|
|
|
|
|
2019-07-24 11:27:29 +00:00
|
|
|
move-object v1, p1
|
|
|
|
|
|
|
|
move v2, p2
|
|
|
|
|
|
|
|
move v6, p4
|
|
|
|
|
|
|
|
invoke-direct/range {v0 .. v6}, Lcom/discord/widgets/chat/list/WidgetChatListAdapterItemEmbed$Companion;->configureEmbedImage(Landroid/widget/ImageView;IIILjava/lang/String;I)V
|
|
|
|
|
|
|
|
return-void
|
|
|
|
.end method
|
|
|
|
|
2019-12-06 03:29:40 +00:00
|
|
|
.method public static synthetic configureEmbedImage$default(Lcom/discord/widgets/chat/list/WidgetChatListAdapterItemEmbed$Companion;Landroid/widget/ImageView;IIILjava/lang/String;IILjava/lang/Object;)V
|
2019-07-24 11:27:29 +00:00
|
|
|
.locals 7
|
|
|
|
|
|
|
|
and-int/lit8 p7, p7, 0x20
|
|
|
|
|
|
|
|
if-eqz p7, :cond_0
|
|
|
|
|
|
|
|
const/4 p6, 0x0
|
|
|
|
|
|
|
|
const/4 v6, 0x0
|
|
|
|
|
|
|
|
goto :goto_0
|
|
|
|
|
|
|
|
:cond_0
|
|
|
|
move v6, p6
|
|
|
|
|
|
|
|
:goto_0
|
|
|
|
move-object v0, p0
|
|
|
|
|
|
|
|
move-object v1, p1
|
|
|
|
|
|
|
|
move v2, p2
|
|
|
|
|
|
|
|
move v3, p3
|
|
|
|
|
|
|
|
move v4, p4
|
|
|
|
|
|
|
|
move-object v5, p5
|
|
|
|
|
|
|
|
invoke-direct/range {v0 .. v6}, Lcom/discord/widgets/chat/list/WidgetChatListAdapterItemEmbed$Companion;->configureEmbedImage(Landroid/widget/ImageView;IIILjava/lang/String;I)V
|
|
|
|
|
|
|
|
return-void
|
|
|
|
.end method
|
|
|
|
|
2019-12-06 03:29:40 +00:00
|
|
|
.method public static synthetic configureEmbedImage$default(Lcom/discord/widgets/chat/list/WidgetChatListAdapterItemEmbed$Companion;Landroid/widget/ImageView;ILcom/discord/models/domain/ModelMessageEmbed$Item;IILjava/lang/Object;)V
|
2019-07-24 11:27:29 +00:00
|
|
|
.locals 0
|
|
|
|
|
|
|
|
and-int/lit8 p5, p5, 0x8
|
|
|
|
|
|
|
|
if-eqz p5, :cond_0
|
|
|
|
|
|
|
|
const/4 p4, 0x0
|
|
|
|
|
|
|
|
:cond_0
|
|
|
|
invoke-direct {p0, p1, p2, p3, p4}, Lcom/discord/widgets/chat/list/WidgetChatListAdapterItemEmbed$Companion;->configureEmbedImage(Landroid/widget/ImageView;ILcom/discord/models/domain/ModelMessageEmbed$Item;I)V
|
|
|
|
|
|
|
|
return-void
|
|
|
|
.end method
|
|
|
|
|
|
|
|
.method private final createTitlesParser()Lcom/discord/simpleast/core/parser/Parser;
|
|
|
|
.locals 1
|
|
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
|
|
value = {
|
|
|
|
"()",
|
|
|
|
"Lcom/discord/simpleast/core/parser/Parser<",
|
|
|
|
"Lcom/discord/utilities/textprocessing/MessageRenderContext;",
|
|
|
|
"Lcom/discord/simpleast/core/node/Node<",
|
|
|
|
"Lcom/discord/utilities/textprocessing/MessageRenderContext;",
|
|
|
|
">;",
|
|
|
|
"Lcom/discord/utilities/textprocessing/MessageParseState;",
|
|
|
|
">;"
|
|
|
|
}
|
|
|
|
.end annotation
|
|
|
|
|
|
|
|
const/4 v0, 0x0
|
|
|
|
|
|
|
|
invoke-static {v0, v0}, Lcom/discord/utilities/textprocessing/Parsers;->createParser(ZZ)Lcom/discord/simpleast/core/parser/Parser;
|
|
|
|
|
|
|
|
move-result-object v0
|
|
|
|
|
|
|
|
return-object v0
|
|
|
|
.end method
|
|
|
|
|
|
|
|
.method private final getEmbedFieldVisibleIndices(Ljava/util/Map;ILjava/lang/String;)Ljava/util/List;
|
|
|
|
.locals 5
|
|
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
|
|
value = {
|
|
|
|
"(",
|
|
|
|
"Ljava/util/Map<",
|
|
|
|
"Ljava/lang/Integer;",
|
|
|
|
"+",
|
|
|
|
"Ljava/util/Set<",
|
|
|
|
"Ljava/lang/String;",
|
|
|
|
">;>;I",
|
|
|
|
"Ljava/lang/String;",
|
|
|
|
")",
|
|
|
|
"Ljava/util/List<",
|
|
|
|
"Ljava/lang/Integer;",
|
|
|
|
">;"
|
|
|
|
}
|
|
|
|
.end annotation
|
|
|
|
|
|
|
|
invoke-static {p2}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;
|
|
|
|
|
|
|
|
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, Ljava/util/Set;
|
|
|
|
|
2019-10-09 23:16:36 +00:00
|
|
|
const/4 p2, 0x0
|
|
|
|
|
2019-12-06 03:29:40 +00:00
|
|
|
if-eqz p1, :cond_7
|
2019-07-24 11:27:29 +00:00
|
|
|
|
2019-10-09 23:16:36 +00:00
|
|
|
new-instance v0, Ljava/util/ArrayList;
|
2019-07-24 11:27:29 +00:00
|
|
|
|
2019-10-09 23:16:36 +00:00
|
|
|
invoke-direct {v0}, Ljava/util/ArrayList;-><init>()V
|
2019-07-24 11:27:29 +00:00
|
|
|
|
|
|
|
invoke-interface {p1}, Ljava/lang/Iterable;->iterator()Ljava/util/Iterator;
|
|
|
|
|
|
|
|
move-result-object p1
|
|
|
|
|
|
|
|
:cond_0
|
|
|
|
:goto_0
|
|
|
|
invoke-interface {p1}, Ljava/util/Iterator;->hasNext()Z
|
|
|
|
|
2019-10-09 23:16:36 +00:00
|
|
|
move-result v1
|
2019-07-24 11:27:29 +00:00
|
|
|
|
2019-12-06 03:29:40 +00:00
|
|
|
const/4 v2, 0x0
|
|
|
|
|
2019-10-09 23:16:36 +00:00
|
|
|
if-eqz v1, :cond_1
|
2019-07-24 11:27:29 +00:00
|
|
|
|
|
|
|
invoke-interface {p1}, Ljava/util/Iterator;->next()Ljava/lang/Object;
|
|
|
|
|
2019-10-09 23:16:36 +00:00
|
|
|
move-result-object v1
|
2019-07-24 11:27:29 +00:00
|
|
|
|
2019-12-06 03:29:40 +00:00
|
|
|
move-object v3, v1
|
2019-07-24 11:27:29 +00:00
|
|
|
|
2019-12-06 03:29:40 +00:00
|
|
|
check-cast v3, Ljava/lang/String;
|
2019-07-24 11:27:29 +00:00
|
|
|
|
2019-10-09 23:16:36 +00:00
|
|
|
const/4 v4, 0x2
|
2019-07-24 11:27:29 +00:00
|
|
|
|
2020-03-14 04:13:36 +00:00
|
|
|
invoke-static {v3, p3, v2, v4}, Lw/a0/p;->startsWith$default(Ljava/lang/String;Ljava/lang/String;ZI)Z
|
2019-10-09 23:16:36 +00:00
|
|
|
|
|
|
|
move-result v2
|
2019-07-24 11:27:29 +00:00
|
|
|
|
2019-10-09 23:16:36 +00:00
|
|
|
if-eqz v2, :cond_0
|
|
|
|
|
|
|
|
invoke-interface {v0, v1}, Ljava/util/Collection;->add(Ljava/lang/Object;)Z
|
2019-07-24 11:27:29 +00:00
|
|
|
|
|
|
|
goto :goto_0
|
|
|
|
|
|
|
|
:cond_1
|
|
|
|
new-instance p1, Ljava/util/ArrayList;
|
|
|
|
|
|
|
|
invoke-direct {p1}, Ljava/util/ArrayList;-><init>()V
|
|
|
|
|
2019-10-09 23:16:36 +00:00
|
|
|
invoke-interface {v0}, Ljava/lang/Iterable;->iterator()Ljava/util/Iterator;
|
2019-07-24 11:27:29 +00:00
|
|
|
|
2019-12-06 03:29:40 +00:00
|
|
|
move-result-object v0
|
2019-07-24 11:27:29 +00:00
|
|
|
|
|
|
|
:cond_2
|
|
|
|
:goto_1
|
2019-12-06 03:29:40 +00:00
|
|
|
invoke-interface {v0}, Ljava/util/Iterator;->hasNext()Z
|
2019-07-24 11:27:29 +00:00
|
|
|
|
2019-12-06 03:29:40 +00:00
|
|
|
move-result v1
|
2019-07-24 11:27:29 +00:00
|
|
|
|
2019-12-06 03:29:40 +00:00
|
|
|
if-eqz v1, :cond_8
|
2019-07-24 11:27:29 +00:00
|
|
|
|
2019-12-06 03:29:40 +00:00
|
|
|
invoke-interface {v0}, Ljava/util/Iterator;->next()Ljava/lang/Object;
|
2019-07-24 11:27:29 +00:00
|
|
|
|
2019-12-06 03:29:40 +00:00
|
|
|
move-result-object v1
|
2019-07-24 11:27:29 +00:00
|
|
|
|
2019-12-06 03:29:40 +00:00
|
|
|
check-cast v1, Ljava/lang/String;
|
2019-07-24 11:27:29 +00:00
|
|
|
|
|
|
|
invoke-virtual {p3}, Ljava/lang/String;->length()I
|
|
|
|
|
2019-12-06 03:29:40 +00:00
|
|
|
move-result v2
|
2019-07-24 11:27:29 +00:00
|
|
|
|
2019-12-06 03:29:40 +00:00
|
|
|
const/4 v3, 0x1
|
2019-07-24 11:27:29 +00:00
|
|
|
|
2019-12-06 03:29:40 +00:00
|
|
|
add-int/2addr v2, v3
|
2019-07-24 11:27:29 +00:00
|
|
|
|
2019-12-06 03:29:40 +00:00
|
|
|
if-eqz v1, :cond_6
|
2019-07-24 11:27:29 +00:00
|
|
|
|
2019-12-06 03:29:40 +00:00
|
|
|
if-ltz v2, :cond_3
|
2019-07-24 11:27:29 +00:00
|
|
|
|
2019-12-06 03:29:40 +00:00
|
|
|
goto :goto_2
|
2019-07-24 11:27:29 +00:00
|
|
|
|
2019-12-06 03:29:40 +00:00
|
|
|
:cond_3
|
|
|
|
const/4 v3, 0x0
|
2019-07-24 11:27:29 +00:00
|
|
|
|
2019-12-06 03:29:40 +00:00
|
|
|
:goto_2
|
|
|
|
if-eqz v3, :cond_5
|
2019-07-24 11:27:29 +00:00
|
|
|
|
2019-12-06 03:29:40 +00:00
|
|
|
invoke-virtual {v1}, Ljava/lang/String;->length()I
|
2019-07-24 11:27:29 +00:00
|
|
|
|
2019-12-06 03:29:40 +00:00
|
|
|
move-result v3
|
2019-07-24 11:27:29 +00:00
|
|
|
|
2019-12-06 03:29:40 +00:00
|
|
|
if-le v2, v3, :cond_4
|
|
|
|
|
|
|
|
move v2, v3
|
2019-07-24 11:27:29 +00:00
|
|
|
|
2019-10-09 23:16:36 +00:00
|
|
|
:cond_4
|
2019-12-06 03:29:40 +00:00
|
|
|
invoke-virtual {v1, v2}, Ljava/lang/String;->substring(I)Ljava/lang/String;
|
|
|
|
|
|
|
|
move-result-object v1
|
|
|
|
|
|
|
|
const-string v2, "(this as java.lang.String).substring(startIndex)"
|
|
|
|
|
2020-02-20 19:33:18 +00:00
|
|
|
invoke-static {v1, v2}, Lw/u/b/j;->checkExpressionValueIsNotNull(Ljava/lang/Object;Ljava/lang/String;)V
|
2019-12-06 03:29:40 +00:00
|
|
|
|
2020-03-14 04:13:36 +00:00
|
|
|
invoke-static {v1}, Lw/a0/o;->toIntOrNull(Ljava/lang/String;)Ljava/lang/Integer;
|
2019-12-06 03:29:40 +00:00
|
|
|
|
|
|
|
move-result-object v1
|
|
|
|
|
|
|
|
if-eqz v1, :cond_2
|
|
|
|
|
|
|
|
invoke-interface {p1, v1}, Ljava/util/Collection;->add(Ljava/lang/Object;)Z
|
|
|
|
|
|
|
|
goto :goto_1
|
|
|
|
|
|
|
|
:cond_5
|
|
|
|
const-string p1, "Requested character count "
|
|
|
|
|
|
|
|
const-string p2, " is less than zero."
|
|
|
|
|
|
|
|
invoke-static {p1, v2, p2}, Le/e/b/a/a;->a(Ljava/lang/String;ILjava/lang/String;)Ljava/lang/String;
|
|
|
|
|
|
|
|
move-result-object p1
|
|
|
|
|
|
|
|
new-instance p2, Ljava/lang/IllegalArgumentException;
|
|
|
|
|
|
|
|
invoke-virtual {p1}, Ljava/lang/Object;->toString()Ljava/lang/String;
|
|
|
|
|
|
|
|
move-result-object p1
|
|
|
|
|
|
|
|
invoke-direct {p2, p1}, Ljava/lang/IllegalArgumentException;-><init>(Ljava/lang/String;)V
|
|
|
|
|
|
|
|
throw p2
|
|
|
|
|
|
|
|
:cond_6
|
|
|
|
const-string p1, "$this$drop"
|
|
|
|
|
2020-02-20 19:33:18 +00:00
|
|
|
invoke-static {p1}, Lw/u/b/j;->a(Ljava/lang/String;)V
|
2019-12-06 03:29:40 +00:00
|
|
|
|
|
|
|
throw p2
|
|
|
|
|
|
|
|
:cond_7
|
|
|
|
move-object p1, p2
|
|
|
|
|
|
|
|
:cond_8
|
|
|
|
return-object p1
|
2019-07-24 11:27:29 +00:00
|
|
|
.end method
|
|
|
|
|
|
|
|
.method private final getModel(Lcom/discord/widgets/chat/list/WidgetChatListAdapterItemEmbed$Model;)Lrx/Observable;
|
|
|
|
.locals 9
|
|
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
|
|
value = {
|
|
|
|
"(",
|
|
|
|
"Lcom/discord/widgets/chat/list/WidgetChatListAdapterItemEmbed$Model;",
|
|
|
|
")",
|
|
|
|
"Lrx/Observable<",
|
|
|
|
"Lcom/discord/widgets/chat/list/WidgetChatListAdapterItemEmbed$Model;",
|
|
|
|
">;"
|
|
|
|
}
|
|
|
|
.end annotation
|
|
|
|
|
|
|
|
invoke-virtual {p1}, Lcom/discord/widgets/chat/list/WidgetChatListAdapterItemEmbed$Model;->getEmbedEntry()Lcom/discord/widgets/chat/list/entries/EmbedEntry;
|
|
|
|
|
|
|
|
move-result-object v0
|
|
|
|
|
|
|
|
invoke-virtual {p1}, Lcom/discord/widgets/chat/list/WidgetChatListAdapterItemEmbed$Model;->getParsedDescription()Ljava/util/Collection;
|
|
|
|
|
|
|
|
move-result-object v1
|
|
|
|
|
|
|
|
invoke-virtual {p1}, Lcom/discord/widgets/chat/list/WidgetChatListAdapterItemEmbed$Model;->getParsedFields()Ljava/util/List;
|
|
|
|
|
|
|
|
move-result-object p1
|
|
|
|
|
|
|
|
new-instance v2, Lcom/discord/utilities/textprocessing/TagsBuilder;
|
|
|
|
|
|
|
|
invoke-direct {v2}, Lcom/discord/utilities/textprocessing/TagsBuilder;-><init>()V
|
|
|
|
|
|
|
|
if-eqz v1, :cond_0
|
|
|
|
|
|
|
|
invoke-virtual {v2, v1}, Lcom/discord/utilities/textprocessing/TagsBuilder;->processAst(Ljava/util/Collection;)V
|
|
|
|
|
|
|
|
:cond_0
|
|
|
|
if-eqz p1, :cond_1
|
|
|
|
|
2019-12-06 03:29:40 +00:00
|
|
|
invoke-interface {p1}, Ljava/lang/Iterable;->iterator()Ljava/util/Iterator;
|
2019-07-24 11:27:29 +00:00
|
|
|
|
|
|
|
move-result-object v3
|
|
|
|
|
|
|
|
:goto_0
|
|
|
|
invoke-interface {v3}, Ljava/util/Iterator;->hasNext()Z
|
|
|
|
|
|
|
|
move-result v4
|
|
|
|
|
|
|
|
if-eqz v4, :cond_1
|
|
|
|
|
|
|
|
invoke-interface {v3}, Ljava/util/Iterator;->next()Ljava/lang/Object;
|
|
|
|
|
|
|
|
move-result-object v4
|
|
|
|
|
|
|
|
check-cast v4, Lcom/discord/widgets/chat/list/WidgetChatListAdapterItemEmbed$Model$ParsedField;
|
|
|
|
|
|
|
|
invoke-virtual {v4}, Lcom/discord/widgets/chat/list/WidgetChatListAdapterItemEmbed$Model$ParsedField;->getParsedName()Ljava/util/Collection;
|
|
|
|
|
|
|
|
move-result-object v5
|
|
|
|
|
|
|
|
invoke-virtual {v2, v5}, Lcom/discord/utilities/textprocessing/TagsBuilder;->processAst(Ljava/util/Collection;)V
|
|
|
|
|
|
|
|
invoke-virtual {v4}, Lcom/discord/widgets/chat/list/WidgetChatListAdapterItemEmbed$Model$ParsedField;->getParsedValue()Ljava/util/Collection;
|
|
|
|
|
|
|
|
move-result-object v4
|
|
|
|
|
|
|
|
invoke-virtual {v2, v4}, Lcom/discord/utilities/textprocessing/TagsBuilder;->processAst(Ljava/util/Collection;)V
|
|
|
|
|
|
|
|
goto :goto_0
|
|
|
|
|
|
|
|
:cond_1
|
|
|
|
invoke-virtual {v2}, Lcom/discord/utilities/textprocessing/TagsBuilder;->build()Lcom/discord/utilities/textprocessing/Tags;
|
|
|
|
|
|
|
|
move-result-object v2
|
|
|
|
|
|
|
|
invoke-virtual {v2}, Lcom/discord/utilities/textprocessing/Tags;->isEmpty()Z
|
|
|
|
|
|
|
|
move-result v3
|
|
|
|
|
|
|
|
if-eqz v3, :cond_2
|
|
|
|
|
2020-02-20 19:33:18 +00:00
|
|
|
sget-object p1, Le0/m/a/g;->e:Lrx/Observable;
|
2019-07-24 11:27:29 +00:00
|
|
|
|
|
|
|
const-string v0, "Observable.never()"
|
|
|
|
|
2020-02-20 19:33:18 +00:00
|
|
|
invoke-static {p1, v0}, Lw/u/b/j;->checkExpressionValueIsNotNull(Ljava/lang/Object;Ljava/lang/String;)V
|
2019-07-24 11:27:29 +00:00
|
|
|
|
|
|
|
return-object p1
|
|
|
|
|
|
|
|
:cond_2
|
|
|
|
sget-object v3, Lcom/discord/stores/StoreStream;->Companion:Lcom/discord/stores/StoreStream$Companion;
|
|
|
|
|
|
|
|
invoke-virtual {v3}, Lcom/discord/stores/StoreStream$Companion;->getUsers()Lcom/discord/stores/StoreUser;
|
|
|
|
|
|
|
|
move-result-object v3
|
|
|
|
|
2020-02-06 22:18:40 +00:00
|
|
|
invoke-virtual {v3}, Lcom/discord/stores/StoreUser;->observeMeId()Lrx/Observable;
|
2019-07-24 11:27:29 +00:00
|
|
|
|
|
|
|
move-result-object v3
|
|
|
|
|
|
|
|
sget-object v4, Lcom/discord/stores/StoreStream;->Companion:Lcom/discord/stores/StoreStream$Companion;
|
|
|
|
|
|
|
|
invoke-virtual {v4}, Lcom/discord/stores/StoreStream$Companion;->getChannels()Lcom/discord/stores/StoreChannels;
|
|
|
|
|
|
|
|
move-result-object v4
|
|
|
|
|
|
|
|
invoke-virtual {v2}, Lcom/discord/utilities/textprocessing/Tags;->getChannels()Ljava/util/Set;
|
|
|
|
|
|
|
|
move-result-object v5
|
|
|
|
|
|
|
|
invoke-virtual {v4, v5}, Lcom/discord/stores/StoreChannels;->getNames(Ljava/util/Collection;)Lrx/Observable;
|
|
|
|
|
|
|
|
move-result-object v4
|
|
|
|
|
|
|
|
sget-object v5, Lcom/discord/stores/StoreStream;->Companion:Lcom/discord/stores/StoreStream$Companion;
|
|
|
|
|
|
|
|
invoke-virtual {v5}, Lcom/discord/stores/StoreStream$Companion;->getGuilds()Lcom/discord/stores/StoreGuilds;
|
|
|
|
|
|
|
|
move-result-object v5
|
|
|
|
|
|
|
|
invoke-virtual {v0}, Lcom/discord/widgets/chat/list/entries/EmbedEntry;->getGuildId()J
|
|
|
|
|
|
|
|
move-result-wide v6
|
|
|
|
|
|
|
|
invoke-virtual {v2}, Lcom/discord/utilities/textprocessing/Tags;->getUsers()Ljava/util/Set;
|
|
|
|
|
|
|
|
move-result-object v8
|
|
|
|
|
|
|
|
invoke-virtual {v5, v6, v7, v8}, Lcom/discord/stores/StoreGuilds;->getComputed(JLjava/util/Collection;)Lrx/Observable;
|
|
|
|
|
|
|
|
move-result-object v5
|
|
|
|
|
|
|
|
sget-object v6, Lcom/discord/stores/StoreStream;->Companion:Lcom/discord/stores/StoreStream$Companion;
|
|
|
|
|
|
|
|
invoke-virtual {v6}, Lcom/discord/stores/StoreStream$Companion;->getUsers()Lcom/discord/stores/StoreUser;
|
|
|
|
|
|
|
|
move-result-object v6
|
|
|
|
|
|
|
|
invoke-virtual {v2}, Lcom/discord/utilities/textprocessing/Tags;->getUsers()Ljava/util/Set;
|
|
|
|
|
|
|
|
move-result-object v7
|
|
|
|
|
2020-02-06 22:18:40 +00:00
|
|
|
invoke-virtual {v6, v7}, Lcom/discord/stores/StoreUser;->observeUsernames(Ljava/util/Collection;)Lrx/Observable;
|
2019-07-24 11:27:29 +00:00
|
|
|
|
|
|
|
move-result-object v6
|
|
|
|
|
|
|
|
sget-object v7, Lcom/discord/widgets/chat/list/WidgetChatListAdapterItemEmbed$Companion$getModel$1;->INSTANCE:Lcom/discord/widgets/chat/list/WidgetChatListAdapterItemEmbed$Companion$getModel$1;
|
|
|
|
|
|
|
|
invoke-static {v5, v6, v7}, Lrx/Observable;->a(Lrx/Observable;Lrx/Observable;Lrx/functions/Func2;)Lrx/Observable;
|
|
|
|
|
|
|
|
move-result-object v5
|
|
|
|
|
|
|
|
sget-object v6, Lcom/discord/stores/StoreStream;->Companion:Lcom/discord/stores/StoreStream$Companion;
|
|
|
|
|
|
|
|
invoke-virtual {v6}, Lcom/discord/stores/StoreStream$Companion;->getGuilds()Lcom/discord/stores/StoreGuilds;
|
|
|
|
|
|
|
|
move-result-object v6
|
|
|
|
|
|
|
|
invoke-virtual {v0}, Lcom/discord/widgets/chat/list/entries/EmbedEntry;->getGuildId()J
|
|
|
|
|
|
|
|
move-result-wide v7
|
|
|
|
|
|
|
|
invoke-virtual {v2}, Lcom/discord/utilities/textprocessing/Tags;->getRoles()Ljava/util/Set;
|
|
|
|
|
|
|
|
move-result-object v2
|
|
|
|
|
|
|
|
invoke-virtual {v6, v7, v8, v2}, Lcom/discord/stores/StoreGuilds;->getRoles(JLjava/util/Collection;)Lrx/Observable;
|
|
|
|
|
|
|
|
move-result-object v2
|
|
|
|
|
|
|
|
new-instance v6, Lcom/discord/widgets/chat/list/WidgetChatListAdapterItemEmbed$Companion$getModel$2;
|
|
|
|
|
|
|
|
invoke-direct {v6, v0, v1, p1}, Lcom/discord/widgets/chat/list/WidgetChatListAdapterItemEmbed$Companion$getModel$2;-><init>(Lcom/discord/widgets/chat/list/entries/EmbedEntry;Ljava/util/Collection;Ljava/util/List;)V
|
|
|
|
|
|
|
|
invoke-static {v3, v4, v5, v2, v6}, Lrx/Observable;->a(Lrx/Observable;Lrx/Observable;Lrx/Observable;Lrx/Observable;Lrx/functions/Func4;)Lrx/Observable;
|
|
|
|
|
|
|
|
move-result-object p1
|
|
|
|
|
|
|
|
const-string v0, "Observable\n .co\u2026 roles, myId)\n }"
|
|
|
|
|
2020-02-20 19:33:18 +00:00
|
|
|
invoke-static {p1, v0}, Lw/u/b/j;->checkExpressionValueIsNotNull(Ljava/lang/Object;Ljava/lang/String;)V
|
2019-07-24 11:27:29 +00:00
|
|
|
|
|
|
|
invoke-static {p1}, Lcom/discord/utilities/rx/ObservableExtensionsKt;->computationLatest(Lrx/Observable;)Lrx/Observable;
|
|
|
|
|
|
|
|
move-result-object p1
|
|
|
|
|
2019-12-06 03:29:40 +00:00
|
|
|
invoke-virtual {p1}, Lrx/Observable;->a()Lrx/Observable;
|
2019-07-24 11:27:29 +00:00
|
|
|
|
|
|
|
move-result-object p1
|
|
|
|
|
|
|
|
const-string v0, "Observable\n .co\u2026 .distinctUntilChanged()"
|
|
|
|
|
2020-02-20 19:33:18 +00:00
|
|
|
invoke-static {p1, v0}, Lw/u/b/j;->checkExpressionValueIsNotNull(Ljava/lang/Object;Ljava/lang/String;)V
|
2019-07-24 11:27:29 +00:00
|
|
|
|
|
|
|
return-object p1
|
|
|
|
.end method
|