2020-05-17 12:40:10 +00:00
|
|
|
.class public final Lcom/discord/widgets/servers/WidgetServerNotifications$Companion$getNotificationOverrides$2;
|
|
|
|
.super Ljava/lang/Object;
|
|
|
|
.source "WidgetServerNotifications.kt"
|
|
|
|
|
|
|
|
# interfaces
|
|
|
|
.implements Lrx/functions/Func3;
|
|
|
|
|
|
|
|
|
|
|
|
# annotations
|
|
|
|
.annotation system Ldalvik/annotation/EnclosingMethod;
|
|
|
|
value = Lcom/discord/widgets/servers/WidgetServerNotifications$Companion;->getNotificationOverrides(J)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;",
|
|
|
|
"R:",
|
|
|
|
"Ljava/lang/Object;",
|
|
|
|
">",
|
|
|
|
"Ljava/lang/Object;",
|
|
|
|
"Lrx/functions/Func3<",
|
2020-09-16 21:45:36 +00:00
|
|
|
"TT1;TT2;TT3;TR;>;"
|
2020-05-17 12:40:10 +00:00
|
|
|
}
|
|
|
|
.end annotation
|
|
|
|
|
|
|
|
|
|
|
|
# static fields
|
|
|
|
.field public static final INSTANCE:Lcom/discord/widgets/servers/WidgetServerNotifications$Companion$getNotificationOverrides$2;
|
|
|
|
|
|
|
|
|
|
|
|
# direct methods
|
|
|
|
.method public static constructor <clinit>()V
|
|
|
|
.locals 1
|
|
|
|
|
|
|
|
new-instance v0, Lcom/discord/widgets/servers/WidgetServerNotifications$Companion$getNotificationOverrides$2;
|
|
|
|
|
|
|
|
invoke-direct {v0}, Lcom/discord/widgets/servers/WidgetServerNotifications$Companion$getNotificationOverrides$2;-><init>()V
|
|
|
|
|
|
|
|
sput-object v0, Lcom/discord/widgets/servers/WidgetServerNotifications$Companion$getNotificationOverrides$2;->INSTANCE:Lcom/discord/widgets/servers/WidgetServerNotifications$Companion$getNotificationOverrides$2;
|
|
|
|
|
|
|
|
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 bridge synthetic call(Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
|
|
|
|
.locals 0
|
|
|
|
|
|
|
|
check-cast p1, Ljava/util/List;
|
|
|
|
|
|
|
|
check-cast p2, Ljava/util/Map;
|
|
|
|
|
|
|
|
check-cast p3, Lcom/discord/utilities/channel/GuildChannelsInfo;
|
|
|
|
|
|
|
|
invoke-virtual {p0, p1, p2, p3}, Lcom/discord/widgets/servers/WidgetServerNotifications$Companion$getNotificationOverrides$2;->call(Ljava/util/List;Ljava/util/Map;Lcom/discord/utilities/channel/GuildChannelsInfo;)Ljava/util/List;
|
|
|
|
|
|
|
|
move-result-object p1
|
|
|
|
|
|
|
|
return-object p1
|
|
|
|
.end method
|
|
|
|
|
|
|
|
.method public final call(Ljava/util/List;Ljava/util/Map;Lcom/discord/utilities/channel/GuildChannelsInfo;)Ljava/util/List;
|
|
|
|
.locals 7
|
|
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
|
|
value = {
|
|
|
|
"(",
|
|
|
|
"Ljava/util/List<",
|
|
|
|
"Lcom/discord/models/domain/ModelNotificationSettings$ChannelOverride;",
|
|
|
|
">;",
|
|
|
|
"Ljava/util/Map<",
|
|
|
|
"Ljava/lang/Long;",
|
|
|
|
"+",
|
|
|
|
"Lcom/discord/models/domain/ModelChannel;",
|
|
|
|
">;",
|
|
|
|
"Lcom/discord/utilities/channel/GuildChannelsInfo;",
|
|
|
|
")",
|
|
|
|
"Ljava/util/List<",
|
|
|
|
"Lcom/discord/widgets/servers/NotificationsOverridesAdapter$Item;",
|
|
|
|
">;"
|
|
|
|
}
|
|
|
|
.end annotation
|
|
|
|
|
|
|
|
const-string v0, "guildChannels"
|
|
|
|
|
2020-09-16 21:45:36 +00:00
|
|
|
invoke-static {p2, v0}, Lk0/n/c/h;->checkExpressionValueIsNotNull(Ljava/lang/Object;Ljava/lang/String;)V
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
invoke-virtual {p3, p2}, Lcom/discord/utilities/channel/GuildChannelsInfo;->getSortedVisibleChannels(Ljava/util/Map;)Ljava/util/List;
|
|
|
|
|
|
|
|
move-result-object p3
|
|
|
|
|
|
|
|
const-string v0, "channelOverrides"
|
|
|
|
|
2020-09-16 21:45:36 +00:00
|
|
|
invoke-static {p1, v0}, Lk0/n/c/h;->checkExpressionValueIsNotNull(Ljava/lang/Object;Ljava/lang/String;)V
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
new-instance v0, Ljava/util/ArrayList;
|
|
|
|
|
|
|
|
invoke-direct {v0}, Ljava/util/ArrayList;-><init>()V
|
|
|
|
|
|
|
|
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
|
|
|
|
|
|
|
|
move-result v1
|
|
|
|
|
|
|
|
const/4 v2, 0x0
|
|
|
|
|
|
|
|
const/4 v3, 0x1
|
|
|
|
|
|
|
|
if-eqz v1, :cond_3
|
|
|
|
|
|
|
|
invoke-interface {p1}, Ljava/util/Iterator;->next()Ljava/lang/Object;
|
|
|
|
|
|
|
|
move-result-object v1
|
|
|
|
|
|
|
|
move-object v4, v1
|
|
|
|
|
|
|
|
check-cast v4, Lcom/discord/models/domain/ModelNotificationSettings$ChannelOverride;
|
|
|
|
|
|
|
|
const-string v5, "it"
|
|
|
|
|
2020-09-16 21:45:36 +00:00
|
|
|
invoke-static {v4, v5}, Lk0/n/c/h;->checkExpressionValueIsNotNull(Ljava/lang/Object;Ljava/lang/String;)V
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
invoke-virtual {v4}, Lcom/discord/models/domain/ModelNotificationSettings$ChannelOverride;->getMessageNotifications()I
|
|
|
|
|
|
|
|
move-result v5
|
|
|
|
|
|
|
|
sget v6, Lcom/discord/models/domain/ModelNotificationSettings;->FREQUENCY_UNSET:I
|
|
|
|
|
|
|
|
if-ne v5, v6, :cond_1
|
|
|
|
|
|
|
|
invoke-virtual {v4}, Lcom/discord/models/domain/ModelNotificationSettings$ChannelOverride;->isMuted()Z
|
|
|
|
|
|
|
|
move-result v4
|
|
|
|
|
|
|
|
if-eqz v4, :cond_2
|
|
|
|
|
|
|
|
:cond_1
|
|
|
|
const/4 v2, 0x1
|
|
|
|
|
|
|
|
:cond_2
|
|
|
|
if-eqz v2, :cond_0
|
|
|
|
|
|
|
|
invoke-interface {v0, v1}, Ljava/util/Collection;->add(Ljava/lang/Object;)Z
|
|
|
|
|
|
|
|
goto :goto_0
|
|
|
|
|
|
|
|
:cond_3
|
|
|
|
const/16 p1, 0xa
|
|
|
|
|
2020-09-16 21:45:36 +00:00
|
|
|
invoke-static {v0, p1}, Lf/n/a/k/a;->collectionSizeOrDefault(Ljava/lang/Iterable;I)I
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
move-result p1
|
|
|
|
|
2020-09-16 21:45:36 +00:00
|
|
|
invoke-static {p1}, Lf/n/a/k/a;->mapCapacity(I)I
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
move-result p1
|
|
|
|
|
|
|
|
const/16 v1, 0x10
|
|
|
|
|
|
|
|
if-ge p1, v1, :cond_4
|
|
|
|
|
|
|
|
const/16 p1, 0x10
|
|
|
|
|
|
|
|
:cond_4
|
|
|
|
new-instance v1, Ljava/util/LinkedHashMap;
|
|
|
|
|
|
|
|
invoke-direct {v1, p1}, Ljava/util/LinkedHashMap;-><init>(I)V
|
|
|
|
|
|
|
|
invoke-interface {v0}, Ljava/lang/Iterable;->iterator()Ljava/util/Iterator;
|
|
|
|
|
|
|
|
move-result-object p1
|
|
|
|
|
|
|
|
:goto_1
|
|
|
|
invoke-interface {p1}, Ljava/util/Iterator;->hasNext()Z
|
|
|
|
|
|
|
|
move-result v0
|
|
|
|
|
|
|
|
if-eqz v0, :cond_5
|
|
|
|
|
|
|
|
invoke-interface {p1}, Ljava/util/Iterator;->next()Ljava/lang/Object;
|
|
|
|
|
|
|
|
move-result-object v0
|
|
|
|
|
|
|
|
move-object v4, v0
|
|
|
|
|
|
|
|
check-cast v4, Lcom/discord/models/domain/ModelNotificationSettings$ChannelOverride;
|
|
|
|
|
|
|
|
const-string v5, "override"
|
|
|
|
|
2020-09-16 21:45:36 +00:00
|
|
|
invoke-static {v4, v5}, Lk0/n/c/h;->checkExpressionValueIsNotNull(Ljava/lang/Object;Ljava/lang/String;)V
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
invoke-virtual {v4}, Lcom/discord/models/domain/ModelNotificationSettings$ChannelOverride;->getChannelId()J
|
|
|
|
|
|
|
|
move-result-wide v4
|
|
|
|
|
|
|
|
invoke-static {v4, v5}, Ljava/lang/Long;->valueOf(J)Ljava/lang/Long;
|
|
|
|
|
|
|
|
move-result-object v4
|
|
|
|
|
|
|
|
invoke-interface {v1, v4, v0}, Ljava/util/Map;->put(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
|
|
|
|
|
|
|
|
goto :goto_1
|
|
|
|
|
|
|
|
:cond_5
|
|
|
|
new-instance p1, Ljava/util/ArrayList;
|
|
|
|
|
|
|
|
invoke-direct {p1}, Ljava/util/ArrayList;-><init>()V
|
|
|
|
|
|
|
|
invoke-interface {p3}, Ljava/lang/Iterable;->iterator()Ljava/util/Iterator;
|
|
|
|
|
|
|
|
move-result-object p3
|
|
|
|
|
|
|
|
:cond_6
|
|
|
|
:goto_2
|
|
|
|
invoke-interface {p3}, Ljava/util/Iterator;->hasNext()Z
|
|
|
|
|
|
|
|
move-result v0
|
|
|
|
|
|
|
|
if-eqz v0, :cond_9
|
|
|
|
|
|
|
|
invoke-interface {p3}, Ljava/util/Iterator;->next()Ljava/lang/Object;
|
|
|
|
|
|
|
|
move-result-object v0
|
|
|
|
|
|
|
|
move-object v4, v0
|
|
|
|
|
|
|
|
check-cast v4, Lcom/discord/models/domain/ModelChannel;
|
|
|
|
|
|
|
|
invoke-virtual {v4}, Lcom/discord/models/domain/ModelChannel;->isCategory()Z
|
|
|
|
|
|
|
|
move-result v5
|
|
|
|
|
|
|
|
if-nez v5, :cond_8
|
|
|
|
|
|
|
|
invoke-virtual {v4}, Lcom/discord/models/domain/ModelChannel;->isTextChannel()Z
|
|
|
|
|
|
|
|
move-result v4
|
|
|
|
|
|
|
|
if-eqz v4, :cond_7
|
|
|
|
|
|
|
|
goto :goto_3
|
|
|
|
|
|
|
|
:cond_7
|
|
|
|
const/4 v4, 0x0
|
|
|
|
|
|
|
|
goto :goto_4
|
|
|
|
|
|
|
|
:cond_8
|
|
|
|
:goto_3
|
|
|
|
const/4 v4, 0x1
|
|
|
|
|
|
|
|
:goto_4
|
|
|
|
if-eqz v4, :cond_6
|
|
|
|
|
|
|
|
invoke-interface {p1, v0}, Ljava/util/Collection;->add(Ljava/lang/Object;)Z
|
|
|
|
|
|
|
|
goto :goto_2
|
|
|
|
|
|
|
|
:cond_9
|
|
|
|
new-instance p3, Ljava/util/ArrayList;
|
|
|
|
|
|
|
|
invoke-direct {p3}, Ljava/util/ArrayList;-><init>()V
|
|
|
|
|
|
|
|
invoke-interface {p1}, Ljava/lang/Iterable;->iterator()Ljava/util/Iterator;
|
|
|
|
|
|
|
|
move-result-object p1
|
|
|
|
|
|
|
|
:cond_a
|
|
|
|
:goto_5
|
|
|
|
invoke-interface {p1}, Ljava/util/Iterator;->hasNext()Z
|
|
|
|
|
|
|
|
move-result v0
|
|
|
|
|
|
|
|
if-eqz v0, :cond_c
|
|
|
|
|
|
|
|
invoke-interface {p1}, Ljava/util/Iterator;->next()Ljava/lang/Object;
|
|
|
|
|
|
|
|
move-result-object v0
|
|
|
|
|
|
|
|
check-cast v0, Lcom/discord/models/domain/ModelChannel;
|
|
|
|
|
|
|
|
invoke-virtual {v0}, Lcom/discord/models/domain/ModelChannel;->getId()J
|
|
|
|
|
|
|
|
move-result-wide v2
|
|
|
|
|
|
|
|
invoke-static {v2, v3}, Ljava/lang/Long;->valueOf(J)Ljava/lang/Long;
|
|
|
|
|
|
|
|
move-result-object v2
|
|
|
|
|
|
|
|
invoke-interface {v1, v2}, Ljava/util/Map;->get(Ljava/lang/Object;)Ljava/lang/Object;
|
|
|
|
|
|
|
|
move-result-object v2
|
|
|
|
|
|
|
|
check-cast v2, Lcom/discord/models/domain/ModelNotificationSettings$ChannelOverride;
|
|
|
|
|
|
|
|
if-eqz v2, :cond_b
|
|
|
|
|
|
|
|
new-instance v3, Lcom/discord/widgets/servers/NotificationsOverridesAdapter$Item;
|
|
|
|
|
|
|
|
invoke-virtual {v0}, Lcom/discord/models/domain/ModelChannel;->getParentId()J
|
|
|
|
|
|
|
|
move-result-wide v4
|
|
|
|
|
|
|
|
invoke-static {v4, v5}, Ljava/lang/Long;->valueOf(J)Ljava/lang/Long;
|
|
|
|
|
|
|
|
move-result-object v4
|
|
|
|
|
|
|
|
invoke-interface {p2, v4}, Ljava/util/Map;->get(Ljava/lang/Object;)Ljava/lang/Object;
|
|
|
|
|
|
|
|
move-result-object v4
|
|
|
|
|
|
|
|
check-cast v4, Lcom/discord/models/domain/ModelChannel;
|
|
|
|
|
|
|
|
invoke-direct {v3, v0, v4, v2}, Lcom/discord/widgets/servers/NotificationsOverridesAdapter$Item;-><init>(Lcom/discord/models/domain/ModelChannel;Lcom/discord/models/domain/ModelChannel;Lcom/discord/models/domain/ModelNotificationSettings$ChannelOverride;)V
|
|
|
|
|
|
|
|
goto :goto_6
|
|
|
|
|
|
|
|
:cond_b
|
|
|
|
const/4 v3, 0x0
|
|
|
|
|
|
|
|
:goto_6
|
|
|
|
if-eqz v3, :cond_a
|
|
|
|
|
|
|
|
invoke-interface {p3, v3}, Ljava/util/Collection;->add(Ljava/lang/Object;)Z
|
|
|
|
|
|
|
|
goto :goto_5
|
|
|
|
|
|
|
|
:cond_c
|
|
|
|
return-object p3
|
|
|
|
.end method
|