1067 lines
28 KiB
Smali
1067 lines
28 KiB
Smali
.class Lcom/discord/widgets/search/results/WidgetSearchResults$Model;
|
|
.super Ljava/lang/Object;
|
|
.source "WidgetSearchResults.java"
|
|
|
|
# interfaces
|
|
.implements Lcom/discord/widgets/chat/list/WidgetChatListAdapter$Data;
|
|
|
|
|
|
# annotations
|
|
.annotation system Ldalvik/annotation/EnclosingClass;
|
|
value = Lcom/discord/widgets/search/results/WidgetSearchResults;
|
|
.end annotation
|
|
|
|
.annotation system Ldalvik/annotation/InnerClass;
|
|
accessFlags = 0x8
|
|
name = "Model"
|
|
.end annotation
|
|
|
|
|
|
# instance fields
|
|
.field private final channelNames:Ljava/util/Map;
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"Ljava/util/Map<",
|
|
"Ljava/lang/Long;",
|
|
"Ljava/lang/String;",
|
|
">;"
|
|
}
|
|
.end annotation
|
|
.end field
|
|
|
|
.field private final items:Ljava/util/List;
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"Ljava/util/List<",
|
|
"Lcom/discord/widgets/chat/list/entries/ChatListEntry;",
|
|
">;"
|
|
}
|
|
.end annotation
|
|
.end field
|
|
|
|
.field private final myRoleIds:Ljava/util/Set;
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"Ljava/util/Set<",
|
|
"Ljava/lang/Long;",
|
|
">;"
|
|
}
|
|
.end annotation
|
|
.end field
|
|
|
|
.field private final oldestMessageId:J
|
|
|
|
.field private final userId:J
|
|
|
|
|
|
# direct methods
|
|
.method public constructor <init>(Ljava/util/List;JLjava/util/Map;JLjava/util/Set;)V
|
|
.locals 0
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"(",
|
|
"Ljava/util/List<",
|
|
"Lcom/discord/widgets/chat/list/entries/ChatListEntry;",
|
|
">;J",
|
|
"Ljava/util/Map<",
|
|
"Ljava/lang/Long;",
|
|
"Ljava/lang/String;",
|
|
">;J",
|
|
"Ljava/util/Set<",
|
|
"Ljava/lang/Long;",
|
|
">;)V"
|
|
}
|
|
.end annotation
|
|
|
|
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
|
|
|
|
iput-object p1, p0, Lcom/discord/widgets/search/results/WidgetSearchResults$Model;->items:Ljava/util/List;
|
|
|
|
iput-wide p2, p0, Lcom/discord/widgets/search/results/WidgetSearchResults$Model;->userId:J
|
|
|
|
iput-object p4, p0, Lcom/discord/widgets/search/results/WidgetSearchResults$Model;->channelNames:Ljava/util/Map;
|
|
|
|
iput-wide p5, p0, Lcom/discord/widgets/search/results/WidgetSearchResults$Model;->oldestMessageId:J
|
|
|
|
iput-object p7, p0, Lcom/discord/widgets/search/results/WidgetSearchResults$Model;->myRoleIds:Ljava/util/Set;
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method private static create(Lcom/discord/utilities/search/network/state/SearchState;Ljava/lang/Long;Ljava/util/Map;Ljava/util/Map;Ljava/util/Map;Ljava/util/Map;Ljava/util/Map;Landroid/content/Context;Z)Lcom/discord/widgets/search/results/WidgetSearchResults$Model;
|
|
.locals 25
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"(",
|
|
"Lcom/discord/utilities/search/network/state/SearchState;",
|
|
"Ljava/lang/Long;",
|
|
"Ljava/util/Map<",
|
|
"Ljava/lang/Long;",
|
|
"Ljava/lang/String;",
|
|
">;",
|
|
"Ljava/util/Map<",
|
|
"Ljava/lang/Long;",
|
|
"Lcom/discord/models/domain/ModelGuild;",
|
|
">;",
|
|
"Ljava/util/Map<",
|
|
"Ljava/lang/Long;",
|
|
"Ljava/util/Map<",
|
|
"Ljava/lang/Long;",
|
|
"Lcom/discord/models/domain/ModelGuildMember$Computed;",
|
|
">;>;",
|
|
"Ljava/util/Map<",
|
|
"Ljava/lang/Long;",
|
|
"Ljava/util/Map<",
|
|
"Ljava/lang/Long;",
|
|
"Lcom/discord/models/domain/ModelGuildRole;",
|
|
">;>;",
|
|
"Ljava/util/Map<",
|
|
"Ljava/lang/Long;",
|
|
"Lcom/discord/models/domain/ModelChannel;",
|
|
">;",
|
|
"Landroid/content/Context;",
|
|
"Z)",
|
|
"Lcom/discord/widgets/search/results/WidgetSearchResults$Model;"
|
|
}
|
|
.end annotation
|
|
|
|
move-object/from16 v0, p1
|
|
|
|
move-object/from16 v1, p3
|
|
|
|
move-object/from16 v2, p4
|
|
|
|
move-object/from16 v3, p5
|
|
|
|
move-object/from16 v4, p6
|
|
|
|
const/4 v5, 0x0
|
|
|
|
if-eqz p0, :cond_f
|
|
|
|
if-eqz v0, :cond_f
|
|
|
|
if-eqz p2, :cond_f
|
|
|
|
if-eqz v1, :cond_f
|
|
|
|
if-eqz v2, :cond_f
|
|
|
|
if-eqz v3, :cond_f
|
|
|
|
if-eqz v4, :cond_f
|
|
|
|
if-nez p7, :cond_0
|
|
|
|
goto/16 :goto_7
|
|
|
|
:cond_0
|
|
new-instance v7, Ljava/util/ArrayList;
|
|
|
|
invoke-direct {v7}, Ljava/util/ArrayList;-><init>()V
|
|
|
|
invoke-virtual/range {p0 .. p0}, Lcom/discord/utilities/search/network/state/SearchState;->getQueryFetchState()Lcom/discord/utilities/search/network/state/QueryFetchState;
|
|
|
|
move-result-object v6
|
|
|
|
new-instance v13, Ljava/util/HashSet;
|
|
|
|
invoke-direct {v13}, Ljava/util/HashSet;-><init>()V
|
|
|
|
sget-object v8, Lcom/discord/utilities/search/network/state/QueryFetchState;->COMPLETED:Lcom/discord/utilities/search/network/state/QueryFetchState;
|
|
|
|
if-eq v6, v8, :cond_4
|
|
|
|
sget-object v8, Lcom/discord/utilities/search/network/state/QueryFetchState;->LOADING_MORE:Lcom/discord/utilities/search/network/state/QueryFetchState;
|
|
|
|
if-ne v6, v8, :cond_1
|
|
|
|
goto :goto_0
|
|
|
|
:cond_1
|
|
sget-object v1, Lcom/discord/utilities/search/network/state/QueryFetchState;->IN_PROGRESS:Lcom/discord/utilities/search/network/state/QueryFetchState;
|
|
|
|
if-ne v6, v1, :cond_2
|
|
|
|
new-instance v1, Lcom/discord/widgets/chat/list/entries/LoadingEntry;
|
|
|
|
invoke-direct {v1}, Lcom/discord/widgets/chat/list/entries/LoadingEntry;-><init>()V
|
|
|
|
invoke-interface {v7, v1}, Ljava/util/List;->add(Ljava/lang/Object;)Z
|
|
|
|
goto/16 :goto_5
|
|
|
|
:cond_2
|
|
sget-object v1, Lcom/discord/utilities/search/network/state/QueryFetchState;->INDEXING:Lcom/discord/utilities/search/network/state/QueryFetchState;
|
|
|
|
if-ne v6, v1, :cond_3
|
|
|
|
new-instance v1, Lcom/discord/widgets/chat/list/entries/SearchIndexingEntry;
|
|
|
|
invoke-direct {v1}, Lcom/discord/widgets/chat/list/entries/SearchIndexingEntry;-><init>()V
|
|
|
|
invoke-interface {v7, v1}, Ljava/util/List;->add(Ljava/lang/Object;)Z
|
|
|
|
goto/16 :goto_5
|
|
|
|
:cond_3
|
|
sget-object v1, Lcom/discord/utilities/search/network/state/QueryFetchState;->FAILED:Lcom/discord/utilities/search/network/state/QueryFetchState;
|
|
|
|
if-ne v6, v1, :cond_d
|
|
|
|
new-instance v1, Lcom/discord/widgets/chat/list/entries/SearchErrorEntry;
|
|
|
|
invoke-direct {v1}, Lcom/discord/widgets/chat/list/entries/SearchErrorEntry;-><init>()V
|
|
|
|
invoke-interface {v7, v1}, Ljava/util/List;->add(Ljava/lang/Object;)Z
|
|
|
|
goto/16 :goto_5
|
|
|
|
:cond_4
|
|
:goto_0
|
|
invoke-virtual/range {p0 .. p0}, Lcom/discord/utilities/search/network/state/SearchState;->getHits()Ljava/util/List;
|
|
|
|
move-result-object v8
|
|
|
|
if-eqz v8, :cond_5
|
|
|
|
invoke-virtual/range {p0 .. p0}, Lcom/discord/utilities/search/network/state/SearchState;->getHits()Ljava/util/List;
|
|
|
|
move-result-object v8
|
|
|
|
goto :goto_1
|
|
|
|
:cond_5
|
|
new-instance v8, Ljava/util/ArrayList;
|
|
|
|
invoke-direct {v8}, Ljava/util/ArrayList;-><init>()V
|
|
|
|
:goto_1
|
|
invoke-interface {v8}, Ljava/util/List;->isEmpty()Z
|
|
|
|
move-result v9
|
|
|
|
if-nez v9, :cond_6
|
|
|
|
invoke-interface {v8}, Ljava/util/List;->size()I
|
|
|
|
move-result v5
|
|
|
|
const/4 v9, 0x1
|
|
|
|
sub-int/2addr v5, v9
|
|
|
|
invoke-interface {v8, v5}, Ljava/util/List;->get(I)Ljava/lang/Object;
|
|
|
|
move-result-object v5
|
|
|
|
check-cast v5, Lcom/discord/models/domain/ModelMessage;
|
|
|
|
invoke-virtual {v5}, Lcom/discord/models/domain/ModelMessage;->getId()J
|
|
|
|
move-result-wide v10
|
|
|
|
invoke-static {v10, v11}, Ljava/lang/Long;->valueOf(J)Ljava/lang/Long;
|
|
|
|
move-result-object v5
|
|
|
|
invoke-virtual/range {p0 .. p0}, Lcom/discord/utilities/search/network/state/SearchState;->getTotalResults()I
|
|
|
|
move-result v10
|
|
|
|
invoke-virtual/range {p7 .. p7}, Landroid/content/Context;->getResources()Landroid/content/res/Resources;
|
|
|
|
move-result-object v11
|
|
|
|
const v12, 0x7f1000b1
|
|
|
|
new-array v9, v9, [Ljava/lang/Object;
|
|
|
|
const/4 v14, 0x0
|
|
|
|
invoke-static {v10}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;
|
|
|
|
move-result-object v15
|
|
|
|
aput-object v15, v9, v14
|
|
|
|
invoke-virtual {v11, v12, v10, v9}, Landroid/content/res/Resources;->getQuantityString(II[Ljava/lang/Object;)Ljava/lang/String;
|
|
|
|
move-result-object v9
|
|
|
|
new-instance v10, Lcom/discord/widgets/chat/list/entries/SearchResultCountEntry;
|
|
|
|
invoke-direct {v10, v9}, Lcom/discord/widgets/chat/list/entries/SearchResultCountEntry;-><init>(Ljava/lang/String;)V
|
|
|
|
invoke-interface {v7, v10}, Ljava/util/List;->add(Ljava/lang/Object;)Z
|
|
|
|
:cond_6
|
|
invoke-interface {v8}, Ljava/util/List;->iterator()Ljava/util/Iterator;
|
|
|
|
move-result-object v8
|
|
|
|
:cond_7
|
|
:goto_2
|
|
invoke-interface {v8}, Ljava/util/Iterator;->hasNext()Z
|
|
|
|
move-result v9
|
|
|
|
if-eqz v9, :cond_b
|
|
|
|
invoke-interface {v8}, Ljava/util/Iterator;->next()Ljava/lang/Object;
|
|
|
|
move-result-object v9
|
|
|
|
check-cast v9, Lcom/discord/models/domain/ModelMessage;
|
|
|
|
invoke-virtual {v9}, Lcom/discord/models/domain/ModelMessage;->getChannelId()J
|
|
|
|
move-result-wide v10
|
|
|
|
invoke-static {v10, v11}, Ljava/lang/Long;->valueOf(J)Ljava/lang/Long;
|
|
|
|
move-result-object v12
|
|
|
|
invoke-interface {v4, v12}, Ljava/util/Map;->get(Ljava/lang/Object;)Ljava/lang/Object;
|
|
|
|
move-result-object v12
|
|
|
|
check-cast v12, Lcom/discord/models/domain/ModelChannel;
|
|
|
|
if-eqz v12, :cond_7
|
|
|
|
invoke-virtual {v12}, Lcom/discord/models/domain/ModelChannel;->getGuildId()Ljava/lang/Long;
|
|
|
|
move-result-object v14
|
|
|
|
invoke-virtual {v14}, Ljava/lang/Long;->longValue()J
|
|
|
|
move-result-wide v23
|
|
|
|
invoke-static/range {v23 .. v24}, Ljava/lang/Long;->valueOf(J)Ljava/lang/Long;
|
|
|
|
move-result-object v14
|
|
|
|
invoke-interface {v2, v14}, Ljava/util/Map;->get(Ljava/lang/Object;)Ljava/lang/Object;
|
|
|
|
move-result-object v14
|
|
|
|
check-cast v14, Ljava/util/Map;
|
|
|
|
if-eqz v14, :cond_8
|
|
|
|
invoke-interface {v14, v0}, Ljava/util/Map;->get(Ljava/lang/Object;)Ljava/lang/Object;
|
|
|
|
move-result-object v15
|
|
|
|
if-eqz v15, :cond_8
|
|
|
|
invoke-interface {v14, v0}, Ljava/util/Map;->get(Ljava/lang/Object;)Ljava/lang/Object;
|
|
|
|
move-result-object v14
|
|
|
|
check-cast v14, Lcom/discord/models/domain/ModelGuildMember$Computed;
|
|
|
|
invoke-virtual {v14}, Lcom/discord/models/domain/ModelGuildMember$Computed;->getRoles()Ljava/util/List;
|
|
|
|
move-result-object v14
|
|
|
|
invoke-interface {v13, v14}, Ljava/util/Set;->addAll(Ljava/util/Collection;)Z
|
|
|
|
:cond_8
|
|
invoke-static/range {v23 .. v24}, Ljava/lang/Long;->valueOf(J)Ljava/lang/Long;
|
|
|
|
move-result-object v14
|
|
|
|
invoke-interface {v1, v14}, Ljava/util/Map;->get(Ljava/lang/Object;)Ljava/lang/Object;
|
|
|
|
move-result-object v14
|
|
|
|
check-cast v14, Lcom/discord/models/domain/ModelGuild;
|
|
|
|
invoke-static {v9, v12, v14}, Lcom/discord/widgets/chat/list/entries/MessageHeaderEntry;->create(Lcom/discord/models/domain/ModelMessage;Lcom/discord/models/domain/ModelChannel;Lcom/discord/models/domain/ModelGuild;)Lcom/discord/widgets/chat/list/entries/MessageHeaderEntry;
|
|
|
|
move-result-object v14
|
|
|
|
invoke-interface {v7, v14}, Ljava/util/List;->add(Ljava/lang/Object;)Z
|
|
|
|
invoke-static {v10, v11}, Ljava/lang/Long;->valueOf(J)Ljava/lang/Long;
|
|
|
|
move-result-object v14
|
|
|
|
invoke-interface {v2, v14}, Ljava/util/Map;->containsKey(Ljava/lang/Object;)Z
|
|
|
|
move-result v14
|
|
|
|
if-eqz v14, :cond_9
|
|
|
|
invoke-static {v10, v11}, Ljava/lang/Long;->valueOf(J)Ljava/lang/Long;
|
|
|
|
move-result-object v10
|
|
|
|
invoke-interface {v2, v10}, Ljava/util/Map;->get(Ljava/lang/Object;)Ljava/lang/Object;
|
|
|
|
move-result-object v10
|
|
|
|
check-cast v10, Ljava/util/Map;
|
|
|
|
goto :goto_3
|
|
|
|
:cond_9
|
|
invoke-static {}, Ljava/util/Collections;->emptyMap()Ljava/util/Map;
|
|
|
|
move-result-object v10
|
|
|
|
:goto_3
|
|
move-object v15, v10
|
|
|
|
invoke-static/range {v23 .. v24}, Ljava/lang/Long;->valueOf(J)Ljava/lang/Long;
|
|
|
|
move-result-object v10
|
|
|
|
invoke-interface {v3, v10}, Ljava/util/Map;->containsKey(Ljava/lang/Object;)Z
|
|
|
|
move-result v10
|
|
|
|
if-eqz v10, :cond_a
|
|
|
|
invoke-static/range {v23 .. v24}, Ljava/lang/Long;->valueOf(J)Ljava/lang/Long;
|
|
|
|
move-result-object v10
|
|
|
|
invoke-interface {v3, v10}, Ljava/util/Map;->get(Ljava/lang/Object;)Ljava/lang/Object;
|
|
|
|
move-result-object v10
|
|
|
|
check-cast v10, Ljava/util/Map;
|
|
|
|
goto :goto_4
|
|
|
|
:cond_a
|
|
invoke-static {}, Ljava/util/Collections;->emptyMap()Ljava/util/Map;
|
|
|
|
move-result-object v10
|
|
|
|
:goto_4
|
|
move-object/from16 v16, v10
|
|
|
|
invoke-virtual {v12}, Lcom/discord/models/domain/ModelChannel;->getNicks()Ljava/util/Map;
|
|
|
|
move-result-object v14
|
|
|
|
const/16 v18, 0x0
|
|
|
|
const/16 v19, 0x0
|
|
|
|
const/16 v20, 0x0
|
|
|
|
const/16 v21, 0x0
|
|
|
|
move-object/from16 v17, v9
|
|
|
|
move/from16 v22, p8
|
|
|
|
invoke-static/range {v14 .. v24}, Lcom/discord/widgets/chat/list/model/WidgetChatListModel$Messages;->getMessageItems(Ljava/util/Map;Ljava/util/Map;Ljava/util/Map;Lcom/discord/models/domain/ModelMessage;Lcom/discord/stores/StoreMessageState$State;ZZZZJ)Ljava/util/List;
|
|
|
|
move-result-object v9
|
|
|
|
invoke-interface {v7, v9}, Ljava/util/List;->addAll(Ljava/util/Collection;)Z
|
|
|
|
goto/16 :goto_2
|
|
|
|
:cond_b
|
|
sget-object v1, Lcom/discord/utilities/search/network/state/QueryFetchState;->LOADING_MORE:Lcom/discord/utilities/search/network/state/QueryFetchState;
|
|
|
|
if-ne v6, v1, :cond_c
|
|
|
|
new-instance v1, Lcom/discord/widgets/chat/list/entries/LoadingEntry;
|
|
|
|
invoke-direct {v1}, Lcom/discord/widgets/chat/list/entries/LoadingEntry;-><init>()V
|
|
|
|
invoke-interface {v7, v1}, Ljava/util/List;->add(Ljava/lang/Object;)Z
|
|
|
|
goto :goto_5
|
|
|
|
:cond_c
|
|
invoke-interface {v7}, Ljava/util/List;->isEmpty()Z
|
|
|
|
move-result v1
|
|
|
|
if-eqz v1, :cond_d
|
|
|
|
new-instance v1, Lcom/discord/widgets/chat/list/entries/SearchEmptyEntry;
|
|
|
|
invoke-direct {v1}, Lcom/discord/widgets/chat/list/entries/SearchEmptyEntry;-><init>()V
|
|
|
|
invoke-interface {v7, v1}, Ljava/util/List;->add(Ljava/lang/Object;)Z
|
|
|
|
:cond_d
|
|
:goto_5
|
|
new-instance v1, Lcom/discord/widgets/search/results/WidgetSearchResults$Model;
|
|
|
|
invoke-virtual/range {p1 .. p1}, Ljava/lang/Long;->longValue()J
|
|
|
|
move-result-wide v8
|
|
|
|
if-eqz v5, :cond_e
|
|
|
|
invoke-virtual {v5}, Ljava/lang/Long;->longValue()J
|
|
|
|
move-result-wide v2
|
|
|
|
goto :goto_6
|
|
|
|
:cond_e
|
|
const-wide/16 v2, 0x0
|
|
|
|
:goto_6
|
|
move-wide v11, v2
|
|
|
|
move-object v6, v1
|
|
|
|
move-object/from16 v10, p2
|
|
|
|
invoke-direct/range {v6 .. v13}, Lcom/discord/widgets/search/results/WidgetSearchResults$Model;-><init>(Ljava/util/List;JLjava/util/Map;JLjava/util/Set;)V
|
|
|
|
return-object v1
|
|
|
|
:cond_f
|
|
:goto_7
|
|
return-object v5
|
|
.end method
|
|
|
|
.method public static get(Landroid/content/Context;)Lrx/Observable;
|
|
.locals 10
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"(",
|
|
"Landroid/content/Context;",
|
|
")",
|
|
"Lrx/Observable<",
|
|
"Lcom/discord/widgets/search/results/WidgetSearchResults$Model;",
|
|
">;"
|
|
}
|
|
.end annotation
|
|
|
|
invoke-static {}, Lcom/discord/stores/StoreStream;->getSearch()Lcom/discord/stores/StoreSearch;
|
|
|
|
move-result-object v0
|
|
|
|
invoke-virtual {v0}, Lcom/discord/stores/StoreSearch;->getStoreSearchQuery()Lcom/discord/stores/StoreSearchQuery;
|
|
|
|
move-result-object v0
|
|
|
|
invoke-virtual {v0}, Lcom/discord/stores/StoreSearchQuery;->getState()Lrx/Observable;
|
|
|
|
move-result-object v1
|
|
|
|
invoke-static {}, Lcom/discord/stores/StoreStream;->getUsers()Lcom/discord/stores/StoreUser;
|
|
|
|
move-result-object v0
|
|
|
|
invoke-virtual {v0}, Lcom/discord/stores/StoreUser;->getMeId()Lrx/Observable;
|
|
|
|
move-result-object v2
|
|
|
|
invoke-static {}, Lcom/discord/stores/StoreStream;->getChannels()Lcom/discord/stores/StoreChannels;
|
|
|
|
move-result-object v0
|
|
|
|
invoke-virtual {v0}, Lcom/discord/stores/StoreChannels;->getNames()Lrx/Observable;
|
|
|
|
move-result-object v3
|
|
|
|
invoke-static {}, Lcom/discord/stores/StoreStream;->getGuilds()Lcom/discord/stores/StoreGuilds;
|
|
|
|
move-result-object v0
|
|
|
|
invoke-virtual {v0}, Lcom/discord/stores/StoreGuilds;->get()Lrx/Observable;
|
|
|
|
move-result-object v4
|
|
|
|
invoke-static {}, Lcom/discord/stores/StoreStream;->getGuilds()Lcom/discord/stores/StoreGuilds;
|
|
|
|
move-result-object v0
|
|
|
|
invoke-virtual {v0}, Lcom/discord/stores/StoreGuilds;->getComputed()Lrx/Observable;
|
|
|
|
move-result-object v5
|
|
|
|
invoke-static {}, Lcom/discord/stores/StoreStream;->getGuilds()Lcom/discord/stores/StoreGuilds;
|
|
|
|
move-result-object v0
|
|
|
|
invoke-virtual {v0}, Lcom/discord/stores/StoreGuilds;->getRoles()Lrx/Observable;
|
|
|
|
move-result-object v6
|
|
|
|
invoke-static {}, Lcom/discord/stores/StoreStream;->getChannels()Lcom/discord/stores/StoreChannels;
|
|
|
|
move-result-object v0
|
|
|
|
invoke-virtual {v0}, Lcom/discord/stores/StoreChannels;->get()Lrx/Observable;
|
|
|
|
move-result-object v7
|
|
|
|
invoke-static {}, Lcom/discord/stores/StoreStream;->getUserSettings()Lcom/discord/stores/StoreUserSettings;
|
|
|
|
move-result-object v0
|
|
|
|
invoke-virtual {v0}, Lcom/discord/stores/StoreUserSettings;->getAllowAnimatedEmojisObservable()Lrx/Observable;
|
|
|
|
move-result-object v8
|
|
|
|
new-instance v9, Lcom/discord/widgets/search/results/-$$Lambda$WidgetSearchResults$Model$wxqQGDZWOCPR007LsTR1SXId9eA;
|
|
|
|
invoke-direct {v9, p0}, Lcom/discord/widgets/search/results/-$$Lambda$WidgetSearchResults$Model$wxqQGDZWOCPR007LsTR1SXId9eA;-><init>(Landroid/content/Context;)V
|
|
|
|
invoke-static/range {v1 .. v9}, Lrx/Observable;->a(Lrx/Observable;Lrx/Observable;Lrx/Observable;Lrx/Observable;Lrx/Observable;Lrx/Observable;Lrx/Observable;Lrx/Observable;Lrx/functions/Func8;)Lrx/Observable;
|
|
|
|
move-result-object p0
|
|
|
|
invoke-static {}, Lcom/discord/app/i;->dC()Lrx/Observable$c;
|
|
|
|
move-result-object v0
|
|
|
|
invoke-virtual {p0, v0}, Lrx/Observable;->a(Lrx/Observable$c;)Lrx/Observable;
|
|
|
|
move-result-object p0
|
|
|
|
return-object p0
|
|
.end method
|
|
|
|
.method static synthetic lambda$get$0(Landroid/content/Context;Lcom/discord/utilities/search/network/state/SearchState;Ljava/lang/Long;Ljava/util/Map;Ljava/util/Map;Ljava/util/Map;Ljava/util/Map;Ljava/util/Map;Ljava/lang/Boolean;)Lcom/discord/widgets/search/results/WidgetSearchResults$Model;
|
|
.locals 9
|
|
|
|
invoke-virtual/range {p8 .. p8}, Ljava/lang/Boolean;->booleanValue()Z
|
|
|
|
move-result v8
|
|
|
|
move-object v0, p1
|
|
|
|
move-object v1, p2
|
|
|
|
move-object v2, p3
|
|
|
|
move-object v3, p4
|
|
|
|
move-object v4, p5
|
|
|
|
move-object v5, p6
|
|
|
|
move-object/from16 v6, p7
|
|
|
|
move-object v7, p0
|
|
|
|
invoke-static/range {v0 .. v8}, Lcom/discord/widgets/search/results/WidgetSearchResults$Model;->create(Lcom/discord/utilities/search/network/state/SearchState;Ljava/lang/Long;Ljava/util/Map;Ljava/util/Map;Ljava/util/Map;Ljava/util/Map;Ljava/util/Map;Landroid/content/Context;Z)Lcom/discord/widgets/search/results/WidgetSearchResults$Model;
|
|
|
|
move-result-object v0
|
|
|
|
return-object v0
|
|
.end method
|
|
|
|
|
|
# virtual methods
|
|
.method protected canEqual(Ljava/lang/Object;)Z
|
|
.locals 0
|
|
|
|
instance-of p1, p1, Lcom/discord/widgets/search/results/WidgetSearchResults$Model;
|
|
|
|
return p1
|
|
.end method
|
|
|
|
.method public equals(Ljava/lang/Object;)Z
|
|
.locals 7
|
|
|
|
const/4 v0, 0x1
|
|
|
|
if-ne p1, p0, :cond_0
|
|
|
|
return v0
|
|
|
|
:cond_0
|
|
instance-of v1, p1, Lcom/discord/widgets/search/results/WidgetSearchResults$Model;
|
|
|
|
const/4 v2, 0x0
|
|
|
|
if-nez v1, :cond_1
|
|
|
|
return v2
|
|
|
|
:cond_1
|
|
check-cast p1, Lcom/discord/widgets/search/results/WidgetSearchResults$Model;
|
|
|
|
invoke-virtual {p1, p0}, Lcom/discord/widgets/search/results/WidgetSearchResults$Model;->canEqual(Ljava/lang/Object;)Z
|
|
|
|
move-result v1
|
|
|
|
if-nez v1, :cond_2
|
|
|
|
return v2
|
|
|
|
:cond_2
|
|
iget-object v1, p0, Lcom/discord/widgets/search/results/WidgetSearchResults$Model;->items:Ljava/util/List;
|
|
|
|
iget-object v3, p1, Lcom/discord/widgets/search/results/WidgetSearchResults$Model;->items:Ljava/util/List;
|
|
|
|
if-nez v1, :cond_3
|
|
|
|
if-eqz v3, :cond_4
|
|
|
|
goto :goto_0
|
|
|
|
:cond_3
|
|
invoke-virtual {v1, v3}, Ljava/lang/Object;->equals(Ljava/lang/Object;)Z
|
|
|
|
move-result v1
|
|
|
|
if-nez v1, :cond_4
|
|
|
|
:goto_0
|
|
return v2
|
|
|
|
:cond_4
|
|
invoke-virtual {p0}, Lcom/discord/widgets/search/results/WidgetSearchResults$Model;->getUserId()J
|
|
|
|
move-result-wide v3
|
|
|
|
invoke-virtual {p1}, Lcom/discord/widgets/search/results/WidgetSearchResults$Model;->getUserId()J
|
|
|
|
move-result-wide v5
|
|
|
|
cmp-long v1, v3, v5
|
|
|
|
if-eqz v1, :cond_5
|
|
|
|
return v2
|
|
|
|
:cond_5
|
|
invoke-virtual {p0}, Lcom/discord/widgets/search/results/WidgetSearchResults$Model;->getChannelNames()Ljava/util/Map;
|
|
|
|
move-result-object v1
|
|
|
|
invoke-virtual {p1}, Lcom/discord/widgets/search/results/WidgetSearchResults$Model;->getChannelNames()Ljava/util/Map;
|
|
|
|
move-result-object v3
|
|
|
|
if-nez v1, :cond_6
|
|
|
|
if-eqz v3, :cond_7
|
|
|
|
goto :goto_1
|
|
|
|
:cond_6
|
|
invoke-virtual {v1, v3}, Ljava/lang/Object;->equals(Ljava/lang/Object;)Z
|
|
|
|
move-result v1
|
|
|
|
if-nez v1, :cond_7
|
|
|
|
:goto_1
|
|
return v2
|
|
|
|
:cond_7
|
|
invoke-virtual {p0}, Lcom/discord/widgets/search/results/WidgetSearchResults$Model;->getOldestMessageId()J
|
|
|
|
move-result-wide v3
|
|
|
|
invoke-virtual {p1}, Lcom/discord/widgets/search/results/WidgetSearchResults$Model;->getOldestMessageId()J
|
|
|
|
move-result-wide v5
|
|
|
|
cmp-long v1, v3, v5
|
|
|
|
if-eqz v1, :cond_8
|
|
|
|
return v2
|
|
|
|
:cond_8
|
|
invoke-virtual {p0}, Lcom/discord/widgets/search/results/WidgetSearchResults$Model;->getMyRoleIds()Ljava/util/Set;
|
|
|
|
move-result-object v1
|
|
|
|
invoke-virtual {p1}, Lcom/discord/widgets/search/results/WidgetSearchResults$Model;->getMyRoleIds()Ljava/util/Set;
|
|
|
|
move-result-object p1
|
|
|
|
if-nez v1, :cond_9
|
|
|
|
if-eqz p1, :cond_a
|
|
|
|
goto :goto_2
|
|
|
|
:cond_9
|
|
invoke-virtual {v1, p1}, Ljava/lang/Object;->equals(Ljava/lang/Object;)Z
|
|
|
|
move-result p1
|
|
|
|
if-nez p1, :cond_a
|
|
|
|
:goto_2
|
|
return v2
|
|
|
|
:cond_a
|
|
return v0
|
|
.end method
|
|
|
|
.method public getChannelId()J
|
|
.locals 2
|
|
|
|
const-wide/16 v0, 0x0
|
|
|
|
return-wide v0
|
|
.end method
|
|
|
|
.method public getChannelNames()Ljava/util/Map;
|
|
.locals 1
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"()",
|
|
"Ljava/util/Map<",
|
|
"Ljava/lang/Long;",
|
|
"Ljava/lang/String;",
|
|
">;"
|
|
}
|
|
.end annotation
|
|
|
|
iget-object v0, p0, Lcom/discord/widgets/search/results/WidgetSearchResults$Model;->channelNames:Ljava/util/Map;
|
|
|
|
return-object v0
|
|
.end method
|
|
|
|
.method public getGuild()Lcom/discord/models/domain/ModelGuild;
|
|
.locals 1
|
|
|
|
const/4 v0, 0x0
|
|
|
|
return-object v0
|
|
.end method
|
|
|
|
.method public getGuildId()J
|
|
.locals 2
|
|
|
|
const-wide/16 v0, 0x0
|
|
|
|
return-wide v0
|
|
.end method
|
|
|
|
.method public getList()Ljava/util/List;
|
|
.locals 1
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"()",
|
|
"Ljava/util/List<",
|
|
"Lcom/discord/widgets/chat/list/entries/ChatListEntry;",
|
|
">;"
|
|
}
|
|
.end annotation
|
|
|
|
iget-object v0, p0, Lcom/discord/widgets/search/results/WidgetSearchResults$Model;->items:Ljava/util/List;
|
|
|
|
return-object v0
|
|
.end method
|
|
|
|
.method public getMyRoleIds()Ljava/util/Set;
|
|
.locals 1
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"()",
|
|
"Ljava/util/Set<",
|
|
"Ljava/lang/Long;",
|
|
">;"
|
|
}
|
|
.end annotation
|
|
|
|
iget-object v0, p0, Lcom/discord/widgets/search/results/WidgetSearchResults$Model;->myRoleIds:Ljava/util/Set;
|
|
|
|
return-object v0
|
|
.end method
|
|
|
|
.method public getNewMessagesMarkerMessageId()J
|
|
.locals 2
|
|
|
|
const-wide/16 v0, 0x0
|
|
|
|
return-wide v0
|
|
.end method
|
|
|
|
.method public getOldestMessageId()J
|
|
.locals 2
|
|
|
|
iget-wide v0, p0, Lcom/discord/widgets/search/results/WidgetSearchResults$Model;->oldestMessageId:J
|
|
|
|
return-wide v0
|
|
.end method
|
|
|
|
.method public getUserId()J
|
|
.locals 2
|
|
|
|
iget-wide v0, p0, Lcom/discord/widgets/search/results/WidgetSearchResults$Model;->userId:J
|
|
|
|
return-wide v0
|
|
.end method
|
|
|
|
.method public hashCode()I
|
|
.locals 7
|
|
|
|
iget-object v0, p0, Lcom/discord/widgets/search/results/WidgetSearchResults$Model;->items:Ljava/util/List;
|
|
|
|
const/16 v1, 0x2b
|
|
|
|
if-nez v0, :cond_0
|
|
|
|
const/16 v0, 0x2b
|
|
|
|
goto :goto_0
|
|
|
|
:cond_0
|
|
invoke-virtual {v0}, Ljava/lang/Object;->hashCode()I
|
|
|
|
move-result v0
|
|
|
|
:goto_0
|
|
add-int/lit8 v0, v0, 0x3b
|
|
|
|
invoke-virtual {p0}, Lcom/discord/widgets/search/results/WidgetSearchResults$Model;->getUserId()J
|
|
|
|
move-result-wide v2
|
|
|
|
mul-int/lit8 v0, v0, 0x3b
|
|
|
|
const/16 v4, 0x20
|
|
|
|
ushr-long v5, v2, v4
|
|
|
|
xor-long/2addr v2, v5
|
|
|
|
long-to-int v3, v2
|
|
|
|
add-int/2addr v0, v3
|
|
|
|
invoke-virtual {p0}, Lcom/discord/widgets/search/results/WidgetSearchResults$Model;->getChannelNames()Ljava/util/Map;
|
|
|
|
move-result-object v2
|
|
|
|
mul-int/lit8 v0, v0, 0x3b
|
|
|
|
if-nez v2, :cond_1
|
|
|
|
const/16 v2, 0x2b
|
|
|
|
goto :goto_1
|
|
|
|
:cond_1
|
|
invoke-virtual {v2}, Ljava/lang/Object;->hashCode()I
|
|
|
|
move-result v2
|
|
|
|
:goto_1
|
|
add-int/2addr v0, v2
|
|
|
|
invoke-virtual {p0}, Lcom/discord/widgets/search/results/WidgetSearchResults$Model;->getOldestMessageId()J
|
|
|
|
move-result-wide v2
|
|
|
|
mul-int/lit8 v0, v0, 0x3b
|
|
|
|
ushr-long v4, v2, v4
|
|
|
|
xor-long/2addr v2, v4
|
|
|
|
long-to-int v3, v2
|
|
|
|
add-int/2addr v0, v3
|
|
|
|
invoke-virtual {p0}, Lcom/discord/widgets/search/results/WidgetSearchResults$Model;->getMyRoleIds()Ljava/util/Set;
|
|
|
|
move-result-object v2
|
|
|
|
mul-int/lit8 v0, v0, 0x3b
|
|
|
|
if-nez v2, :cond_2
|
|
|
|
goto :goto_2
|
|
|
|
:cond_2
|
|
invoke-virtual {v2}, Ljava/lang/Object;->hashCode()I
|
|
|
|
move-result v1
|
|
|
|
:goto_2
|
|
add-int/2addr v0, v1
|
|
|
|
return v0
|
|
.end method
|
|
|
|
.method public isSpoilerClickAllowed()Z
|
|
.locals 1
|
|
|
|
const/4 v0, 0x0
|
|
|
|
return v0
|
|
.end method
|
|
|
|
.method public toString()Ljava/lang/String;
|
|
.locals 3
|
|
|
|
new-instance v0, Ljava/lang/StringBuilder;
|
|
|
|
const-string v1, "WidgetSearchResults.Model(items="
|
|
|
|
invoke-direct {v0, v1}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V
|
|
|
|
iget-object v1, p0, Lcom/discord/widgets/search/results/WidgetSearchResults$Model;->items:Ljava/util/List;
|
|
|
|
invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/Object;)Ljava/lang/StringBuilder;
|
|
|
|
const-string v1, ", userId="
|
|
|
|
invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
invoke-virtual {p0}, Lcom/discord/widgets/search/results/WidgetSearchResults$Model;->getUserId()J
|
|
|
|
move-result-wide v1
|
|
|
|
invoke-virtual {v0, v1, v2}, Ljava/lang/StringBuilder;->append(J)Ljava/lang/StringBuilder;
|
|
|
|
const-string v1, ", channelNames="
|
|
|
|
invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
invoke-virtual {p0}, Lcom/discord/widgets/search/results/WidgetSearchResults$Model;->getChannelNames()Ljava/util/Map;
|
|
|
|
move-result-object v1
|
|
|
|
invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/Object;)Ljava/lang/StringBuilder;
|
|
|
|
const-string v1, ", oldestMessageId="
|
|
|
|
invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
invoke-virtual {p0}, Lcom/discord/widgets/search/results/WidgetSearchResults$Model;->getOldestMessageId()J
|
|
|
|
move-result-wide v1
|
|
|
|
invoke-virtual {v0, v1, v2}, Ljava/lang/StringBuilder;->append(J)Ljava/lang/StringBuilder;
|
|
|
|
const-string v1, ", myRoleIds="
|
|
|
|
invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
invoke-virtual {p0}, Lcom/discord/widgets/search/results/WidgetSearchResults$Model;->getMyRoleIds()Ljava/util/Set;
|
|
|
|
move-result-object v1
|
|
|
|
invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/Object;)Ljava/lang/StringBuilder;
|
|
|
|
const-string v1, ")"
|
|
|
|
invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
invoke-virtual {v0}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
|
|
|
|
move-result-object v0
|
|
|
|
return-object v0
|
|
.end method
|