559 lines
17 KiB
Smali
559 lines
17 KiB
Smali
.class public final Lcom/discord/widgets/settings/MuteSettingsSheetViewModel;
|
|
.super Le/a/b/c0;
|
|
.source "MuteSettingsSheetViewModel.kt"
|
|
|
|
|
|
# annotations
|
|
.annotation system Ldalvik/annotation/MemberClasses;
|
|
value = {
|
|
Lcom/discord/widgets/settings/MuteSettingsSheetViewModel$SettingsType;,
|
|
Lcom/discord/widgets/settings/MuteSettingsSheetViewModel$Config;,
|
|
Lcom/discord/widgets/settings/MuteSettingsSheetViewModel$ViewState;,
|
|
Lcom/discord/widgets/settings/MuteSettingsSheetViewModel$StoreState;,
|
|
Lcom/discord/widgets/settings/MuteSettingsSheetViewModel$Event;,
|
|
Lcom/discord/widgets/settings/MuteSettingsSheetViewModel$Factory;,
|
|
Lcom/discord/widgets/settings/MuteSettingsSheetViewModel$Companion;
|
|
}
|
|
.end annotation
|
|
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"Le/a/b/c0<",
|
|
"Lcom/discord/widgets/settings/MuteSettingsSheetViewModel$ViewState;",
|
|
">;"
|
|
}
|
|
.end annotation
|
|
|
|
|
|
# static fields
|
|
.field public static final Companion:Lcom/discord/widgets/settings/MuteSettingsSheetViewModel$Companion;
|
|
|
|
.field public static final MUTE_DURATION_ALWAYS:J
|
|
|
|
|
|
# instance fields
|
|
.field public final clock:Lcom/discord/utilities/clocks/Clock;
|
|
|
|
.field public final config:Lcom/discord/widgets/settings/MuteSettingsSheetViewModel$Config;
|
|
|
|
.field public final eventSubject:Lrx/subjects/PublishSubject;
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"Lrx/subjects/PublishSubject<",
|
|
"Lcom/discord/widgets/settings/MuteSettingsSheetViewModel$Event;",
|
|
">;"
|
|
}
|
|
.end annotation
|
|
.end field
|
|
|
|
.field public final simpleTime:Lcom/miguelgaeta/simple_time/SimpleTime;
|
|
|
|
.field public final storeStateObservable:Lrx/Observable;
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"Lrx/Observable<",
|
|
"Lcom/discord/widgets/settings/MuteSettingsSheetViewModel$StoreState;",
|
|
">;"
|
|
}
|
|
.end annotation
|
|
.end field
|
|
|
|
.field public final storeUserGuildSettings:Lcom/discord/stores/StoreUserGuildSettings;
|
|
|
|
|
|
# direct methods
|
|
.method public static constructor <clinit>()V
|
|
.locals 2
|
|
|
|
new-instance v0, Lcom/discord/widgets/settings/MuteSettingsSheetViewModel$Companion;
|
|
|
|
const/4 v1, 0x0
|
|
|
|
invoke-direct {v0, v1}, Lcom/discord/widgets/settings/MuteSettingsSheetViewModel$Companion;-><init>(Lkotlin/jvm/internal/DefaultConstructorMarker;)V
|
|
|
|
sput-object v0, Lcom/discord/widgets/settings/MuteSettingsSheetViewModel;->Companion:Lcom/discord/widgets/settings/MuteSettingsSheetViewModel$Companion;
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public constructor <init>(Lcom/discord/widgets/settings/MuteSettingsSheetViewModel$Config;Lrx/Observable;Lcom/discord/stores/StoreUserGuildSettings;Lcom/discord/utilities/clocks/Clock;Lcom/miguelgaeta/simple_time/SimpleTime;)V
|
|
.locals 10
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"(",
|
|
"Lcom/discord/widgets/settings/MuteSettingsSheetViewModel$Config;",
|
|
"Lrx/Observable<",
|
|
"Lcom/discord/widgets/settings/MuteSettingsSheetViewModel$StoreState;",
|
|
">;",
|
|
"Lcom/discord/stores/StoreUserGuildSettings;",
|
|
"Lcom/discord/utilities/clocks/Clock;",
|
|
"Lcom/miguelgaeta/simple_time/SimpleTime;",
|
|
")V"
|
|
}
|
|
.end annotation
|
|
|
|
const/4 v0, 0x0
|
|
|
|
if-eqz p1, :cond_4
|
|
|
|
if-eqz p2, :cond_3
|
|
|
|
if-eqz p3, :cond_2
|
|
|
|
if-eqz p4, :cond_1
|
|
|
|
if-eqz p5, :cond_0
|
|
|
|
sget-object v1, Lcom/discord/widgets/settings/MuteSettingsSheetViewModel$ViewState$Uninitialized;->INSTANCE:Lcom/discord/widgets/settings/MuteSettingsSheetViewModel$ViewState$Uninitialized;
|
|
|
|
invoke-direct {p0, v1}, Le/a/b/c0;-><init>(Ljava/lang/Object;)V
|
|
|
|
iput-object p1, p0, Lcom/discord/widgets/settings/MuteSettingsSheetViewModel;->config:Lcom/discord/widgets/settings/MuteSettingsSheetViewModel$Config;
|
|
|
|
iput-object p2, p0, Lcom/discord/widgets/settings/MuteSettingsSheetViewModel;->storeStateObservable:Lrx/Observable;
|
|
|
|
iput-object p3, p0, Lcom/discord/widgets/settings/MuteSettingsSheetViewModel;->storeUserGuildSettings:Lcom/discord/stores/StoreUserGuildSettings;
|
|
|
|
iput-object p4, p0, Lcom/discord/widgets/settings/MuteSettingsSheetViewModel;->clock:Lcom/discord/utilities/clocks/Clock;
|
|
|
|
iput-object p5, p0, Lcom/discord/widgets/settings/MuteSettingsSheetViewModel;->simpleTime:Lcom/miguelgaeta/simple_time/SimpleTime;
|
|
|
|
invoke-static {}, Lrx/subjects/PublishSubject;->o()Lrx/subjects/PublishSubject;
|
|
|
|
move-result-object p1
|
|
|
|
iput-object p1, p0, Lcom/discord/widgets/settings/MuteSettingsSheetViewModel;->eventSubject:Lrx/subjects/PublishSubject;
|
|
|
|
iget-object p1, p0, Lcom/discord/widgets/settings/MuteSettingsSheetViewModel;->storeStateObservable:Lrx/Observable;
|
|
|
|
invoke-static {p1}, Lcom/discord/utilities/rx/ObservableExtensionsKt;->computationLatest(Lrx/Observable;)Lrx/Observable;
|
|
|
|
move-result-object p1
|
|
|
|
const/4 p2, 0x2
|
|
|
|
invoke-static {p1, p0, v0, p2, v0}, Lcom/discord/utilities/rx/ObservableExtensionsKt;->ui$default(Lrx/Observable;Lcom/discord/app/AppComponent;Lcom/discord/utilities/mg_recycler/MGRecyclerAdapterSimple;ILjava/lang/Object;)Lrx/Observable;
|
|
|
|
move-result-object v1
|
|
|
|
const-class v2, Lcom/discord/widgets/settings/MuteSettingsSheetViewModel;
|
|
|
|
const/4 v3, 0x0
|
|
|
|
const/4 v4, 0x0
|
|
|
|
const/4 v5, 0x0
|
|
|
|
const/4 v6, 0x0
|
|
|
|
new-instance v7, Lcom/discord/widgets/settings/MuteSettingsSheetViewModel$1;
|
|
|
|
invoke-direct {v7, p0}, Lcom/discord/widgets/settings/MuteSettingsSheetViewModel$1;-><init>(Lcom/discord/widgets/settings/MuteSettingsSheetViewModel;)V
|
|
|
|
const/16 v8, 0x1e
|
|
|
|
const/4 v9, 0x0
|
|
|
|
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
|
|
|
|
:cond_0
|
|
const-string p1, "simpleTime"
|
|
|
|
invoke-static {p1}, Lt/u/b/j;->a(Ljava/lang/String;)V
|
|
|
|
throw v0
|
|
|
|
:cond_1
|
|
const-string p1, "clock"
|
|
|
|
invoke-static {p1}, Lt/u/b/j;->a(Ljava/lang/String;)V
|
|
|
|
throw v0
|
|
|
|
:cond_2
|
|
const-string p1, "storeUserGuildSettings"
|
|
|
|
invoke-static {p1}, Lt/u/b/j;->a(Ljava/lang/String;)V
|
|
|
|
throw v0
|
|
|
|
:cond_3
|
|
const-string p1, "storeStateObservable"
|
|
|
|
invoke-static {p1}, Lt/u/b/j;->a(Ljava/lang/String;)V
|
|
|
|
throw v0
|
|
|
|
:cond_4
|
|
const-string p1, "config"
|
|
|
|
invoke-static {p1}, Lt/u/b/j;->a(Ljava/lang/String;)V
|
|
|
|
throw v0
|
|
.end method
|
|
|
|
.method public static final synthetic access$handleStoreState(Lcom/discord/widgets/settings/MuteSettingsSheetViewModel;Lcom/discord/widgets/settings/MuteSettingsSheetViewModel$StoreState;)V
|
|
.locals 0
|
|
|
|
invoke-direct {p0, p1}, Lcom/discord/widgets/settings/MuteSettingsSheetViewModel;->handleStoreState(Lcom/discord/widgets/settings/MuteSettingsSheetViewModel$StoreState;)V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method private final emitDismissEvent()V
|
|
.locals 2
|
|
.annotation build Landroidx/annotation/UiThread;
|
|
.end annotation
|
|
|
|
iget-object v0, p0, Lcom/discord/widgets/settings/MuteSettingsSheetViewModel;->eventSubject:Lrx/subjects/PublishSubject;
|
|
|
|
sget-object v1, Lcom/discord/widgets/settings/MuteSettingsSheetViewModel$Event$Dismiss;->INSTANCE:Lcom/discord/widgets/settings/MuteSettingsSheetViewModel$Event$Dismiss;
|
|
|
|
invoke-virtual {v0, v1}, Lrx/subjects/PublishSubject;->onNext(Ljava/lang/Object;)V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method private final handleStoreState(Lcom/discord/widgets/settings/MuteSettingsSheetViewModel$StoreState;)V
|
|
.locals 5
|
|
.annotation build Landroidx/annotation/UiThread;
|
|
.end annotation
|
|
|
|
invoke-virtual {p1}, Lcom/discord/widgets/settings/MuteSettingsSheetViewModel$StoreState;->getGuild()Lcom/discord/models/domain/ModelGuild;
|
|
|
|
move-result-object v0
|
|
|
|
invoke-virtual {p1}, Lcom/discord/widgets/settings/MuteSettingsSheetViewModel$StoreState;->getChannel()Lcom/discord/models/domain/ModelChannel;
|
|
|
|
move-result-object p1
|
|
|
|
if-eqz v0, :cond_0
|
|
|
|
sget-object v1, Lcom/discord/widgets/settings/MuteSettingsSheetViewModel$SettingsType;->GUILD:Lcom/discord/widgets/settings/MuteSettingsSheetViewModel$SettingsType;
|
|
|
|
goto :goto_0
|
|
|
|
:cond_0
|
|
if-eqz p1, :cond_4
|
|
|
|
invoke-virtual {p1}, Lcom/discord/models/domain/ModelChannel;->isDM()Z
|
|
|
|
move-result v1
|
|
|
|
if-eqz v1, :cond_1
|
|
|
|
sget-object v1, Lcom/discord/widgets/settings/MuteSettingsSheetViewModel$SettingsType;->DM:Lcom/discord/widgets/settings/MuteSettingsSheetViewModel$SettingsType;
|
|
|
|
goto :goto_0
|
|
|
|
:cond_1
|
|
invoke-virtual {p1}, Lcom/discord/models/domain/ModelChannel;->isGroup()Z
|
|
|
|
move-result v1
|
|
|
|
if-eqz v1, :cond_2
|
|
|
|
sget-object v1, Lcom/discord/widgets/settings/MuteSettingsSheetViewModel$SettingsType;->GROUP_DM:Lcom/discord/widgets/settings/MuteSettingsSheetViewModel$SettingsType;
|
|
|
|
goto :goto_0
|
|
|
|
:cond_2
|
|
invoke-virtual {p1}, Lcom/discord/models/domain/ModelChannel;->isCategory()Z
|
|
|
|
move-result v1
|
|
|
|
if-eqz v1, :cond_3
|
|
|
|
sget-object v1, Lcom/discord/widgets/settings/MuteSettingsSheetViewModel$SettingsType;->CATEGORY:Lcom/discord/widgets/settings/MuteSettingsSheetViewModel$SettingsType;
|
|
|
|
goto :goto_0
|
|
|
|
:cond_3
|
|
sget-object v1, Lcom/discord/widgets/settings/MuteSettingsSheetViewModel$SettingsType;->GUILD_CHANNEL:Lcom/discord/widgets/settings/MuteSettingsSheetViewModel$SettingsType;
|
|
|
|
goto :goto_0
|
|
|
|
:cond_4
|
|
sget-object v1, Lcom/discord/widgets/settings/MuteSettingsSheetViewModel$SettingsType;->UNKNOWN:Lcom/discord/widgets/settings/MuteSettingsSheetViewModel$SettingsType;
|
|
|
|
:goto_0
|
|
sget-object v2, Lcom/discord/widgets/settings/MuteSettingsSheetViewModel$SettingsType;->UNKNOWN:Lcom/discord/widgets/settings/MuteSettingsSheetViewModel$SettingsType;
|
|
|
|
if-ne v1, v2, :cond_5
|
|
|
|
sget-object p1, Lcom/discord/widgets/settings/MuteSettingsSheetViewModel$ViewState$Failure;->INSTANCE:Lcom/discord/widgets/settings/MuteSettingsSheetViewModel$ViewState$Failure;
|
|
|
|
invoke-virtual {p0, p1}, Le/a/b/c0;->updateViewState(Ljava/lang/Object;)V
|
|
|
|
return-void
|
|
|
|
:cond_5
|
|
sget-object v2, Lcom/discord/widgets/settings/MuteSettingsSheetViewModel$WhenMappings;->$EnumSwitchMapping$0:[I
|
|
|
|
invoke-virtual {v1}, Ljava/lang/Enum;->ordinal()I
|
|
|
|
move-result v3
|
|
|
|
aget v2, v2, v3
|
|
|
|
const/4 v3, 0x1
|
|
|
|
const/4 v4, 0x0
|
|
|
|
if-eq v2, v3, :cond_a
|
|
|
|
const/4 v0, 0x2
|
|
|
|
if-eq v2, v0, :cond_8
|
|
|
|
const/4 v0, 0x3
|
|
|
|
if-eq v2, v0, :cond_6
|
|
|
|
const/4 v0, 0x4
|
|
|
|
if-eq v2, v0, :cond_6
|
|
|
|
const/4 v0, 0x5
|
|
|
|
if-eq v2, v0, :cond_6
|
|
|
|
const-string p1, ""
|
|
|
|
goto :goto_1
|
|
|
|
:cond_6
|
|
if-eqz p1, :cond_7
|
|
|
|
invoke-virtual {p1}, Lcom/discord/models/domain/ModelChannel;->getName()Ljava/lang/String;
|
|
|
|
move-result-object p1
|
|
|
|
goto :goto_1
|
|
|
|
:cond_7
|
|
invoke-static {}, Lt/u/b/j;->throwNpe()V
|
|
|
|
throw v4
|
|
|
|
:cond_8
|
|
const/16 v0, 0x23
|
|
|
|
invoke-static {v0}, Le/e/b/a/a;->a(C)Ljava/lang/StringBuilder;
|
|
|
|
move-result-object v0
|
|
|
|
if-eqz p1, :cond_9
|
|
|
|
invoke-virtual {p1}, Lcom/discord/models/domain/ModelChannel;->getName()Ljava/lang/String;
|
|
|
|
move-result-object p1
|
|
|
|
invoke-virtual {v0, p1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
invoke-virtual {v0}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
|
|
|
|
move-result-object p1
|
|
|
|
goto :goto_1
|
|
|
|
:cond_9
|
|
invoke-static {}, Lt/u/b/j;->throwNpe()V
|
|
|
|
throw v4
|
|
|
|
:cond_a
|
|
if-eqz v0, :cond_b
|
|
|
|
invoke-virtual {v0}, Lcom/discord/models/domain/ModelGuild;->getName()Ljava/lang/String;
|
|
|
|
move-result-object p1
|
|
|
|
:goto_1
|
|
new-instance v0, Lcom/discord/widgets/settings/MuteSettingsSheetViewModel$ViewState$Loaded;
|
|
|
|
const-string v2, "subtitle"
|
|
|
|
invoke-static {p1, v2}, Lt/u/b/j;->checkExpressionValueIsNotNull(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
invoke-direct {v0, v1, p1}, Lcom/discord/widgets/settings/MuteSettingsSheetViewModel$ViewState$Loaded;-><init>(Lcom/discord/widgets/settings/MuteSettingsSheetViewModel$SettingsType;Ljava/lang/String;)V
|
|
|
|
invoke-virtual {p0, v0}, Le/a/b/c0;->updateViewState(Ljava/lang/Object;)V
|
|
|
|
return-void
|
|
|
|
:cond_b
|
|
invoke-static {}, Lt/u/b/j;->throwNpe()V
|
|
|
|
throw v4
|
|
.end method
|
|
|
|
|
|
# virtual methods
|
|
.method public final getClock()Lcom/discord/utilities/clocks/Clock;
|
|
.locals 1
|
|
|
|
iget-object v0, p0, Lcom/discord/widgets/settings/MuteSettingsSheetViewModel;->clock:Lcom/discord/utilities/clocks/Clock;
|
|
|
|
return-object v0
|
|
.end method
|
|
|
|
.method public final getConfig()Lcom/discord/widgets/settings/MuteSettingsSheetViewModel$Config;
|
|
.locals 1
|
|
|
|
iget-object v0, p0, Lcom/discord/widgets/settings/MuteSettingsSheetViewModel;->config:Lcom/discord/widgets/settings/MuteSettingsSheetViewModel$Config;
|
|
|
|
return-object v0
|
|
.end method
|
|
|
|
.method public final getSimpleTime()Lcom/miguelgaeta/simple_time/SimpleTime;
|
|
.locals 1
|
|
|
|
iget-object v0, p0, Lcom/discord/widgets/settings/MuteSettingsSheetViewModel;->simpleTime:Lcom/miguelgaeta/simple_time/SimpleTime;
|
|
|
|
return-object v0
|
|
.end method
|
|
|
|
.method public final getStoreStateObservable()Lrx/Observable;
|
|
.locals 1
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"()",
|
|
"Lrx/Observable<",
|
|
"Lcom/discord/widgets/settings/MuteSettingsSheetViewModel$StoreState;",
|
|
">;"
|
|
}
|
|
.end annotation
|
|
|
|
iget-object v0, p0, Lcom/discord/widgets/settings/MuteSettingsSheetViewModel;->storeStateObservable:Lrx/Observable;
|
|
|
|
return-object v0
|
|
.end method
|
|
|
|
.method public final getStoreUserGuildSettings()Lcom/discord/stores/StoreUserGuildSettings;
|
|
.locals 1
|
|
|
|
iget-object v0, p0, Lcom/discord/widgets/settings/MuteSettingsSheetViewModel;->storeUserGuildSettings:Lcom/discord/stores/StoreUserGuildSettings;
|
|
|
|
return-object v0
|
|
.end method
|
|
|
|
.method public final observeEvents()Lrx/Observable;
|
|
.locals 2
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"()",
|
|
"Lrx/Observable<",
|
|
"Lcom/discord/widgets/settings/MuteSettingsSheetViewModel$Event;",
|
|
">;"
|
|
}
|
|
.end annotation
|
|
|
|
iget-object v0, p0, Lcom/discord/widgets/settings/MuteSettingsSheetViewModel;->eventSubject:Lrx/subjects/PublishSubject;
|
|
|
|
const-string v1, "eventSubject"
|
|
|
|
invoke-static {v0, v1}, Lt/u/b/j;->checkExpressionValueIsNotNull(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
return-object v0
|
|
.end method
|
|
|
|
.method public final selectMuteDurationMs(JLandroid/content/Context;)V
|
|
.locals 7
|
|
.annotation build Landroidx/annotation/UiThread;
|
|
.end annotation
|
|
|
|
const/4 v0, 0x0
|
|
|
|
if-eqz p3, :cond_3
|
|
|
|
const-wide/16 v1, 0x0
|
|
|
|
cmp-long v3, p1, v1
|
|
|
|
if-nez v3, :cond_0
|
|
|
|
goto :goto_0
|
|
|
|
:cond_0
|
|
iget-object v0, p0, Lcom/discord/widgets/settings/MuteSettingsSheetViewModel;->simpleTime:Lcom/miguelgaeta/simple_time/SimpleTime;
|
|
|
|
iget-object v1, p0, Lcom/discord/widgets/settings/MuteSettingsSheetViewModel;->clock:Lcom/discord/utilities/clocks/Clock;
|
|
|
|
invoke-interface {v1}, Lcom/discord/utilities/clocks/Clock;->currentTimeMillis()J
|
|
|
|
move-result-wide v1
|
|
|
|
add-long/2addr v1, p1
|
|
|
|
invoke-static {v1, v2}, Ljava/lang/Long;->valueOf(J)Ljava/lang/Long;
|
|
|
|
move-result-object p1
|
|
|
|
invoke-virtual {v0, p1}, Lcom/miguelgaeta/simple_time/SimpleTime;->toUTCDateString(Ljava/lang/Long;)Ljava/lang/String;
|
|
|
|
move-result-object p1
|
|
|
|
new-instance v0, Lcom/discord/models/domain/ModelMuteConfig;
|
|
|
|
invoke-direct {v0, p1}, Lcom/discord/models/domain/ModelMuteConfig;-><init>(Ljava/lang/String;)V
|
|
|
|
:goto_0
|
|
move-object v6, v0
|
|
|
|
iget-object p1, p0, Lcom/discord/widgets/settings/MuteSettingsSheetViewModel;->config:Lcom/discord/widgets/settings/MuteSettingsSheetViewModel$Config;
|
|
|
|
instance-of p2, p1, Lcom/discord/widgets/settings/MuteSettingsSheetViewModel$Config$Guild;
|
|
|
|
if-eqz p2, :cond_1
|
|
|
|
iget-object v1, p0, Lcom/discord/widgets/settings/MuteSettingsSheetViewModel;->storeUserGuildSettings:Lcom/discord/stores/StoreUserGuildSettings;
|
|
|
|
check-cast p1, Lcom/discord/widgets/settings/MuteSettingsSheetViewModel$Config$Guild;
|
|
|
|
invoke-virtual {p1}, Lcom/discord/widgets/settings/MuteSettingsSheetViewModel$Config$Guild;->getGuildId()J
|
|
|
|
move-result-wide v3
|
|
|
|
const/4 v5, 0x1
|
|
|
|
move-object v2, p3
|
|
|
|
invoke-virtual/range {v1 .. v6}, Lcom/discord/stores/StoreUserGuildSettings;->setGuildMuted(Landroid/content/Context;JZLcom/discord/models/domain/ModelMuteConfig;)V
|
|
|
|
goto :goto_1
|
|
|
|
:cond_1
|
|
instance-of p2, p1, Lcom/discord/widgets/settings/MuteSettingsSheetViewModel$Config$Channel;
|
|
|
|
if-eqz p2, :cond_2
|
|
|
|
iget-object v1, p0, Lcom/discord/widgets/settings/MuteSettingsSheetViewModel;->storeUserGuildSettings:Lcom/discord/stores/StoreUserGuildSettings;
|
|
|
|
check-cast p1, Lcom/discord/widgets/settings/MuteSettingsSheetViewModel$Config$Channel;
|
|
|
|
invoke-virtual {p1}, Lcom/discord/widgets/settings/MuteSettingsSheetViewModel$Config$Channel;->getChannelId()J
|
|
|
|
move-result-wide v3
|
|
|
|
const/4 v5, 0x1
|
|
|
|
move-object v2, p3
|
|
|
|
invoke-virtual/range {v1 .. v6}, Lcom/discord/stores/StoreUserGuildSettings;->setChannelMuted(Landroid/content/Context;JZLcom/discord/models/domain/ModelMuteConfig;)V
|
|
|
|
:cond_2
|
|
:goto_1
|
|
invoke-direct {p0}, Lcom/discord/widgets/settings/MuteSettingsSheetViewModel;->emitDismissEvent()V
|
|
|
|
return-void
|
|
|
|
:cond_3
|
|
const-string p1, "appContext"
|
|
|
|
invoke-static {p1}, Lt/u/b/j;->a(Ljava/lang/String;)V
|
|
|
|
throw v0
|
|
.end method
|