315 lines
9.3 KiB
Smali
315 lines
9.3 KiB
Smali
.class public final Lcom/discord/widgets/chat/list/actions/WidgetChatListActions$Model$Companion;
|
|
.super Ljava/lang/Object;
|
|
.source "WidgetChatListActions.kt"
|
|
|
|
|
|
# annotations
|
|
.annotation system Ldalvik/annotation/EnclosingClass;
|
|
value = Lcom/discord/widgets/chat/list/actions/WidgetChatListActions$Model;
|
|
.end annotation
|
|
|
|
.annotation system Ldalvik/annotation/InnerClass;
|
|
accessFlags = 0x19
|
|
name = "Companion"
|
|
.end annotation
|
|
|
|
|
|
# direct methods
|
|
.method public 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/chat/list/actions/WidgetChatListActions$Model$Companion;-><init>()V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public static final synthetic access$create(Lcom/discord/widgets/chat/list/actions/WidgetChatListActions$Model$Companion;Lcom/discord/models/domain/ModelMessage;Ljava/lang/Integer;Lcom/discord/models/domain/ModelUser;Lcom/discord/models/domain/ModelGuildMember$Computed;Ljava/lang/Integer;Lcom/discord/models/domain/ModelChannel;Ljava/lang/CharSequence;ILcom/discord/models/domain/emoji/EmojiSet;)Lcom/discord/widgets/chat/list/actions/WidgetChatListActions$Model;
|
|
.locals 0
|
|
|
|
invoke-direct/range {p0 .. p9}, Lcom/discord/widgets/chat/list/actions/WidgetChatListActions$Model$Companion;->create(Lcom/discord/models/domain/ModelMessage;Ljava/lang/Integer;Lcom/discord/models/domain/ModelUser;Lcom/discord/models/domain/ModelGuildMember$Computed;Ljava/lang/Integer;Lcom/discord/models/domain/ModelChannel;Ljava/lang/CharSequence;ILcom/discord/models/domain/emoji/EmojiSet;)Lcom/discord/widgets/chat/list/actions/WidgetChatListActions$Model;
|
|
|
|
move-result-object p0
|
|
|
|
return-object p0
|
|
.end method
|
|
|
|
.method private final create(Lcom/discord/models/domain/ModelMessage;Ljava/lang/Integer;Lcom/discord/models/domain/ModelUser;Lcom/discord/models/domain/ModelGuildMember$Computed;Ljava/lang/Integer;Lcom/discord/models/domain/ModelChannel;Ljava/lang/CharSequence;ILcom/discord/models/domain/emoji/EmojiSet;)Lcom/discord/widgets/chat/list/actions/WidgetChatListActions$Model;
|
|
.locals 13
|
|
|
|
const/4 v0, 0x0
|
|
|
|
if-nez p1, :cond_0
|
|
|
|
return-object v0
|
|
|
|
:cond_0
|
|
const/4 v8, 0x0
|
|
|
|
const/4 v9, 0x1
|
|
|
|
if-eqz p6, :cond_1
|
|
|
|
invoke-virtual/range {p6 .. p6}, Lcom/discord/models/domain/ModelChannel;->isPrivate()Z
|
|
|
|
move-result v1
|
|
|
|
if-ne v1, v9, :cond_1
|
|
|
|
const/4 v6, 0x1
|
|
|
|
goto :goto_0
|
|
|
|
:cond_1
|
|
const/4 v6, 0x0
|
|
|
|
:goto_0
|
|
if-eqz p6, :cond_2
|
|
|
|
invoke-virtual/range {p6 .. p6}, Lcom/discord/models/domain/ModelChannel;->isSystemDM()Z
|
|
|
|
move-result v1
|
|
|
|
if-ne v1, v9, :cond_2
|
|
|
|
const/4 v7, 0x1
|
|
|
|
goto :goto_1
|
|
|
|
:cond_2
|
|
const/4 v7, 0x0
|
|
|
|
:goto_1
|
|
sget-object v1, Lcom/discord/utilities/permissions/ManageMessageContext;->Companion:Lcom/discord/utilities/permissions/ManageMessageContext$Companion;
|
|
|
|
move-object v2, p1
|
|
|
|
move-object v3, p2
|
|
|
|
move-object/from16 v4, p3
|
|
|
|
move-object/from16 v5, p5
|
|
|
|
invoke-virtual/range {v1 .. v7}, Lcom/discord/utilities/permissions/ManageMessageContext$Companion;->from(Lcom/discord/models/domain/ModelMessage;Ljava/lang/Integer;Lcom/discord/models/domain/ModelUser;Ljava/lang/Integer;ZZ)Lcom/discord/utilities/permissions/ManageMessageContext;
|
|
|
|
move-result-object v6
|
|
|
|
if-eqz p4, :cond_3
|
|
|
|
invoke-virtual/range {p4 .. p4}, Lcom/discord/models/domain/ModelGuildMember$Computed;->getNick()Ljava/lang/String;
|
|
|
|
move-result-object v1
|
|
|
|
if-eqz v1, :cond_3
|
|
|
|
goto :goto_2
|
|
|
|
:cond_3
|
|
invoke-virtual {p1}, Lcom/discord/models/domain/ModelMessage;->getAuthor()Lcom/discord/models/domain/ModelUser;
|
|
|
|
move-result-object v1
|
|
|
|
const-string v2, "message.author"
|
|
|
|
invoke-static {v1, v2}, Lw/u/b/j;->checkExpressionValueIsNotNull(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
invoke-virtual {v1}, Lcom/discord/models/domain/ModelUser;->getUsername()Ljava/lang/String;
|
|
|
|
move-result-object v1
|
|
|
|
:goto_2
|
|
move-object v4, v1
|
|
|
|
if-eqz p7, :cond_5
|
|
|
|
invoke-interface/range {p7 .. p7}, Ljava/lang/CharSequence;->length()I
|
|
|
|
move-result v1
|
|
|
|
if-lez v1, :cond_4
|
|
|
|
const/4 v1, 0x1
|
|
|
|
goto :goto_3
|
|
|
|
:cond_4
|
|
const/4 v1, 0x0
|
|
|
|
:goto_3
|
|
if-ne v1, v9, :cond_5
|
|
|
|
invoke-virtual/range {p7 .. p7}, Ljava/lang/Object;->toString()Ljava/lang/String;
|
|
|
|
move-result-object v0
|
|
|
|
const/4 v1, 0x4
|
|
|
|
const-string v2, "(edited)"
|
|
|
|
const-string v3, ""
|
|
|
|
invoke-static {v0, v2, v3, v8, v1}, Lw/a0/p;->replace$default(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;ZI)Ljava/lang/String;
|
|
|
|
move-result-object v0
|
|
|
|
:cond_5
|
|
move-object v5, v0
|
|
|
|
if-eqz p6, :cond_6
|
|
|
|
invoke-virtual/range {p6 .. p6}, Lcom/discord/models/domain/ModelChannel;->getGuildId()Ljava/lang/Long;
|
|
|
|
move-result-object v0
|
|
|
|
if-eqz v0, :cond_6
|
|
|
|
goto :goto_4
|
|
|
|
:cond_6
|
|
const-wide/16 v0, 0x0
|
|
|
|
invoke-static {v0, v1}, Ljava/lang/Long;->valueOf(J)Ljava/lang/Long;
|
|
|
|
move-result-object v0
|
|
|
|
:goto_4
|
|
const-string v1, "channel?.guildId ?: 0L"
|
|
|
|
invoke-static {v0, v1}, Lw/u/b/j;->checkExpressionValueIsNotNull(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
invoke-virtual {v0}, Ljava/lang/Long;->longValue()J
|
|
|
|
move-result-wide v2
|
|
|
|
sget-object v0, Lcom/discord/stores/StoreStream;->Companion:Lcom/discord/stores/StoreStream$Companion;
|
|
|
|
invoke-virtual {v0}, Lcom/discord/stores/StoreStream$Companion;->getUserSettings()Lcom/discord/stores/StoreUserSettings;
|
|
|
|
move-result-object v0
|
|
|
|
invoke-virtual {v0}, Lcom/discord/stores/StoreUserSettings;->getDeveloperMode()Z
|
|
|
|
move-result v8
|
|
|
|
new-instance v12, Lcom/discord/widgets/chat/list/actions/WidgetChatListActions$Model;
|
|
|
|
move-object/from16 v0, p9
|
|
|
|
iget-object v0, v0, Lcom/discord/models/domain/emoji/EmojiSet;->recentEmojis:Ljava/util/List;
|
|
|
|
const-string v1, "emojis.recentEmojis"
|
|
|
|
invoke-static {v0, v1}, Lw/u/b/j;->checkExpressionValueIsNotNull(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
const/4 v1, 0x3
|
|
|
|
invoke-static {v0, v1}, Lw/q/l;->take(Ljava/lang/Iterable;I)Ljava/util/List;
|
|
|
|
move-result-object v9
|
|
|
|
move-object v0, v12
|
|
|
|
move-object v1, p1
|
|
|
|
move/from16 v7, p8
|
|
|
|
move-object/from16 v10, p6
|
|
|
|
move-object v11, p2
|
|
|
|
invoke-direct/range {v0 .. v11}, Lcom/discord/widgets/chat/list/actions/WidgetChatListActions$Model;-><init>(Lcom/discord/models/domain/ModelMessage;JLjava/lang/String;Ljava/lang/CharSequence;Lcom/discord/utilities/permissions/ManageMessageContext;IZLjava/util/List;Lcom/discord/models/domain/ModelChannel;Ljava/lang/Integer;)V
|
|
|
|
return-object v12
|
|
.end method
|
|
|
|
|
|
# virtual methods
|
|
.method public final get(JJLjava/lang/CharSequence;I)Lrx/Observable;
|
|
.locals 1
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"(JJ",
|
|
"Ljava/lang/CharSequence;",
|
|
"I)",
|
|
"Lrx/Observable<",
|
|
"Lcom/discord/widgets/chat/list/actions/WidgetChatListActions$Model;",
|
|
">;"
|
|
}
|
|
.end annotation
|
|
|
|
if-eqz p6, :cond_1
|
|
|
|
const/4 v0, 0x1
|
|
|
|
if-eq p6, v0, :cond_0
|
|
|
|
const/4 p3, 0x0
|
|
|
|
new-instance p4, Le0/m/e/j;
|
|
|
|
invoke-direct {p4, p3}, Le0/m/e/j;-><init>(Ljava/lang/Object;)V
|
|
|
|
goto :goto_0
|
|
|
|
:cond_0
|
|
sget-object v0, Lcom/discord/stores/StoreStream;->Companion:Lcom/discord/stores/StoreStream$Companion;
|
|
|
|
invoke-virtual {v0}, Lcom/discord/stores/StoreStream$Companion;->getPinnedMessages()Lcom/discord/stores/StorePinnedMessages;
|
|
|
|
move-result-object v0
|
|
|
|
invoke-virtual {v0, p1, p2, p3, p4}, Lcom/discord/stores/StorePinnedMessages;->get(JJ)Lrx/Observable;
|
|
|
|
move-result-object p4
|
|
|
|
goto :goto_0
|
|
|
|
:cond_1
|
|
sget-object v0, Lcom/discord/stores/StoreStream;->Companion:Lcom/discord/stores/StoreStream$Companion;
|
|
|
|
invoke-virtual {v0}, Lcom/discord/stores/StoreStream$Companion;->getMessages()Lcom/discord/stores/StoreMessages;
|
|
|
|
move-result-object v0
|
|
|
|
invoke-virtual {v0, p1, p2, p3, p4}, Lcom/discord/stores/StoreMessages;->get(JJ)Lrx/Observable;
|
|
|
|
move-result-object p4
|
|
|
|
:goto_0
|
|
sget-object p3, Lcom/discord/stores/StoreStream;->Companion:Lcom/discord/stores/StoreStream$Companion;
|
|
|
|
invoke-virtual {p3}, Lcom/discord/stores/StoreStream$Companion;->getChannels()Lcom/discord/stores/StoreChannels;
|
|
|
|
move-result-object p3
|
|
|
|
invoke-virtual {p3, p1, p2}, Lcom/discord/stores/StoreChannels;->get(J)Lrx/Observable;
|
|
|
|
move-result-object p3
|
|
|
|
sget-object v0, Lcom/discord/widgets/chat/list/actions/WidgetChatListActions$Model$Companion$get$1;->INSTANCE:Lcom/discord/widgets/chat/list/actions/WidgetChatListActions$Model$Companion$get$1;
|
|
|
|
invoke-static {p4, p3, v0}, Lrx/Observable;->a(Lrx/Observable;Lrx/Observable;Lrx/functions/Func2;)Lrx/Observable;
|
|
|
|
move-result-object p3
|
|
|
|
new-instance p4, Lcom/discord/widgets/chat/list/actions/WidgetChatListActions$Model$Companion$get$2;
|
|
|
|
invoke-direct {p4, p1, p2, p5, p6}, Lcom/discord/widgets/chat/list/actions/WidgetChatListActions$Model$Companion$get$2;-><init>(JLjava/lang/CharSequence;I)V
|
|
|
|
invoke-virtual {p3, p4}, Lrx/Observable;->k(Le0/l/i;)Lrx/Observable;
|
|
|
|
move-result-object p1
|
|
|
|
const-string p2, "Observable\n .\u2026 }\n }"
|
|
|
|
invoke-static {p1, p2}, Lw/u/b/j;->checkExpressionValueIsNotNull(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
return-object p1
|
|
.end method
|