2020-07-14 22:43:59 +00:00
|
|
|
.class public final Lcom/discord/utilities/ShareUtils$updateDirectShareTargets$3;
|
|
|
|
.super Ljava/lang/Object;
|
|
|
|
.source "ShareUtils.kt"
|
|
|
|
|
|
|
|
# interfaces
|
|
|
|
.implements Lrx/functions/Func2;
|
|
|
|
|
|
|
|
|
|
|
|
# annotations
|
|
|
|
.annotation system Ldalvik/annotation/EnclosingMethod;
|
|
|
|
value = Lcom/discord/utilities/ShareUtils;->updateDirectShareTargets(Landroid/content/Context;)V
|
|
|
|
.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;",
|
|
|
|
"R:",
|
|
|
|
"Ljava/lang/Object;",
|
|
|
|
">",
|
|
|
|
"Ljava/lang/Object;",
|
|
|
|
"Lrx/functions/Func2<",
|
2020-09-16 21:45:36 +00:00
|
|
|
"TT1;TT2;TR;>;"
|
2020-07-14 22:43:59 +00:00
|
|
|
}
|
|
|
|
.end annotation
|
|
|
|
|
|
|
|
|
|
|
|
# instance fields
|
|
|
|
.field public final synthetic $context:Landroid/content/Context;
|
|
|
|
|
|
|
|
|
|
|
|
# direct methods
|
|
|
|
.method public constructor <init>(Landroid/content/Context;)V
|
|
|
|
.locals 0
|
|
|
|
|
|
|
|
iput-object p1, p0, Lcom/discord/utilities/ShareUtils$updateDirectShareTargets$3;->$context:Landroid/content/Context;
|
|
|
|
|
|
|
|
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;
|
|
|
|
.locals 0
|
|
|
|
|
|
|
|
check-cast p1, Ljava/util/List;
|
|
|
|
|
|
|
|
check-cast p2, Ljava/util/Map;
|
|
|
|
|
|
|
|
invoke-virtual {p0, p1, p2}, Lcom/discord/utilities/ShareUtils$updateDirectShareTargets$3;->call(Ljava/util/List;Ljava/util/Map;)Ljava/util/List;
|
|
|
|
|
|
|
|
move-result-object p1
|
|
|
|
|
|
|
|
return-object p1
|
|
|
|
.end method
|
|
|
|
|
|
|
|
.method public final call(Ljava/util/List;Ljava/util/Map;)Ljava/util/List;
|
|
|
|
.locals 5
|
|
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
|
|
value = {
|
|
|
|
"(",
|
|
|
|
"Ljava/util/List<",
|
|
|
|
"Lcom/discord/utilities/ChannelShortcutInfo;",
|
|
|
|
">;",
|
|
|
|
"Ljava/util/Map<",
|
|
|
|
"Ljava/lang/Long;",
|
|
|
|
"+",
|
|
|
|
"Lcom/discord/models/domain/ModelChannel;",
|
|
|
|
">;)",
|
|
|
|
"Ljava/util/List<",
|
|
|
|
"Lkotlin/Pair<",
|
|
|
|
"Lcom/discord/utilities/ChannelShortcutInfo;",
|
|
|
|
"Ljava/lang/String;",
|
|
|
|
">;>;"
|
|
|
|
}
|
|
|
|
.end annotation
|
|
|
|
|
|
|
|
const-string v0, "directShareChannels"
|
|
|
|
|
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-07-14 22:43:59 +00:00
|
|
|
|
|
|
|
new-instance v0, Ljava/util/ArrayList;
|
|
|
|
|
|
|
|
const/16 v1, 0xa
|
|
|
|
|
2020-09-16 21:45:36 +00:00
|
|
|
invoke-static {p1, v1}, Lf/n/a/k/a;->collectionSizeOrDefault(Ljava/lang/Iterable;I)I
|
2020-07-14 22:43:59 +00:00
|
|
|
|
|
|
|
move-result v2
|
|
|
|
|
|
|
|
invoke-direct {v0, v2}, Ljava/util/ArrayList;-><init>(I)V
|
|
|
|
|
|
|
|
invoke-interface {p1}, Ljava/lang/Iterable;->iterator()Ljava/util/Iterator;
|
|
|
|
|
|
|
|
move-result-object v2
|
|
|
|
|
|
|
|
:goto_0
|
|
|
|
invoke-interface {v2}, Ljava/util/Iterator;->hasNext()Z
|
|
|
|
|
|
|
|
move-result v3
|
|
|
|
|
|
|
|
if-eqz v3, :cond_0
|
|
|
|
|
|
|
|
invoke-interface {v2}, Ljava/util/Iterator;->next()Ljava/lang/Object;
|
|
|
|
|
|
|
|
move-result-object v3
|
|
|
|
|
|
|
|
check-cast v3, Lcom/discord/utilities/ChannelShortcutInfo;
|
|
|
|
|
|
|
|
invoke-virtual {v3}, Lcom/discord/utilities/ChannelShortcutInfo;->getChannel()Lcom/discord/models/domain/ModelChannel;
|
|
|
|
|
|
|
|
move-result-object v3
|
|
|
|
|
|
|
|
invoke-virtual {v3}, Lcom/discord/models/domain/ModelChannel;->getId()J
|
|
|
|
|
|
|
|
move-result-wide v3
|
|
|
|
|
|
|
|
invoke-static {v3, v4}, Ljava/lang/Long;->valueOf(J)Ljava/lang/Long;
|
|
|
|
|
|
|
|
move-result-object v3
|
|
|
|
|
|
|
|
invoke-interface {v0, v3}, Ljava/util/Collection;->add(Ljava/lang/Object;)Z
|
|
|
|
|
|
|
|
goto :goto_0
|
|
|
|
|
|
|
|
:cond_0
|
2020-09-16 21:45:36 +00:00
|
|
|
invoke-static {v0}, Lk0/i/l;->toSet(Ljava/lang/Iterable;)Ljava/util/Set;
|
2020-07-14 22:43:59 +00:00
|
|
|
|
|
|
|
move-result-object v0
|
|
|
|
|
|
|
|
sget v2, Landroid/os/Build$VERSION;->SDK_INT:I
|
|
|
|
|
|
|
|
const/16 v3, 0x19
|
|
|
|
|
|
|
|
if-lt v2, v3, :cond_2
|
|
|
|
|
|
|
|
iget-object v2, p0, Lcom/discord/utilities/ShareUtils$updateDirectShareTargets$3;->$context:Landroid/content/Context;
|
|
|
|
|
|
|
|
const-class v3, Landroid/content/pm/ShortcutManager;
|
|
|
|
|
|
|
|
invoke-virtual {v2, v3}, Landroid/content/Context;->getSystemService(Ljava/lang/Class;)Ljava/lang/Object;
|
|
|
|
|
|
|
|
move-result-object v2
|
|
|
|
|
|
|
|
check-cast v2, Landroid/content/pm/ShortcutManager;
|
|
|
|
|
|
|
|
if-eqz v2, :cond_1
|
|
|
|
|
|
|
|
invoke-virtual {v2}, Landroid/content/pm/ShortcutManager;->getDynamicShortcuts()Ljava/util/List;
|
|
|
|
|
|
|
|
move-result-object v2
|
|
|
|
|
|
|
|
if-eqz v2, :cond_1
|
|
|
|
|
|
|
|
goto :goto_1
|
|
|
|
|
|
|
|
:cond_1
|
2020-09-16 21:45:36 +00:00
|
|
|
sget-object v2, Lk0/i/n;->d:Lk0/i/n;
|
2020-07-14 22:43:59 +00:00
|
|
|
|
|
|
|
:goto_1
|
2020-09-16 21:45:36 +00:00
|
|
|
const-string v3, "(context.getSystemServic\u2026Shortcuts ?: emptyList())"
|
|
|
|
|
|
|
|
invoke-static {v2, v3}, Lk0/n/c/h;->checkExpressionValueIsNotNull(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
|
|
|
|
invoke-static {v2}, Lk0/i/l;->asSequence(Ljava/lang/Iterable;)Lkotlin/sequences/Sequence;
|
2020-07-14 22:43:59 +00:00
|
|
|
|
|
|
|
move-result-object v2
|
|
|
|
|
|
|
|
sget-object v3, Lcom/discord/utilities/ShareUtils$updateDirectShareTargets$3$pinnedOnlyShortcutChannels$1;->INSTANCE:Lcom/discord/utilities/ShareUtils$updateDirectShareTargets$3$pinnedOnlyShortcutChannels$1;
|
|
|
|
|
2020-09-16 21:45:36 +00:00
|
|
|
invoke-static {v2, v3}, Lf/n/a/k/a;->filter(Lkotlin/sequences/Sequence;Lkotlin/jvm/functions/Function1;)Lkotlin/sequences/Sequence;
|
2020-07-14 22:43:59 +00:00
|
|
|
|
|
|
|
move-result-object v2
|
|
|
|
|
|
|
|
sget-object v3, Lcom/discord/utilities/ShareUtils$updateDirectShareTargets$3$pinnedOnlyShortcutChannels$2;->INSTANCE:Lcom/discord/utilities/ShareUtils$updateDirectShareTargets$3$pinnedOnlyShortcutChannels$2;
|
|
|
|
|
2020-09-16 21:45:36 +00:00
|
|
|
invoke-static {v2, v3}, Lf/n/a/k/a;->map(Lkotlin/sequences/Sequence;Lkotlin/jvm/functions/Function1;)Lkotlin/sequences/Sequence;
|
2020-07-14 22:43:59 +00:00
|
|
|
|
|
|
|
move-result-object v2
|
|
|
|
|
|
|
|
new-instance v3, Lcom/discord/utilities/ShareUtils$updateDirectShareTargets$3$pinnedOnlyShortcutChannels$3;
|
|
|
|
|
|
|
|
invoke-direct {v3, v0}, Lcom/discord/utilities/ShareUtils$updateDirectShareTargets$3$pinnedOnlyShortcutChannels$3;-><init>(Ljava/util/Set;)V
|
|
|
|
|
2020-09-16 21:45:36 +00:00
|
|
|
invoke-static {v2, v3}, Lf/n/a/k/a;->filter(Lkotlin/sequences/Sequence;Lkotlin/jvm/functions/Function1;)Lkotlin/sequences/Sequence;
|
2020-07-14 22:43:59 +00:00
|
|
|
|
|
|
|
move-result-object v0
|
|
|
|
|
|
|
|
new-instance v2, Lcom/discord/utilities/ShareUtils$updateDirectShareTargets$3$pinnedOnlyShortcutChannels$4;
|
|
|
|
|
|
|
|
invoke-direct {v2, p2}, Lcom/discord/utilities/ShareUtils$updateDirectShareTargets$3$pinnedOnlyShortcutChannels$4;-><init>(Ljava/util/Map;)V
|
|
|
|
|
2020-09-16 21:45:36 +00:00
|
|
|
invoke-static {v0, v2}, Lf/n/a/k/a;->mapNotNull(Lkotlin/sequences/Sequence;Lkotlin/jvm/functions/Function1;)Lkotlin/sequences/Sequence;
|
2020-07-14 22:43:59 +00:00
|
|
|
|
|
|
|
move-result-object p2
|
|
|
|
|
|
|
|
sget-object v0, Lcom/discord/utilities/ShareUtils$updateDirectShareTargets$3$pinnedOnlyShortcutChannels$5;->INSTANCE:Lcom/discord/utilities/ShareUtils$updateDirectShareTargets$3$pinnedOnlyShortcutChannels$5;
|
|
|
|
|
2020-09-16 21:45:36 +00:00
|
|
|
invoke-static {p2, v0}, Lf/n/a/k/a;->map(Lkotlin/sequences/Sequence;Lkotlin/jvm/functions/Function1;)Lkotlin/sequences/Sequence;
|
2020-07-14 22:43:59 +00:00
|
|
|
|
|
|
|
move-result-object p2
|
|
|
|
|
|
|
|
goto :goto_2
|
|
|
|
|
|
|
|
:cond_2
|
2020-09-08 08:16:32 +00:00
|
|
|
sget-object p2, Lk0/s/f;->a:Lk0/s/f;
|
2020-07-14 22:43:59 +00:00
|
|
|
|
|
|
|
:goto_2
|
|
|
|
new-instance v0, Ljava/util/ArrayList;
|
|
|
|
|
|
|
|
invoke-interface {p1}, Ljava/util/Collection;->size()I
|
|
|
|
|
|
|
|
move-result v2
|
|
|
|
|
|
|
|
add-int/2addr v2, v1
|
|
|
|
|
|
|
|
invoke-direct {v0, v2}, Ljava/util/ArrayList;-><init>(I)V
|
|
|
|
|
|
|
|
invoke-virtual {v0, p1}, Ljava/util/ArrayList;->addAll(Ljava/util/Collection;)Z
|
|
|
|
|
2020-09-16 21:45:36 +00:00
|
|
|
invoke-static {v0, p2}, Lf/n/a/k/a;->addAll(Ljava/util/Collection;Lkotlin/sequences/Sequence;)Z
|
2020-07-14 22:43:59 +00:00
|
|
|
|
|
|
|
new-instance p1, Ljava/util/ArrayList;
|
|
|
|
|
|
|
|
invoke-direct {p1}, Ljava/util/ArrayList;-><init>()V
|
|
|
|
|
|
|
|
invoke-interface {v0}, Ljava/lang/Iterable;->iterator()Ljava/util/Iterator;
|
|
|
|
|
|
|
|
move-result-object p2
|
|
|
|
|
|
|
|
:cond_3
|
|
|
|
:goto_3
|
|
|
|
invoke-interface {p2}, Ljava/util/Iterator;->hasNext()Z
|
|
|
|
|
|
|
|
move-result v0
|
|
|
|
|
|
|
|
if-eqz v0, :cond_5
|
|
|
|
|
|
|
|
invoke-interface {p2}, Ljava/util/Iterator;->next()Ljava/lang/Object;
|
|
|
|
|
|
|
|
move-result-object v0
|
|
|
|
|
|
|
|
check-cast v0, Lcom/discord/utilities/ChannelShortcutInfo;
|
|
|
|
|
|
|
|
invoke-virtual {v0}, Lcom/discord/utilities/ChannelShortcutInfo;->getChannel()Lcom/discord/models/domain/ModelChannel;
|
|
|
|
|
|
|
|
move-result-object v1
|
|
|
|
|
|
|
|
const/4 v2, 0x2
|
|
|
|
|
|
|
|
const/4 v3, 0x0
|
|
|
|
|
|
|
|
invoke-static {v1, v3, v2, v3}, Lcom/discord/utilities/icon/IconUtils;->getForChannel$default(Lcom/discord/models/domain/ModelChannel;Ljava/lang/Integer;ILjava/lang/Object;)Ljava/lang/String;
|
|
|
|
|
|
|
|
move-result-object v1
|
|
|
|
|
|
|
|
if-eqz v1, :cond_4
|
|
|
|
|
|
|
|
new-instance v3, Lkotlin/Pair;
|
|
|
|
|
|
|
|
invoke-direct {v3, v0, v1}, Lkotlin/Pair;-><init>(Ljava/lang/Object;Ljava/lang/Object;)V
|
|
|
|
|
|
|
|
:cond_4
|
|
|
|
if-eqz v3, :cond_3
|
|
|
|
|
|
|
|
invoke-interface {p1, v3}, Ljava/util/Collection;->add(Ljava/lang/Object;)Z
|
|
|
|
|
|
|
|
goto :goto_3
|
|
|
|
|
|
|
|
:cond_5
|
|
|
|
return-object p1
|
|
|
|
.end method
|