1266 lines
36 KiB
Smali
1266 lines
36 KiB
Smali
.class public final Lcom/discord/stores/StoreUserGuildSettings;
|
|
.super Lcom/discord/stores/Store;
|
|
.source "StoreUserGuildSettings.kt"
|
|
|
|
# interfaces
|
|
.implements Lcom/discord/stores/DispatchHandler;
|
|
|
|
|
|
# instance fields
|
|
.field public final analytics:Lcom/discord/stores/StoreAnalytics;
|
|
|
|
.field public final clock:Lcom/discord/utilities/time/Clock;
|
|
|
|
.field public final dispatcher:Lcom/discord/stores/Dispatcher;
|
|
|
|
.field public final guildSettings:Ljava/util/Map;
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"Ljava/util/Map<",
|
|
"Ljava/lang/Long;",
|
|
"Lcom/discord/models/domain/ModelNotificationSettings;",
|
|
">;"
|
|
}
|
|
.end annotation
|
|
.end field
|
|
|
|
.field public final guildSettingsPublisher:Lcom/discord/utilities/persister/Persister;
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"Lcom/discord/utilities/persister/Persister<",
|
|
"Ljava/util/Map<",
|
|
"Ljava/lang/Long;",
|
|
"Lcom/discord/models/domain/ModelNotificationSettings;",
|
|
">;>;"
|
|
}
|
|
.end annotation
|
|
.end field
|
|
|
|
.field public final hideMutedChannelsPublisher:Lcom/discord/utilities/persister/Persister;
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"Lcom/discord/utilities/persister/Persister<",
|
|
"Ljava/util/Set<",
|
|
"Ljava/lang/Long;",
|
|
">;>;"
|
|
}
|
|
.end annotation
|
|
.end field
|
|
|
|
.field public isDirty:Z
|
|
|
|
.field public recomputeSettingsSubscription:Lrx/Subscription;
|
|
|
|
.field public final showHideMutedChannels:Ljava/util/HashSet;
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"Ljava/util/HashSet<",
|
|
"Ljava/lang/Long;",
|
|
">;"
|
|
}
|
|
.end annotation
|
|
.end field
|
|
|
|
.field public final storeChannels:Lcom/discord/stores/StoreChannels;
|
|
|
|
|
|
# direct methods
|
|
.method public constructor <init>(Lcom/discord/stores/Dispatcher;Lcom/discord/utilities/time/Clock;Lcom/discord/stores/StoreAnalytics;Lcom/discord/stores/StoreChannels;)V
|
|
.locals 1
|
|
|
|
const/4 v0, 0x0
|
|
|
|
if-eqz p1, :cond_3
|
|
|
|
if-eqz p2, :cond_2
|
|
|
|
if-eqz p3, :cond_1
|
|
|
|
if-eqz p4, :cond_0
|
|
|
|
invoke-direct {p0}, Lcom/discord/stores/Store;-><init>()V
|
|
|
|
iput-object p1, p0, Lcom/discord/stores/StoreUserGuildSettings;->dispatcher:Lcom/discord/stores/Dispatcher;
|
|
|
|
iput-object p2, p0, Lcom/discord/stores/StoreUserGuildSettings;->clock:Lcom/discord/utilities/time/Clock;
|
|
|
|
iput-object p3, p0, Lcom/discord/stores/StoreUserGuildSettings;->analytics:Lcom/discord/stores/StoreAnalytics;
|
|
|
|
iput-object p4, p0, Lcom/discord/stores/StoreUserGuildSettings;->storeChannels:Lcom/discord/stores/StoreChannels;
|
|
|
|
new-instance p1, Ljava/util/HashMap;
|
|
|
|
invoke-direct {p1}, Ljava/util/HashMap;-><init>()V
|
|
|
|
iput-object p1, p0, Lcom/discord/stores/StoreUserGuildSettings;->guildSettings:Ljava/util/Map;
|
|
|
|
new-instance p1, Ljava/util/HashSet;
|
|
|
|
invoke-direct {p1}, Ljava/util/HashSet;-><init>()V
|
|
|
|
iput-object p1, p0, Lcom/discord/stores/StoreUserGuildSettings;->showHideMutedChannels:Ljava/util/HashSet;
|
|
|
|
new-instance p1, Lcom/discord/utilities/persister/Persister;
|
|
|
|
new-instance p2, Ljava/util/HashMap;
|
|
|
|
invoke-direct {p2}, Ljava/util/HashMap;-><init>()V
|
|
|
|
const-string p3, "STORE_SETTINGS_USER_GUILD_V5"
|
|
|
|
invoke-direct {p1, p3, p2}, Lcom/discord/utilities/persister/Persister;-><init>(Ljava/lang/String;Ljava/lang/Object;)V
|
|
|
|
iput-object p1, p0, Lcom/discord/stores/StoreUserGuildSettings;->guildSettingsPublisher:Lcom/discord/utilities/persister/Persister;
|
|
|
|
new-instance p1, Lcom/discord/utilities/persister/Persister;
|
|
|
|
new-instance p2, Ljava/util/HashSet;
|
|
|
|
invoke-direct {p2}, Ljava/util/HashSet;-><init>()V
|
|
|
|
const-string p3, "STORE_SHOW_HIDE_MUTED_CHANNELS_V2"
|
|
|
|
invoke-direct {p1, p3, p2}, Lcom/discord/utilities/persister/Persister;-><init>(Ljava/lang/String;Ljava/lang/Object;)V
|
|
|
|
iput-object p1, p0, Lcom/discord/stores/StoreUserGuildSettings;->hideMutedChannelsPublisher:Lcom/discord/utilities/persister/Persister;
|
|
|
|
return-void
|
|
|
|
:cond_0
|
|
const-string p1, "storeChannels"
|
|
|
|
invoke-static {p1}, Lj0/n/c/h;->c(Ljava/lang/String;)V
|
|
|
|
throw v0
|
|
|
|
:cond_1
|
|
const-string p1, "analytics"
|
|
|
|
invoke-static {p1}, Lj0/n/c/h;->c(Ljava/lang/String;)V
|
|
|
|
throw v0
|
|
|
|
:cond_2
|
|
const-string p1, "clock"
|
|
|
|
invoke-static {p1}, Lj0/n/c/h;->c(Ljava/lang/String;)V
|
|
|
|
throw v0
|
|
|
|
:cond_3
|
|
const-string p1, "dispatcher"
|
|
|
|
invoke-static {p1}, Lj0/n/c/h;->c(Ljava/lang/String;)V
|
|
|
|
throw v0
|
|
.end method
|
|
|
|
.method public static final synthetic access$getAnalytics$p(Lcom/discord/stores/StoreUserGuildSettings;)Lcom/discord/stores/StoreAnalytics;
|
|
.locals 0
|
|
|
|
iget-object p0, p0, Lcom/discord/stores/StoreUserGuildSettings;->analytics:Lcom/discord/stores/StoreAnalytics;
|
|
|
|
return-object p0
|
|
.end method
|
|
|
|
.method public static final synthetic access$getDispatcher$p(Lcom/discord/stores/StoreUserGuildSettings;)Lcom/discord/stores/Dispatcher;
|
|
.locals 0
|
|
|
|
iget-object p0, p0, Lcom/discord/stores/StoreUserGuildSettings;->dispatcher:Lcom/discord/stores/Dispatcher;
|
|
|
|
return-object p0
|
|
.end method
|
|
|
|
.method public static final synthetic access$getHideMutedChannelsPublisher$p(Lcom/discord/stores/StoreUserGuildSettings;)Lcom/discord/utilities/persister/Persister;
|
|
.locals 0
|
|
|
|
iget-object p0, p0, Lcom/discord/stores/StoreUserGuildSettings;->hideMutedChannelsPublisher:Lcom/discord/utilities/persister/Persister;
|
|
|
|
return-object p0
|
|
.end method
|
|
|
|
.method public static final synthetic access$getRecomputeSettingsSubscription$p(Lcom/discord/stores/StoreUserGuildSettings;)Lrx/Subscription;
|
|
.locals 0
|
|
|
|
iget-object p0, p0, Lcom/discord/stores/StoreUserGuildSettings;->recomputeSettingsSubscription:Lrx/Subscription;
|
|
|
|
return-object p0
|
|
.end method
|
|
|
|
.method public static final synthetic access$getShowHideMutedChannels$p(Lcom/discord/stores/StoreUserGuildSettings;)Ljava/util/HashSet;
|
|
.locals 0
|
|
|
|
iget-object p0, p0, Lcom/discord/stores/StoreUserGuildSettings;->showHideMutedChannels:Ljava/util/HashSet;
|
|
|
|
return-object p0
|
|
.end method
|
|
|
|
.method public static final synthetic access$getStoreChannels$p(Lcom/discord/stores/StoreUserGuildSettings;)Lcom/discord/stores/StoreChannels;
|
|
.locals 0
|
|
|
|
iget-object p0, p0, Lcom/discord/stores/StoreUserGuildSettings;->storeChannels:Lcom/discord/stores/StoreChannels;
|
|
|
|
return-object p0
|
|
.end method
|
|
|
|
.method public static final synthetic access$recomputeMuteConfigs(Lcom/discord/stores/StoreUserGuildSettings;)V
|
|
.locals 0
|
|
|
|
invoke-direct {p0}, Lcom/discord/stores/StoreUserGuildSettings;->recomputeMuteConfigs()V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public static final synthetic access$setRecomputeSettingsSubscription$p(Lcom/discord/stores/StoreUserGuildSettings;Lrx/Subscription;)V
|
|
.locals 0
|
|
|
|
iput-object p1, p0, Lcom/discord/stores/StoreUserGuildSettings;->recomputeSettingsSubscription:Lrx/Subscription;
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public static final synthetic access$updateUserGuildSettings(Lcom/discord/stores/StoreUserGuildSettings;Landroid/content/Context;JLcom/discord/restapi/RestAPIParams$UserGuildSettings;I)V
|
|
.locals 0
|
|
|
|
invoke-direct/range {p0 .. p5}, Lcom/discord/stores/StoreUserGuildSettings;->updateUserGuildSettings(Landroid/content/Context;JLcom/discord/restapi/RestAPIParams$UserGuildSettings;I)V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method private final handleGuildSettings(Ljava/util/List;)V
|
|
.locals 13
|
|
.annotation runtime Lcom/discord/stores/StoreThread;
|
|
.end annotation
|
|
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"(",
|
|
"Ljava/util/List<",
|
|
"+",
|
|
"Lcom/discord/models/domain/ModelNotificationSettings;",
|
|
">;)V"
|
|
}
|
|
.end annotation
|
|
|
|
iget-object v0, p0, Lcom/discord/stores/StoreUserGuildSettings;->recomputeSettingsSubscription:Lrx/Subscription;
|
|
|
|
if-eqz v0, :cond_0
|
|
|
|
invoke-interface {v0}, Lrx/Subscription;->unsubscribe()V
|
|
|
|
:cond_0
|
|
invoke-interface {p1}, Ljava/util/List;->iterator()Ljava/util/Iterator;
|
|
|
|
move-result-object p1
|
|
|
|
const-wide v0, 0x7fffffffffffffffL
|
|
|
|
move-wide v2, v0
|
|
|
|
:cond_1
|
|
:goto_0
|
|
invoke-interface {p1}, Ljava/util/Iterator;->hasNext()Z
|
|
|
|
move-result v4
|
|
|
|
if-eqz v4, :cond_2
|
|
|
|
invoke-interface {p1}, Ljava/util/Iterator;->next()Ljava/lang/Object;
|
|
|
|
move-result-object v4
|
|
|
|
check-cast v4, Lcom/discord/models/domain/ModelNotificationSettings;
|
|
|
|
iget-object v5, p0, Lcom/discord/stores/StoreUserGuildSettings;->clock:Lcom/discord/utilities/time/Clock;
|
|
|
|
invoke-virtual {v4, v5}, Lcom/discord/models/domain/ModelNotificationSettings;->copyAndRecomputeTransientFields(Lcom/discord/utilities/time/Clock;)Lcom/discord/models/domain/ModelNotificationSettings;
|
|
|
|
move-result-object v4
|
|
|
|
iget-object v5, p0, Lcom/discord/stores/StoreUserGuildSettings;->clock:Lcom/discord/utilities/time/Clock;
|
|
|
|
invoke-virtual {v4, v5}, Lcom/discord/models/domain/ModelNotificationSettings;->getNextMuteEndTimeMs(Lcom/discord/utilities/time/Clock;)J
|
|
|
|
move-result-wide v5
|
|
|
|
invoke-static {v2, v3, v5, v6}, Ljava/lang/Math;->min(JJ)J
|
|
|
|
move-result-wide v2
|
|
|
|
iget-object v5, p0, Lcom/discord/stores/StoreUserGuildSettings;->guildSettings:Ljava/util/Map;
|
|
|
|
const-string v6, "computedSettings"
|
|
|
|
invoke-static {v4, v6}, Lj0/n/c/h;->checkExpressionValueIsNotNull(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
invoke-virtual {v4}, Lcom/discord/models/domain/ModelNotificationSettings;->getGuildId()J
|
|
|
|
move-result-wide v6
|
|
|
|
invoke-static {v6, v7}, Ljava/lang/Long;->valueOf(J)Ljava/lang/Long;
|
|
|
|
move-result-object v6
|
|
|
|
invoke-interface {v5, v6}, Ljava/util/Map;->get(Ljava/lang/Object;)Ljava/lang/Object;
|
|
|
|
move-result-object v5
|
|
|
|
check-cast v5, Lcom/discord/models/domain/ModelNotificationSettings;
|
|
|
|
invoke-static {v4, v5}, Lj0/n/c/h;->areEqual(Ljava/lang/Object;Ljava/lang/Object;)Z
|
|
|
|
move-result v5
|
|
|
|
const/4 v6, 0x1
|
|
|
|
xor-int/2addr v5, v6
|
|
|
|
if-eqz v5, :cond_1
|
|
|
|
iget-object v5, p0, Lcom/discord/stores/StoreUserGuildSettings;->guildSettings:Ljava/util/Map;
|
|
|
|
invoke-virtual {v4}, Lcom/discord/models/domain/ModelNotificationSettings;->getGuildId()J
|
|
|
|
move-result-wide v7
|
|
|
|
invoke-static {v7, v8}, Ljava/lang/Long;->valueOf(J)Ljava/lang/Long;
|
|
|
|
move-result-object v7
|
|
|
|
invoke-interface {v5, v7, v4}, Ljava/util/Map;->put(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
|
|
|
|
iput-boolean v6, p0, Lcom/discord/stores/StoreUserGuildSettings;->isDirty:Z
|
|
|
|
goto :goto_0
|
|
|
|
:cond_2
|
|
cmp-long p1, v2, v0
|
|
|
|
if-gez p1, :cond_3
|
|
|
|
iget-object p1, p0, Lcom/discord/stores/StoreUserGuildSettings;->clock:Lcom/discord/utilities/time/Clock;
|
|
|
|
invoke-interface {p1}, Lcom/discord/utilities/time/Clock;->currentTimeMillis()J
|
|
|
|
move-result-wide v0
|
|
|
|
sub-long/2addr v2, v0
|
|
|
|
sget-object p1, Ljava/util/concurrent/TimeUnit;->MILLISECONDS:Ljava/util/concurrent/TimeUnit;
|
|
|
|
iget-object v0, p0, Lcom/discord/stores/StoreUserGuildSettings;->dispatcher:Lcom/discord/stores/Dispatcher;
|
|
|
|
invoke-virtual {v0}, Lcom/discord/stores/Dispatcher;->getScheduler()Lrx/Scheduler;
|
|
|
|
move-result-object v0
|
|
|
|
invoke-static {v2, v3, p1, v0}, Lrx/Observable;->Y(JLjava/util/concurrent/TimeUnit;Lrx/Scheduler;)Lrx/Observable;
|
|
|
|
move-result-object v4
|
|
|
|
const-string p1, "Observable.timer(\n \u2026patcher.scheduler\n )"
|
|
|
|
invoke-static {v4, p1}, Lj0/n/c/h;->checkExpressionValueIsNotNull(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
const-class v5, Lcom/discord/stores/StoreUserGuildSettings;
|
|
|
|
const/4 v6, 0x0
|
|
|
|
new-instance v7, Lcom/discord/stores/StoreUserGuildSettings$handleGuildSettings$1;
|
|
|
|
invoke-direct {v7, p0}, Lcom/discord/stores/StoreUserGuildSettings$handleGuildSettings$1;-><init>(Lcom/discord/stores/StoreUserGuildSettings;)V
|
|
|
|
const/4 v8, 0x0
|
|
|
|
const/4 v9, 0x0
|
|
|
|
new-instance v10, Lcom/discord/stores/StoreUserGuildSettings$handleGuildSettings$2;
|
|
|
|
invoke-direct {v10, p0}, Lcom/discord/stores/StoreUserGuildSettings$handleGuildSettings$2;-><init>(Lcom/discord/stores/StoreUserGuildSettings;)V
|
|
|
|
const/16 v11, 0x1a
|
|
|
|
const/4 v12, 0x0
|
|
|
|
invoke-static/range {v4 .. v12}, Lcom/discord/utilities/rx/ObservableExtensionsKt;->appSubscribe$default(Lrx/Observable;Ljava/lang/Class;Landroid/content/Context;Lkotlin/jvm/functions/Function1;Lkotlin/jvm/functions/Function1;Lkotlin/jvm/functions/Function0;Lkotlin/jvm/functions/Function1;ILjava/lang/Object;)V
|
|
|
|
:cond_3
|
|
return-void
|
|
.end method
|
|
|
|
.method private final recomputeMuteConfigs()V
|
|
.locals 2
|
|
.annotation runtime Lcom/discord/stores/StoreThread;
|
|
.end annotation
|
|
|
|
new-instance v0, Ljava/util/ArrayList;
|
|
|
|
iget-object v1, p0, Lcom/discord/stores/StoreUserGuildSettings;->guildSettings:Ljava/util/Map;
|
|
|
|
invoke-interface {v1}, Ljava/util/Map;->values()Ljava/util/Collection;
|
|
|
|
move-result-object v1
|
|
|
|
invoke-direct {v0, v1}, Ljava/util/ArrayList;-><init>(Ljava/util/Collection;)V
|
|
|
|
invoke-virtual {p0, v0}, Lcom/discord/stores/StoreUserGuildSettings;->handleGuildSettingUpdated$app_productionDiscordExternalRelease(Ljava/util/List;)V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public static synthetic setChannelMuted$default(Lcom/discord/stores/StoreUserGuildSettings;Landroid/content/Context;JZLcom/discord/models/domain/ModelMuteConfig;ILjava/lang/Object;)V
|
|
.locals 6
|
|
|
|
and-int/lit8 p6, p6, 0x8
|
|
|
|
if-eqz p6, :cond_0
|
|
|
|
const/4 p5, 0x0
|
|
|
|
:cond_0
|
|
move-object v5, p5
|
|
|
|
move-object v0, p0
|
|
|
|
move-object v1, p1
|
|
|
|
move-wide v2, p2
|
|
|
|
move v4, p4
|
|
|
|
invoke-virtual/range {v0 .. v5}, Lcom/discord/stores/StoreUserGuildSettings;->setChannelMuted(Landroid/content/Context;JZLcom/discord/models/domain/ModelMuteConfig;)V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public static synthetic setGuildMuted$default(Lcom/discord/stores/StoreUserGuildSettings;Landroid/content/Context;JZLcom/discord/models/domain/ModelMuteConfig;ILjava/lang/Object;)V
|
|
.locals 6
|
|
|
|
and-int/lit8 p6, p6, 0x8
|
|
|
|
if-eqz p6, :cond_0
|
|
|
|
const/4 p5, 0x0
|
|
|
|
:cond_0
|
|
move-object v5, p5
|
|
|
|
move-object v0, p0
|
|
|
|
move-object v1, p1
|
|
|
|
move-wide v2, p2
|
|
|
|
move v4, p4
|
|
|
|
invoke-virtual/range {v0 .. v5}, Lcom/discord/stores/StoreUserGuildSettings;->setGuildMuted(Landroid/content/Context;JZLcom/discord/models/domain/ModelMuteConfig;)V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public static synthetic setGuildToggles$default(Lcom/discord/stores/StoreUserGuildSettings;Landroid/content/Context;Lcom/discord/models/domain/ModelGuild;Ljava/lang/Boolean;Ljava/lang/Boolean;Ljava/lang/Boolean;Ljava/lang/Boolean;ILjava/lang/Object;)V
|
|
.locals 9
|
|
|
|
and-int/lit8 v0, p7, 0x4
|
|
|
|
const/4 v1, 0x0
|
|
|
|
if-eqz v0, :cond_0
|
|
|
|
move-object v5, v1
|
|
|
|
goto :goto_0
|
|
|
|
:cond_0
|
|
move-object v5, p3
|
|
|
|
:goto_0
|
|
and-int/lit8 v0, p7, 0x8
|
|
|
|
if-eqz v0, :cond_1
|
|
|
|
move-object v6, v1
|
|
|
|
goto :goto_1
|
|
|
|
:cond_1
|
|
move-object v6, p4
|
|
|
|
:goto_1
|
|
and-int/lit8 v0, p7, 0x10
|
|
|
|
if-eqz v0, :cond_2
|
|
|
|
move-object v7, v1
|
|
|
|
goto :goto_2
|
|
|
|
:cond_2
|
|
move-object v7, p5
|
|
|
|
:goto_2
|
|
and-int/lit8 v0, p7, 0x20
|
|
|
|
if-eqz v0, :cond_3
|
|
|
|
move-object v8, v1
|
|
|
|
goto :goto_3
|
|
|
|
:cond_3
|
|
move-object v8, p6
|
|
|
|
:goto_3
|
|
move-object v2, p0
|
|
|
|
move-object v3, p1
|
|
|
|
move-object v4, p2
|
|
|
|
invoke-virtual/range {v2 .. v8}, Lcom/discord/stores/StoreUserGuildSettings;->setGuildToggles(Landroid/content/Context;Lcom/discord/models/domain/ModelGuild;Ljava/lang/Boolean;Ljava/lang/Boolean;Ljava/lang/Boolean;Ljava/lang/Boolean;)V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method private final updateUserGuildSettings(Landroid/content/Context;JLcom/discord/restapi/RestAPIParams$UserGuildSettings;I)V
|
|
.locals 10
|
|
.param p5 # I
|
|
.annotation build Landroidx/annotation/StringRes;
|
|
.end annotation
|
|
.end param
|
|
|
|
invoke-virtual {p4}, Lcom/discord/restapi/RestAPIParams$UserGuildSettings;->getChannelOverrides()Ljava/util/Map;
|
|
|
|
move-result-object v0
|
|
|
|
const/4 v1, 0x0
|
|
|
|
if-eqz v0, :cond_0
|
|
|
|
invoke-interface {v0}, Ljava/util/Map;->keySet()Ljava/util/Set;
|
|
|
|
move-result-object v0
|
|
|
|
if-eqz v0, :cond_0
|
|
|
|
invoke-static {v0}, Lj0/i/l;->firstOrNull(Ljava/lang/Iterable;)Ljava/lang/Object;
|
|
|
|
move-result-object v0
|
|
|
|
check-cast v0, Ljava/lang/Long;
|
|
|
|
goto :goto_0
|
|
|
|
:cond_0
|
|
move-object v0, v1
|
|
|
|
:goto_0
|
|
sget-object v2, Lcom/discord/utilities/rest/RestAPI;->Companion:Lcom/discord/utilities/rest/RestAPI$Companion;
|
|
|
|
invoke-virtual {v2}, Lcom/discord/utilities/rest/RestAPI$Companion;->getApi()Lcom/discord/utilities/rest/RestAPI;
|
|
|
|
move-result-object v2
|
|
|
|
invoke-virtual {v2, p2, p3, p4}, Lcom/discord/utilities/rest/RestAPI;->updateUserGuildSettings(JLcom/discord/restapi/RestAPIParams$UserGuildSettings;)Lrx/Observable;
|
|
|
|
move-result-object p2
|
|
|
|
const/4 p3, 0x0
|
|
|
|
const/4 p4, 0x1
|
|
|
|
invoke-static {p2, p3, p4, v1}, Lcom/discord/utilities/rx/ObservableExtensionsKt;->restSubscribeOn$default(Lrx/Observable;ZILjava/lang/Object;)Lrx/Observable;
|
|
|
|
move-result-object p2
|
|
|
|
invoke-static {p2}, Lcom/discord/utilities/rx/ObservableExtensionsKt;->ui(Lrx/Observable;)Lrx/Observable;
|
|
|
|
move-result-object v1
|
|
|
|
const-class v2, Lcom/discord/stores/StoreUserGuildSettings;
|
|
|
|
const/4 v4, 0x0
|
|
|
|
const/4 v5, 0x0
|
|
|
|
const/4 v6, 0x0
|
|
|
|
new-instance v7, Lcom/discord/stores/StoreUserGuildSettings$updateUserGuildSettings$1;
|
|
|
|
invoke-direct {v7, p0, v0, p1, p5}, Lcom/discord/stores/StoreUserGuildSettings$updateUserGuildSettings$1;-><init>(Lcom/discord/stores/StoreUserGuildSettings;Ljava/lang/Long;Landroid/content/Context;I)V
|
|
|
|
const/16 v8, 0x1c
|
|
|
|
const/4 v9, 0x0
|
|
|
|
move-object v3, p1
|
|
|
|
invoke-static/range {v1 .. v9}, Lcom/discord/utilities/rx/ObservableExtensionsKt;->appSubscribe$default(Lrx/Observable;Ljava/lang/Class;Landroid/content/Context;Lkotlin/jvm/functions/Function1;Lkotlin/jvm/functions/Function1;Lkotlin/jvm/functions/Function0;Lkotlin/jvm/functions/Function1;ILjava/lang/Object;)V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
|
|
# virtual methods
|
|
.method public final get()Lrx/Observable;
|
|
.locals 1
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"()",
|
|
"Lrx/Observable<",
|
|
"Ljava/util/Map<",
|
|
"Ljava/lang/Long;",
|
|
"Lcom/discord/models/domain/ModelNotificationSettings;",
|
|
">;>;"
|
|
}
|
|
.end annotation
|
|
|
|
iget-object v0, p0, Lcom/discord/stores/StoreUserGuildSettings;->guildSettingsPublisher:Lcom/discord/utilities/persister/Persister;
|
|
|
|
invoke-virtual {v0}, Lcom/discord/utilities/persister/Persister;->getObservable()Lrx/Observable;
|
|
|
|
move-result-object v0
|
|
|
|
invoke-static {v0}, Lcom/discord/utilities/rx/ObservableExtensionsKt;->computationLatest(Lrx/Observable;)Lrx/Observable;
|
|
|
|
move-result-object v0
|
|
|
|
return-object v0
|
|
.end method
|
|
|
|
.method public final get(J)Lrx/Observable;
|
|
.locals 2
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"(J)",
|
|
"Lrx/Observable<",
|
|
"Lcom/discord/models/domain/ModelNotificationSettings;",
|
|
">;"
|
|
}
|
|
.end annotation
|
|
|
|
iget-object v0, p0, Lcom/discord/stores/StoreUserGuildSettings;->guildSettingsPublisher:Lcom/discord/utilities/persister/Persister;
|
|
|
|
invoke-virtual {v0}, Lcom/discord/utilities/persister/Persister;->getObservable()Lrx/Observable;
|
|
|
|
move-result-object v0
|
|
|
|
new-instance v1, Lcom/discord/stores/StoreUserGuildSettings$get$1;
|
|
|
|
invoke-direct {v1, p1, p2}, Lcom/discord/stores/StoreUserGuildSettings$get$1;-><init>(J)V
|
|
|
|
invoke-virtual {v0, v1}, Lrx/Observable;->C(Lr0/k/b;)Lrx/Observable;
|
|
|
|
move-result-object p1
|
|
|
|
invoke-virtual {p1}, Lrx/Observable;->q()Lrx/Observable;
|
|
|
|
move-result-object p1
|
|
|
|
const-string p2, "guildSettingsPublisher\n \u2026 .distinctUntilChanged()"
|
|
|
|
invoke-static {p1, p2}, Lj0/n/c/h;->checkExpressionValueIsNotNull(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
return-object p1
|
|
.end method
|
|
|
|
.method public final getGuildSettings$app_productionDiscordExternalRelease()Ljava/util/Map;
|
|
.locals 1
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"()",
|
|
"Ljava/util/Map<",
|
|
"Ljava/lang/Long;",
|
|
"Lcom/discord/models/domain/ModelNotificationSettings;",
|
|
">;"
|
|
}
|
|
.end annotation
|
|
|
|
iget-object v0, p0, Lcom/discord/stores/StoreUserGuildSettings;->guildSettings:Ljava/util/Map;
|
|
|
|
return-object v0
|
|
.end method
|
|
|
|
.method public final getHideMutedChannels(J)Lrx/Observable;
|
|
.locals 2
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"(J)",
|
|
"Lrx/Observable<",
|
|
"Ljava/lang/Boolean;",
|
|
">;"
|
|
}
|
|
.end annotation
|
|
|
|
iget-object v0, p0, Lcom/discord/stores/StoreUserGuildSettings;->hideMutedChannelsPublisher:Lcom/discord/utilities/persister/Persister;
|
|
|
|
invoke-virtual {v0}, Lcom/discord/utilities/persister/Persister;->getObservable()Lrx/Observable;
|
|
|
|
move-result-object v0
|
|
|
|
new-instance v1, Lcom/discord/stores/StoreUserGuildSettings$getHideMutedChannels$1;
|
|
|
|
invoke-direct {v1, p1, p2}, Lcom/discord/stores/StoreUserGuildSettings$getHideMutedChannels$1;-><init>(J)V
|
|
|
|
invoke-virtual {v0, v1}, Lrx/Observable;->C(Lr0/k/b;)Lrx/Observable;
|
|
|
|
move-result-object p1
|
|
|
|
invoke-virtual {p1}, Lrx/Observable;->q()Lrx/Observable;
|
|
|
|
move-result-object p1
|
|
|
|
const-string p2, "hideMutedChannelsPublish\u2026 .distinctUntilChanged()"
|
|
|
|
invoke-static {p1, p2}, Lj0/n/c/h;->checkExpressionValueIsNotNull(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
return-object p1
|
|
.end method
|
|
|
|
.method public final getMutedGuildIds()Lrx/Observable;
|
|
.locals 2
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"()",
|
|
"Lrx/Observable<",
|
|
"Ljava/util/List<",
|
|
"Ljava/lang/Long;",
|
|
">;>;"
|
|
}
|
|
.end annotation
|
|
|
|
invoke-virtual {p0}, Lcom/discord/stores/StoreUserGuildSettings;->get()Lrx/Observable;
|
|
|
|
move-result-object v0
|
|
|
|
sget-object v1, Lcom/discord/stores/StoreUserGuildSettings$mutedGuildIds$1;->INSTANCE:Lcom/discord/stores/StoreUserGuildSettings$mutedGuildIds$1;
|
|
|
|
invoke-virtual {v0, v1}, Lrx/Observable;->S(Lr0/k/b;)Lrx/Observable;
|
|
|
|
move-result-object v0
|
|
|
|
invoke-virtual {v0}, Lrx/Observable;->q()Lrx/Observable;
|
|
|
|
move-result-object v0
|
|
|
|
const-string v1, "get()\n .switchMap\u2026 .distinctUntilChanged()"
|
|
|
|
invoke-static {v0, v1}, Lj0/n/c/h;->checkExpressionValueIsNotNull(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
return-object v0
|
|
.end method
|
|
|
|
.method public final handleConnectionOpen$app_productionDiscordExternalRelease(Lcom/discord/models/domain/ModelPayload;)V
|
|
.locals 2
|
|
.annotation runtime Lcom/discord/stores/StoreThread;
|
|
.end annotation
|
|
|
|
if-eqz p1, :cond_1
|
|
|
|
invoke-virtual {p1}, Lcom/discord/models/domain/ModelPayload;->getUserGuildSettings()Lcom/discord/models/domain/ModelPayload$VersionedUserGuildSettings;
|
|
|
|
move-result-object v0
|
|
|
|
const-string v1, "payload.userGuildSettings"
|
|
|
|
invoke-static {v0, v1}, Lj0/n/c/h;->checkExpressionValueIsNotNull(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
invoke-virtual {v0}, Lcom/discord/models/domain/ModelPayload$VersionedModel;->isPartial()Z
|
|
|
|
move-result v0
|
|
|
|
if-nez v0, :cond_0
|
|
|
|
iget-object v0, p0, Lcom/discord/stores/StoreUserGuildSettings;->guildSettings:Ljava/util/Map;
|
|
|
|
invoke-interface {v0}, Ljava/util/Map;->clear()V
|
|
|
|
:cond_0
|
|
invoke-virtual {p1}, Lcom/discord/models/domain/ModelPayload;->getUserGuildSettings()Lcom/discord/models/domain/ModelPayload$VersionedUserGuildSettings;
|
|
|
|
move-result-object p1
|
|
|
|
invoke-static {p1, v1}, Lj0/n/c/h;->checkExpressionValueIsNotNull(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
invoke-virtual {p1}, Lcom/discord/models/domain/ModelPayload$VersionedModel;->getEntries()Ljava/util/List;
|
|
|
|
move-result-object p1
|
|
|
|
const-string v0, "payload.userGuildSettings.entries"
|
|
|
|
invoke-static {p1, v0}, Lj0/n/c/h;->checkExpressionValueIsNotNull(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
invoke-direct {p0, p1}, Lcom/discord/stores/StoreUserGuildSettings;->handleGuildSettings(Ljava/util/List;)V
|
|
|
|
const/4 p1, 0x1
|
|
|
|
iput-boolean p1, p0, Lcom/discord/stores/StoreUserGuildSettings;->isDirty:Z
|
|
|
|
return-void
|
|
|
|
:cond_1
|
|
const-string p1, "payload"
|
|
|
|
invoke-static {p1}, Lj0/n/c/h;->c(Ljava/lang/String;)V
|
|
|
|
const/4 p1, 0x0
|
|
|
|
throw p1
|
|
.end method
|
|
|
|
.method public final handleGuildSettingUpdated$app_productionDiscordExternalRelease(Ljava/util/List;)V
|
|
.locals 0
|
|
.annotation runtime Lcom/discord/stores/StoreThread;
|
|
.end annotation
|
|
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"(",
|
|
"Ljava/util/List<",
|
|
"+",
|
|
"Lcom/discord/models/domain/ModelNotificationSettings;",
|
|
">;)V"
|
|
}
|
|
.end annotation
|
|
|
|
if-eqz p1, :cond_0
|
|
|
|
invoke-direct {p0, p1}, Lcom/discord/stores/StoreUserGuildSettings;->handleGuildSettings(Ljava/util/List;)V
|
|
|
|
const/4 p1, 0x1
|
|
|
|
iput-boolean p1, p0, Lcom/discord/stores/StoreUserGuildSettings;->isDirty:Z
|
|
|
|
return-void
|
|
|
|
:cond_0
|
|
const-string p1, "guildSettingsList"
|
|
|
|
invoke-static {p1}, Lj0/n/c/h;->c(Ljava/lang/String;)V
|
|
|
|
const/4 p1, 0x0
|
|
|
|
throw p1
|
|
.end method
|
|
|
|
.method public init(Landroid/content/Context;)V
|
|
.locals 1
|
|
|
|
if-eqz p1, :cond_0
|
|
|
|
invoke-super {p0, p1}, Lcom/discord/stores/Store;->init(Landroid/content/Context;)V
|
|
|
|
iget-object p1, p0, Lcom/discord/stores/StoreUserGuildSettings;->showHideMutedChannels:Ljava/util/HashSet;
|
|
|
|
iget-object v0, p0, Lcom/discord/stores/StoreUserGuildSettings;->hideMutedChannelsPublisher:Lcom/discord/utilities/persister/Persister;
|
|
|
|
invoke-virtual {v0}, Lcom/discord/utilities/persister/Persister;->get()Ljava/lang/Object;
|
|
|
|
move-result-object v0
|
|
|
|
check-cast v0, Ljava/util/Collection;
|
|
|
|
invoke-virtual {p1, v0}, Ljava/util/HashSet;->addAll(Ljava/util/Collection;)Z
|
|
|
|
return-void
|
|
|
|
:cond_0
|
|
const-string p1, "context"
|
|
|
|
invoke-static {p1}, Lj0/n/c/h;->c(Ljava/lang/String;)V
|
|
|
|
const/4 p1, 0x0
|
|
|
|
throw p1
|
|
.end method
|
|
|
|
.method public onDispatchEnded()V
|
|
.locals 5
|
|
|
|
iget-boolean v0, p0, Lcom/discord/stores/StoreUserGuildSettings;->isDirty:Z
|
|
|
|
if-nez v0, :cond_0
|
|
|
|
return-void
|
|
|
|
:cond_0
|
|
iget-object v0, p0, Lcom/discord/stores/StoreUserGuildSettings;->guildSettingsPublisher:Lcom/discord/utilities/persister/Persister;
|
|
|
|
new-instance v1, Ljava/util/HashMap;
|
|
|
|
iget-object v2, p0, Lcom/discord/stores/StoreUserGuildSettings;->guildSettings:Ljava/util/Map;
|
|
|
|
invoke-direct {v1, v2}, Ljava/util/HashMap;-><init>(Ljava/util/Map;)V
|
|
|
|
const/4 v2, 0x2
|
|
|
|
const/4 v3, 0x0
|
|
|
|
const/4 v4, 0x0
|
|
|
|
invoke-static {v0, v1, v4, v2, v3}, Lcom/discord/utilities/persister/Persister;->set$default(Lcom/discord/utilities/persister/Persister;Ljava/lang/Object;ZILjava/lang/Object;)Ljava/lang/Object;
|
|
|
|
iput-boolean v4, p0, Lcom/discord/stores/StoreUserGuildSettings;->isDirty:Z
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public final setChannelFrequency(Landroid/content/Context;Lcom/discord/models/domain/ModelChannel;I)V
|
|
.locals 8
|
|
|
|
const/4 v0, 0x0
|
|
|
|
if-eqz p1, :cond_1
|
|
|
|
if-eqz p2, :cond_0
|
|
|
|
invoke-virtual {p2}, Lcom/discord/models/domain/ModelChannel;->getGuildId()Ljava/lang/Long;
|
|
|
|
move-result-object v0
|
|
|
|
const-string v1, "channel.guildId"
|
|
|
|
invoke-static {v0, v1}, Lj0/n/c/h;->checkExpressionValueIsNotNull(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
invoke-virtual {v0}, Ljava/lang/Long;->longValue()J
|
|
|
|
move-result-wide v4
|
|
|
|
new-instance v6, Lcom/discord/restapi/RestAPIParams$UserGuildSettings;
|
|
|
|
invoke-virtual {p2}, Lcom/discord/models/domain/ModelChannel;->getId()J
|
|
|
|
move-result-wide v0
|
|
|
|
new-instance p2, Lcom/discord/restapi/RestAPIParams$UserGuildSettings$ChannelOverride;
|
|
|
|
invoke-static {p3}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;
|
|
|
|
move-result-object p3
|
|
|
|
invoke-direct {p2, p3}, Lcom/discord/restapi/RestAPIParams$UserGuildSettings$ChannelOverride;-><init>(Ljava/lang/Integer;)V
|
|
|
|
invoke-direct {v6, v0, v1, p2}, Lcom/discord/restapi/RestAPIParams$UserGuildSettings;-><init>(JLcom/discord/restapi/RestAPIParams$UserGuildSettings$ChannelOverride;)V
|
|
|
|
const v7, 0x7f1203ef
|
|
|
|
move-object v2, p0
|
|
|
|
move-object v3, p1
|
|
|
|
invoke-direct/range {v2 .. v7}, Lcom/discord/stores/StoreUserGuildSettings;->updateUserGuildSettings(Landroid/content/Context;JLcom/discord/restapi/RestAPIParams$UserGuildSettings;I)V
|
|
|
|
return-void
|
|
|
|
:cond_0
|
|
const-string p1, "channel"
|
|
|
|
invoke-static {p1}, Lj0/n/c/h;->c(Ljava/lang/String;)V
|
|
|
|
throw v0
|
|
|
|
:cond_1
|
|
const-string p1, "context"
|
|
|
|
invoke-static {p1}, Lj0/n/c/h;->c(Ljava/lang/String;)V
|
|
|
|
throw v0
|
|
.end method
|
|
|
|
.method public final setChannelMuted(Landroid/content/Context;JZLcom/discord/models/domain/ModelMuteConfig;)V
|
|
.locals 9
|
|
|
|
if-eqz p1, :cond_0
|
|
|
|
iget-object v0, p0, Lcom/discord/stores/StoreUserGuildSettings;->dispatcher:Lcom/discord/stores/Dispatcher;
|
|
|
|
new-instance v8, Lcom/discord/stores/StoreUserGuildSettings$setChannelMuted$1;
|
|
|
|
move-object v1, v8
|
|
|
|
move-object v2, p0
|
|
|
|
move-wide v3, p2
|
|
|
|
move-object v5, p1
|
|
|
|
move v6, p4
|
|
|
|
move-object v7, p5
|
|
|
|
invoke-direct/range {v1 .. v7}, Lcom/discord/stores/StoreUserGuildSettings$setChannelMuted$1;-><init>(Lcom/discord/stores/StoreUserGuildSettings;JLandroid/content/Context;ZLcom/discord/models/domain/ModelMuteConfig;)V
|
|
|
|
invoke-virtual {v0, v8}, Lcom/discord/stores/Dispatcher;->schedule(Lkotlin/jvm/functions/Function0;)V
|
|
|
|
return-void
|
|
|
|
:cond_0
|
|
const-string p1, "context"
|
|
|
|
invoke-static {p1}, Lj0/n/c/h;->c(Ljava/lang/String;)V
|
|
|
|
const/4 p1, 0x0
|
|
|
|
throw p1
|
|
.end method
|
|
|
|
.method public final setChannelNotificationsDefault(Landroid/content/Context;Lcom/discord/models/domain/ModelChannel;)V
|
|
.locals 9
|
|
|
|
const/4 v0, 0x0
|
|
|
|
if-eqz p1, :cond_1
|
|
|
|
if-eqz p2, :cond_0
|
|
|
|
invoke-virtual {p2}, Lcom/discord/models/domain/ModelChannel;->getGuildId()Ljava/lang/Long;
|
|
|
|
move-result-object v1
|
|
|
|
const-string v2, "channel.guildId"
|
|
|
|
invoke-static {v1, v2}, Lj0/n/c/h;->checkExpressionValueIsNotNull(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
invoke-virtual {v1}, Ljava/lang/Long;->longValue()J
|
|
|
|
move-result-wide v5
|
|
|
|
new-instance v7, Lcom/discord/restapi/RestAPIParams$UserGuildSettings;
|
|
|
|
invoke-virtual {p2}, Lcom/discord/models/domain/ModelChannel;->getId()J
|
|
|
|
move-result-wide v1
|
|
|
|
new-instance p2, Lcom/discord/restapi/RestAPIParams$UserGuildSettings$ChannelOverride;
|
|
|
|
sget-object v3, Ljava/lang/Boolean;->FALSE:Ljava/lang/Boolean;
|
|
|
|
sget v4, Lcom/discord/models/domain/ModelNotificationSettings;->FREQUENCY_UNSET:I
|
|
|
|
invoke-static {v4}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;
|
|
|
|
move-result-object v4
|
|
|
|
invoke-direct {p2, v3, v0, v4}, Lcom/discord/restapi/RestAPIParams$UserGuildSettings$ChannelOverride;-><init>(Ljava/lang/Boolean;Lcom/discord/models/domain/ModelMuteConfig;Ljava/lang/Integer;)V
|
|
|
|
invoke-direct {v7, v1, v2, p2}, Lcom/discord/restapi/RestAPIParams$UserGuildSettings;-><init>(JLcom/discord/restapi/RestAPIParams$UserGuildSettings$ChannelOverride;)V
|
|
|
|
const v8, 0x7f1203ef
|
|
|
|
move-object v3, p0
|
|
|
|
move-object v4, p1
|
|
|
|
invoke-direct/range {v3 .. v8}, Lcom/discord/stores/StoreUserGuildSettings;->updateUserGuildSettings(Landroid/content/Context;JLcom/discord/restapi/RestAPIParams$UserGuildSettings;I)V
|
|
|
|
return-void
|
|
|
|
:cond_0
|
|
const-string p1, "channel"
|
|
|
|
invoke-static {p1}, Lj0/n/c/h;->c(Ljava/lang/String;)V
|
|
|
|
throw v0
|
|
|
|
:cond_1
|
|
const-string p1, "context"
|
|
|
|
invoke-static {p1}, Lj0/n/c/h;->c(Ljava/lang/String;)V
|
|
|
|
throw v0
|
|
.end method
|
|
|
|
.method public final setGuildFrequency(Landroid/content/Context;Lcom/discord/models/domain/ModelGuild;I)V
|
|
.locals 15
|
|
|
|
const/4 v0, 0x0
|
|
|
|
if-eqz p1, :cond_1
|
|
|
|
if-eqz p2, :cond_0
|
|
|
|
invoke-virtual/range {p2 .. p2}, Lcom/discord/models/domain/ModelGuild;->getId()J
|
|
|
|
move-result-wide v3
|
|
|
|
new-instance v0, Lcom/discord/restapi/RestAPIParams$UserGuildSettings;
|
|
|
|
const/4 v6, 0x0
|
|
|
|
const/4 v7, 0x0
|
|
|
|
const/4 v8, 0x0
|
|
|
|
const/4 v9, 0x0
|
|
|
|
const/4 v10, 0x0
|
|
|
|
invoke-static/range {p3 .. p3}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;
|
|
|
|
move-result-object v11
|
|
|
|
const/4 v12, 0x0
|
|
|
|
const/16 v13, 0x5f
|
|
|
|
const/4 v14, 0x0
|
|
|
|
move-object v5, v0
|
|
|
|
invoke-direct/range {v5 .. v14}, Lcom/discord/restapi/RestAPIParams$UserGuildSettings;-><init>(Ljava/lang/Boolean;Ljava/lang/Boolean;Ljava/lang/Boolean;Lcom/discord/models/domain/ModelMuteConfig;Ljava/lang/Boolean;Ljava/lang/Integer;Ljava/util/Map;ILkotlin/jvm/internal/DefaultConstructorMarker;)V
|
|
|
|
const v6, 0x7f1213d0
|
|
|
|
move-object v1, p0
|
|
|
|
move-object/from16 v2, p1
|
|
|
|
invoke-direct/range {v1 .. v6}, Lcom/discord/stores/StoreUserGuildSettings;->updateUserGuildSettings(Landroid/content/Context;JLcom/discord/restapi/RestAPIParams$UserGuildSettings;I)V
|
|
|
|
return-void
|
|
|
|
:cond_0
|
|
const-string v1, "guild"
|
|
|
|
invoke-static {v1}, Lj0/n/c/h;->c(Ljava/lang/String;)V
|
|
|
|
throw v0
|
|
|
|
:cond_1
|
|
const-string v1, "context"
|
|
|
|
invoke-static {v1}, Lj0/n/c/h;->c(Ljava/lang/String;)V
|
|
|
|
throw v0
|
|
.end method
|
|
|
|
.method public final setGuildMuted(Landroid/content/Context;JZLcom/discord/models/domain/ModelMuteConfig;)V
|
|
.locals 11
|
|
|
|
if-eqz p1, :cond_0
|
|
|
|
new-instance v10, Lcom/discord/restapi/RestAPIParams$UserGuildSettings;
|
|
|
|
const/4 v1, 0x0
|
|
|
|
const/4 v2, 0x0
|
|
|
|
invoke-static {p4}, Ljava/lang/Boolean;->valueOf(Z)Ljava/lang/Boolean;
|
|
|
|
move-result-object v3
|
|
|
|
const/4 v5, 0x0
|
|
|
|
const/4 v6, 0x0
|
|
|
|
const/4 v7, 0x0
|
|
|
|
const/16 v8, 0x73
|
|
|
|
const/4 v9, 0x0
|
|
|
|
move-object v0, v10
|
|
|
|
move-object/from16 v4, p5
|
|
|
|
invoke-direct/range {v0 .. v9}, Lcom/discord/restapi/RestAPIParams$UserGuildSettings;-><init>(Ljava/lang/Boolean;Ljava/lang/Boolean;Ljava/lang/Boolean;Lcom/discord/models/domain/ModelMuteConfig;Ljava/lang/Boolean;Ljava/lang/Integer;Ljava/util/Map;ILkotlin/jvm/internal/DefaultConstructorMarker;)V
|
|
|
|
const v5, 0x7f1213d0
|
|
|
|
move-object v0, p0
|
|
|
|
move-object v1, p1
|
|
|
|
move-wide v2, p2
|
|
|
|
move-object v4, v10
|
|
|
|
invoke-direct/range {v0 .. v5}, Lcom/discord/stores/StoreUserGuildSettings;->updateUserGuildSettings(Landroid/content/Context;JLcom/discord/restapi/RestAPIParams$UserGuildSettings;I)V
|
|
|
|
return-void
|
|
|
|
:cond_0
|
|
const-string v0, "context"
|
|
|
|
invoke-static {v0}, Lj0/n/c/h;->c(Ljava/lang/String;)V
|
|
|
|
const/4 v0, 0x0
|
|
|
|
throw v0
|
|
.end method
|
|
|
|
.method public final setGuildToggles(Landroid/content/Context;Lcom/discord/models/domain/ModelGuild;Ljava/lang/Boolean;Ljava/lang/Boolean;Ljava/lang/Boolean;Ljava/lang/Boolean;)V
|
|
.locals 15
|
|
|
|
const/4 v0, 0x0
|
|
|
|
if-eqz p1, :cond_1
|
|
|
|
if-eqz p2, :cond_0
|
|
|
|
invoke-virtual/range {p2 .. p2}, Lcom/discord/models/domain/ModelGuild;->getId()J
|
|
|
|
move-result-wide v3
|
|
|
|
new-instance v0, Lcom/discord/restapi/RestAPIParams$UserGuildSettings;
|
|
|
|
const/4 v9, 0x0
|
|
|
|
const/4 v11, 0x0
|
|
|
|
const/4 v12, 0x0
|
|
|
|
const/16 v13, 0x68
|
|
|
|
const/4 v14, 0x0
|
|
|
|
move-object v5, v0
|
|
|
|
move-object/from16 v6, p3
|
|
|
|
move-object/from16 v7, p4
|
|
|
|
move-object/from16 v8, p5
|
|
|
|
move-object/from16 v10, p6
|
|
|
|
invoke-direct/range {v5 .. v14}, Lcom/discord/restapi/RestAPIParams$UserGuildSettings;-><init>(Ljava/lang/Boolean;Ljava/lang/Boolean;Ljava/lang/Boolean;Lcom/discord/models/domain/ModelMuteConfig;Ljava/lang/Boolean;Ljava/lang/Integer;Ljava/util/Map;ILkotlin/jvm/internal/DefaultConstructorMarker;)V
|
|
|
|
const v6, 0x7f1213d0
|
|
|
|
move-object v1, p0
|
|
|
|
move-object/from16 v2, p1
|
|
|
|
invoke-direct/range {v1 .. v6}, Lcom/discord/stores/StoreUserGuildSettings;->updateUserGuildSettings(Landroid/content/Context;JLcom/discord/restapi/RestAPIParams$UserGuildSettings;I)V
|
|
|
|
return-void
|
|
|
|
:cond_0
|
|
const-string v1, "guild"
|
|
|
|
invoke-static {v1}, Lj0/n/c/h;->c(Ljava/lang/String;)V
|
|
|
|
throw v0
|
|
|
|
:cond_1
|
|
const-string v1, "context"
|
|
|
|
invoke-static {v1}, Lj0/n/c/h;->c(Ljava/lang/String;)V
|
|
|
|
throw v0
|
|
.end method
|
|
|
|
.method public final setHideMutedChannels(JZ)V
|
|
.locals 2
|
|
|
|
iget-object v0, p0, Lcom/discord/stores/StoreUserGuildSettings;->dispatcher:Lcom/discord/stores/Dispatcher;
|
|
|
|
new-instance v1, Lcom/discord/stores/StoreUserGuildSettings$setHideMutedChannels$1;
|
|
|
|
invoke-direct {v1, p0, p3, p1, p2}, Lcom/discord/stores/StoreUserGuildSettings$setHideMutedChannels$1;-><init>(Lcom/discord/stores/StoreUserGuildSettings;ZJ)V
|
|
|
|
invoke-virtual {v0, v1}, Lcom/discord/stores/Dispatcher;->schedule(Lkotlin/jvm/functions/Function0;)V
|
|
|
|
return-void
|
|
.end method
|