318 lines
9.5 KiB
Smali
318 lines
9.5 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/Long;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/models/experiments/domain/Experiment;Lcom/discord/models/experiments/domain/Experiment;)Lcom/discord/widgets/chat/list/actions/WidgetChatListActions$Model;
|
|
.locals 0
|
|
|
|
invoke-direct/range {p0 .. p11}, Lcom/discord/widgets/chat/list/actions/WidgetChatListActions$Model$Companion;->create(Lcom/discord/models/domain/ModelMessage;Ljava/lang/Long;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/models/experiments/domain/Experiment;Lcom/discord/models/experiments/domain/Experiment;)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/Long;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/models/experiments/domain/Experiment;Lcom/discord/models/experiments/domain/Experiment;)Lcom/discord/widgets/chat/list/actions/WidgetChatListActions$Model;
|
|
.locals 14
|
|
|
|
if-nez p1, :cond_0
|
|
|
|
const/4 v0, 0x0
|
|
|
|
return-object v0
|
|
|
|
:cond_0
|
|
const/4 v7, 0x0
|
|
|
|
const/4 v8, 0x1
|
|
|
|
if-eqz p6, :cond_1
|
|
|
|
invoke-virtual/range {p6 .. p6}, Lcom/discord/models/domain/ModelChannel;->isPrivate()Z
|
|
|
|
move-result v0
|
|
|
|
if-ne v0, v8, :cond_1
|
|
|
|
const/4 v5, 0x1
|
|
|
|
goto :goto_0
|
|
|
|
:cond_1
|
|
const/4 v5, 0x0
|
|
|
|
:goto_0
|
|
if-eqz p6, :cond_2
|
|
|
|
invoke-virtual/range {p6 .. p6}, Lcom/discord/models/domain/ModelChannel;->isSystemDM()Z
|
|
|
|
move-result v0
|
|
|
|
if-ne v0, v8, :cond_2
|
|
|
|
const/4 v6, 0x1
|
|
|
|
goto :goto_1
|
|
|
|
:cond_2
|
|
const/4 v6, 0x0
|
|
|
|
:goto_1
|
|
sget-object v0, Lcom/discord/utilities/permissions/ManageMessageContext;->Companion:Lcom/discord/utilities/permissions/ManageMessageContext$Companion;
|
|
|
|
move-object v1, p1
|
|
|
|
move-object/from16 v2, p2
|
|
|
|
move-object/from16 v3, p3
|
|
|
|
move-object/from16 v4, p5
|
|
|
|
invoke-virtual/range {v0 .. v6}, Lcom/discord/utilities/permissions/ManageMessageContext$Companion;->from(Lcom/discord/models/domain/ModelMessage;Ljava/lang/Long;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 v0
|
|
|
|
if-eqz v0, :cond_3
|
|
|
|
goto :goto_2
|
|
|
|
:cond_3
|
|
invoke-virtual {p1}, Lcom/discord/models/domain/ModelMessage;->getAuthor()Lcom/discord/models/domain/ModelUser;
|
|
|
|
move-result-object v0
|
|
|
|
const-string v1, "message.author"
|
|
|
|
invoke-static {v0, v1}, Lz/n/c/j;->checkNotNullExpressionValue(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
invoke-virtual {v0}, Lcom/discord/models/domain/ModelUser;->getUsername()Ljava/lang/String;
|
|
|
|
move-result-object v0
|
|
|
|
:goto_2
|
|
move-object v4, v0
|
|
|
|
const-wide/16 v0, 0x0
|
|
|
|
if-eqz p6, :cond_4
|
|
|
|
invoke-virtual/range {p6 .. p6}, Lcom/discord/models/domain/ModelChannel;->getGuildId()Ljava/lang/Long;
|
|
|
|
move-result-object v2
|
|
|
|
if-eqz v2, :cond_4
|
|
|
|
goto :goto_3
|
|
|
|
:cond_4
|
|
invoke-static {v0, v1}, Ljava/lang/Long;->valueOf(J)Ljava/lang/Long;
|
|
|
|
move-result-object v2
|
|
|
|
:goto_3
|
|
const-string v3, "channel?.guildId ?: 0L"
|
|
|
|
invoke-static {v2, v3}, Lz/n/c/j;->checkNotNullExpressionValue(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
invoke-virtual {v2}, Ljava/lang/Long;->longValue()J
|
|
|
|
move-result-wide v2
|
|
|
|
sget-object v5, Lcom/discord/stores/StoreStream;->Companion:Lcom/discord/stores/StoreStream$Companion;
|
|
|
|
invoke-virtual {v5}, Lcom/discord/stores/StoreStream$Companion;->getUserSettings()Lcom/discord/stores/StoreUserSettings;
|
|
|
|
move-result-object v5
|
|
|
|
invoke-virtual {v5}, Lcom/discord/stores/StoreUserSettings;->getDeveloperMode()Z
|
|
|
|
move-result v9
|
|
|
|
cmp-long v5, v2, v0
|
|
|
|
if-eqz v5, :cond_5
|
|
|
|
move-object/from16 v0, p10
|
|
|
|
goto :goto_4
|
|
|
|
:cond_5
|
|
move-object/from16 v0, p11
|
|
|
|
:goto_4
|
|
invoke-virtual/range {p3 .. p3}, Lcom/discord/models/domain/ModelUser;->isStaff()Z
|
|
|
|
move-result v1
|
|
|
|
if-nez v1, :cond_7
|
|
|
|
if-eqz v0, :cond_6
|
|
|
|
invoke-virtual {v0}, Lcom/discord/models/experiments/domain/Experiment;->getBucket()I
|
|
|
|
move-result v0
|
|
|
|
if-ne v0, v8, :cond_6
|
|
|
|
goto :goto_5
|
|
|
|
:cond_6
|
|
const/4 v12, 0x0
|
|
|
|
goto :goto_6
|
|
|
|
:cond_7
|
|
:goto_5
|
|
const/4 v12, 0x1
|
|
|
|
:goto_6
|
|
new-instance v13, Lcom/discord/widgets/chat/list/actions/WidgetChatListActions$Model;
|
|
|
|
move-object/from16 v0, p9
|
|
|
|
iget-object v10, v0, Lcom/discord/models/domain/emoji/EmojiSet;->recentEmojis:Ljava/util/List;
|
|
|
|
const-string v0, "emojis.recentEmojis"
|
|
|
|
invoke-static {v10, v0}, Lz/n/c/j;->checkNotNullExpressionValue(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
move-object v0, v13
|
|
|
|
move-object v1, p1
|
|
|
|
move-object/from16 v5, p7
|
|
|
|
move/from16 v7, p8
|
|
|
|
move v8, v9
|
|
|
|
move-object v9, v10
|
|
|
|
move-object/from16 v10, p6
|
|
|
|
move-object/from16 v11, p2
|
|
|
|
invoke-direct/range {v0 .. v12}, 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/Long;Z)V
|
|
|
|
return-object v13
|
|
.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, Li0/l/e/j;
|
|
|
|
invoke-direct {p4, p3}, Li0/l/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;->observeMessagesForChannel(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;->observeChannel(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;->j(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;->U(Li0/k/b;)Lrx/Observable;
|
|
|
|
move-result-object p1
|
|
|
|
const-string p2, "Observable\n .\u2026 }\n }"
|
|
|
|
invoke-static {p1, p2}, Lz/n/c/j;->checkNotNullExpressionValue(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
return-object p1
|
|
.end method
|