395 lines
10 KiB
Smali
395 lines
10 KiB
Smali
.class public final Lcom/discord/widgets/channels/list/WidgetChannelListModel$Companion$getPrivateChannelList$1;
|
|
.super Ljava/lang/Object;
|
|
.source "WidgetChannelListModel.kt"
|
|
|
|
# interfaces
|
|
.implements Lrx/functions/Func7;
|
|
|
|
|
|
# annotations
|
|
.annotation system Ldalvik/annotation/EnclosingMethod;
|
|
value = Lcom/discord/widgets/channels/list/WidgetChannelListModel$Companion;->getPrivateChannelList()Lrx/Observable;
|
|
.end annotation
|
|
|
|
.annotation system Ldalvik/annotation/InnerClass;
|
|
accessFlags = 0x19
|
|
name = null
|
|
.end annotation
|
|
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"<T1:",
|
|
"Ljava/lang/Object;",
|
|
"T2:",
|
|
"Ljava/lang/Object;",
|
|
"T3:",
|
|
"Ljava/lang/Object;",
|
|
"T4:",
|
|
"Ljava/lang/Object;",
|
|
"T5:",
|
|
"Ljava/lang/Object;",
|
|
"T6:",
|
|
"Ljava/lang/Object;",
|
|
"T7:",
|
|
"Ljava/lang/Object;",
|
|
"R:",
|
|
"Ljava/lang/Object;",
|
|
">",
|
|
"Ljava/lang/Object;",
|
|
"Lrx/functions/Func7<",
|
|
"Ljava/util/Map<",
|
|
"Ljava/lang/Long;",
|
|
"+",
|
|
"Lcom/discord/models/domain/ModelChannel;",
|
|
">;",
|
|
"Ljava/lang/Long;",
|
|
"Ljava/util/Map<",
|
|
"Ljava/lang/Long;",
|
|
"+",
|
|
"Lcom/discord/models/domain/ModelPresence;",
|
|
">;",
|
|
"Ljava/util/Map<",
|
|
"Ljava/lang/Long;",
|
|
"+",
|
|
"Ljava/lang/Long;",
|
|
">;",
|
|
"Ljava/util/Map<",
|
|
"Ljava/lang/Long;",
|
|
"+",
|
|
"Ljava/lang/Integer;",
|
|
">;",
|
|
"Ljava/util/Map<",
|
|
"Ljava/lang/Long;",
|
|
"+",
|
|
"Lcom/discord/models/domain/ModelApplicationStream;",
|
|
">;",
|
|
"Lcom/discord/models/domain/ModelNotificationSettings;",
|
|
"Lcom/discord/widgets/channels/list/WidgetChannelListModel;",
|
|
">;"
|
|
}
|
|
.end annotation
|
|
|
|
|
|
# static fields
|
|
.field public static final INSTANCE:Lcom/discord/widgets/channels/list/WidgetChannelListModel$Companion$getPrivateChannelList$1;
|
|
|
|
|
|
# direct methods
|
|
.method public static constructor <clinit>()V
|
|
.locals 1
|
|
|
|
new-instance v0, Lcom/discord/widgets/channels/list/WidgetChannelListModel$Companion$getPrivateChannelList$1;
|
|
|
|
invoke-direct {v0}, Lcom/discord/widgets/channels/list/WidgetChannelListModel$Companion$getPrivateChannelList$1;-><init>()V
|
|
|
|
sput-object v0, Lcom/discord/widgets/channels/list/WidgetChannelListModel$Companion$getPrivateChannelList$1;->INSTANCE:Lcom/discord/widgets/channels/list/WidgetChannelListModel$Companion$getPrivateChannelList$1;
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public constructor <init>()V
|
|
.locals 0
|
|
|
|
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
|
|
# virtual methods
|
|
.method public final call(Ljava/util/Map;Ljava/lang/Long;Ljava/util/Map;Ljava/util/Map;Ljava/util/Map;Ljava/util/Map;Lcom/discord/models/domain/ModelNotificationSettings;)Lcom/discord/widgets/channels/list/WidgetChannelListModel;
|
|
.locals 16
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"(",
|
|
"Ljava/util/Map<",
|
|
"Ljava/lang/Long;",
|
|
"+",
|
|
"Lcom/discord/models/domain/ModelChannel;",
|
|
">;",
|
|
"Ljava/lang/Long;",
|
|
"Ljava/util/Map<",
|
|
"Ljava/lang/Long;",
|
|
"Lcom/discord/models/domain/ModelPresence;",
|
|
">;",
|
|
"Ljava/util/Map<",
|
|
"Ljava/lang/Long;",
|
|
"Ljava/lang/Long;",
|
|
">;",
|
|
"Ljava/util/Map<",
|
|
"Ljava/lang/Long;",
|
|
"Ljava/lang/Integer;",
|
|
">;",
|
|
"Ljava/util/Map<",
|
|
"Ljava/lang/Long;",
|
|
"+",
|
|
"Lcom/discord/models/domain/ModelApplicationStream;",
|
|
">;",
|
|
"Lcom/discord/models/domain/ModelNotificationSettings;",
|
|
")",
|
|
"Lcom/discord/widgets/channels/list/WidgetChannelListModel;"
|
|
}
|
|
.end annotation
|
|
|
|
move-object/from16 v0, p3
|
|
|
|
move-object/from16 v1, p4
|
|
|
|
move-object/from16 v2, p6
|
|
|
|
invoke-interface/range {p1 .. p1}, Ljava/util/Map;->values()Ljava/util/Collection;
|
|
|
|
move-result-object v3
|
|
|
|
sget-object v4, Lcom/discord/utilities/channel/ChannelUtils;->INSTANCE:Lcom/discord/utilities/channel/ChannelUtils;
|
|
|
|
const-string v5, "mostRecentMessageIds"
|
|
|
|
invoke-static {v1, v5}, Lc0/n/c/j;->checkNotNullExpressionValue(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
invoke-virtual {v4, v1}, Lcom/discord/utilities/channel/ChannelUtils;->createMostRecentChannelComparator(Ljava/util/Map;)Ljava/util/Comparator;
|
|
|
|
move-result-object v1
|
|
|
|
invoke-static {v3, v1}, Lc0/i/f;->sortedWith(Ljava/lang/Iterable;Ljava/util/Comparator;)Ljava/util/List;
|
|
|
|
move-result-object v1
|
|
|
|
new-instance v3, Ljava/util/ArrayList;
|
|
|
|
const/16 v4, 0xa
|
|
|
|
invoke-static {v1, v4}, Lf/h/a/f/e/n/f;->collectionSizeOrDefault(Ljava/lang/Iterable;I)I
|
|
|
|
move-result v4
|
|
|
|
invoke-direct {v3, v4}, Ljava/util/ArrayList;-><init>(I)V
|
|
|
|
invoke-interface {v1}, Ljava/lang/Iterable;->iterator()Ljava/util/Iterator;
|
|
|
|
move-result-object v1
|
|
|
|
:goto_0
|
|
invoke-interface {v1}, Ljava/util/Iterator;->hasNext()Z
|
|
|
|
move-result v4
|
|
|
|
const/4 v5, 0x1
|
|
|
|
const/4 v6, 0x0
|
|
|
|
if-eqz v4, :cond_6
|
|
|
|
invoke-interface {v1}, Ljava/util/Iterator;->next()Ljava/lang/Object;
|
|
|
|
move-result-object v4
|
|
|
|
move-object v8, v4
|
|
|
|
check-cast v8, Lcom/discord/models/domain/ModelChannel;
|
|
|
|
new-instance v4, Lcom/discord/widgets/channels/list/items/ChannelListItemPrivate;
|
|
|
|
const-string v7, "presences"
|
|
|
|
invoke-static {v0, v7}, Lc0/n/c/j;->checkNotNullExpressionValue(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
invoke-virtual {v8}, Lcom/discord/models/domain/ModelChannel;->getDMRecipient()Lcom/discord/models/domain/ModelUser;
|
|
|
|
move-result-object v7
|
|
|
|
if-eqz v7, :cond_0
|
|
|
|
invoke-virtual {v7}, Lcom/discord/models/domain/ModelUser;->getId()J
|
|
|
|
move-result-wide v9
|
|
|
|
invoke-static {v9, v10}, Ljava/lang/Long;->valueOf(J)Ljava/lang/Long;
|
|
|
|
move-result-object v7
|
|
|
|
goto :goto_1
|
|
|
|
:cond_0
|
|
move-object v7, v6
|
|
|
|
:goto_1
|
|
invoke-interface {v0, v7}, Ljava/util/Map;->get(Ljava/lang/Object;)Ljava/lang/Object;
|
|
|
|
move-result-object v7
|
|
|
|
move-object v9, v7
|
|
|
|
check-cast v9, Lcom/discord/models/domain/ModelPresence;
|
|
|
|
invoke-virtual {v8}, Lcom/discord/models/domain/ModelChannel;->getId()J
|
|
|
|
move-result-wide v10
|
|
|
|
const/4 v7, 0x0
|
|
|
|
if-nez p2, :cond_1
|
|
|
|
goto :goto_2
|
|
|
|
:cond_1
|
|
invoke-virtual/range {p2 .. p2}, Ljava/lang/Long;->longValue()J
|
|
|
|
move-result-wide v12
|
|
|
|
cmp-long v14, v10, v12
|
|
|
|
if-nez v14, :cond_2
|
|
|
|
const/4 v10, 0x1
|
|
|
|
goto :goto_3
|
|
|
|
:cond_2
|
|
:goto_2
|
|
const/4 v10, 0x0
|
|
|
|
:goto_3
|
|
invoke-virtual {v8}, Lcom/discord/models/domain/ModelChannel;->getId()J
|
|
|
|
move-result-wide v11
|
|
|
|
invoke-static {v11, v12}, Ljava/lang/Long;->valueOf(J)Ljava/lang/Long;
|
|
|
|
move-result-object v5
|
|
|
|
move-object/from16 v14, p5
|
|
|
|
invoke-interface {v14, v5}, Ljava/util/Map;->get(Ljava/lang/Object;)Ljava/lang/Object;
|
|
|
|
move-result-object v5
|
|
|
|
check-cast v5, Ljava/lang/Integer;
|
|
|
|
if-eqz v5, :cond_3
|
|
|
|
invoke-virtual {v5}, Ljava/lang/Integer;->intValue()I
|
|
|
|
move-result v5
|
|
|
|
move v11, v5
|
|
|
|
goto :goto_4
|
|
|
|
:cond_3
|
|
const/4 v11, 0x0
|
|
|
|
:goto_4
|
|
const-string v5, "applicationStreams"
|
|
|
|
invoke-static {v2, v5}, Lc0/n/c/j;->checkNotNullExpressionValue(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
invoke-virtual {v8}, Lcom/discord/models/domain/ModelChannel;->getDMRecipient()Lcom/discord/models/domain/ModelUser;
|
|
|
|
move-result-object v5
|
|
|
|
if-eqz v5, :cond_4
|
|
|
|
invoke-virtual {v5}, Lcom/discord/models/domain/ModelUser;->getId()J
|
|
|
|
move-result-wide v5
|
|
|
|
invoke-static {v5, v6}, Ljava/lang/Long;->valueOf(J)Ljava/lang/Long;
|
|
|
|
move-result-object v6
|
|
|
|
:cond_4
|
|
invoke-interface {v2, v6}, Ljava/util/Map;->containsKey(Ljava/lang/Object;)Z
|
|
|
|
move-result v12
|
|
|
|
invoke-virtual {v8}, Lcom/discord/models/domain/ModelChannel;->getId()J
|
|
|
|
move-result-wide v5
|
|
|
|
move-object/from16 v15, p7
|
|
|
|
invoke-virtual {v15, v5, v6}, Lcom/discord/models/domain/ModelNotificationSettings;->getChannelOverride(J)Lcom/discord/models/domain/ModelNotificationSettings$ChannelOverride;
|
|
|
|
move-result-object v5
|
|
|
|
if-eqz v5, :cond_5
|
|
|
|
invoke-virtual {v5}, Lcom/discord/models/domain/ModelNotificationSettings$ChannelOverride;->isMuted()Z
|
|
|
|
move-result v5
|
|
|
|
move v13, v5
|
|
|
|
goto :goto_5
|
|
|
|
:cond_5
|
|
const/4 v13, 0x0
|
|
|
|
:goto_5
|
|
move-object v7, v4
|
|
|
|
invoke-direct/range {v7 .. v13}, Lcom/discord/widgets/channels/list/items/ChannelListItemPrivate;-><init>(Lcom/discord/models/domain/ModelChannel;Lcom/discord/models/domain/ModelPresence;ZIZZ)V
|
|
|
|
invoke-interface {v3, v4}, Ljava/util/Collection;->add(Ljava/lang/Object;)Z
|
|
|
|
goto/16 :goto_0
|
|
|
|
:cond_6
|
|
new-instance v0, Lcom/discord/widgets/channels/list/items/ChannelListBottomNavSpaceItem;
|
|
|
|
const-wide/16 v1, 0x0
|
|
|
|
invoke-direct {v0, v1, v2, v5, v6}, Lcom/discord/widgets/channels/list/items/ChannelListBottomNavSpaceItem;-><init>(JILkotlin/jvm/internal/DefaultConstructorMarker;)V
|
|
|
|
invoke-static {v3, v0}, Lc0/i/f;->plus(Ljava/util/Collection;Ljava/lang/Object;)Ljava/util/List;
|
|
|
|
move-result-object v9
|
|
|
|
new-instance v0, Lcom/discord/widgets/channels/list/WidgetChannelListModel;
|
|
|
|
const/4 v8, 0x0
|
|
|
|
const/4 v10, 0x0
|
|
|
|
const/4 v11, 0x0
|
|
|
|
invoke-interface {v3}, Ljava/util/List;->isEmpty()Z
|
|
|
|
move-result v12
|
|
|
|
const/16 v13, 0xc
|
|
|
|
const/4 v14, 0x0
|
|
|
|
move-object v7, v0
|
|
|
|
invoke-direct/range {v7 .. v14}, Lcom/discord/widgets/channels/list/WidgetChannelListModel;-><init>(Lcom/discord/models/domain/ModelGuild;Ljava/util/List;ZZZILkotlin/jvm/internal/DefaultConstructorMarker;)V
|
|
|
|
return-object v0
|
|
.end method
|
|
|
|
.method public bridge synthetic call(Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
|
|
.locals 0
|
|
|
|
check-cast p1, Ljava/util/Map;
|
|
|
|
check-cast p2, Ljava/lang/Long;
|
|
|
|
check-cast p3, Ljava/util/Map;
|
|
|
|
check-cast p4, Ljava/util/Map;
|
|
|
|
check-cast p5, Ljava/util/Map;
|
|
|
|
check-cast p6, Ljava/util/Map;
|
|
|
|
check-cast p7, Lcom/discord/models/domain/ModelNotificationSettings;
|
|
|
|
invoke-virtual/range {p0 .. p7}, Lcom/discord/widgets/channels/list/WidgetChannelListModel$Companion$getPrivateChannelList$1;->call(Ljava/util/Map;Ljava/lang/Long;Ljava/util/Map;Ljava/util/Map;Ljava/util/Map;Ljava/util/Map;Lcom/discord/models/domain/ModelNotificationSettings;)Lcom/discord/widgets/channels/list/WidgetChannelListModel;
|
|
|
|
move-result-object p1
|
|
|
|
return-object p1
|
|
.end method
|