293 lines
9.1 KiB
Smali
293 lines
9.1 KiB
Smali
|
.class public final Lcom/discord/widgets/channels/WidgetChannelSidebarActionsViewModel;
|
||
|
.super Lf/a/b/b0;
|
||
|
.source "WidgetChannelSidebarActionsViewModel.kt"
|
||
|
|
||
|
|
||
|
# annotations
|
||
|
.annotation system Ldalvik/annotation/MemberClasses;
|
||
|
value = {
|
||
|
Lcom/discord/widgets/channels/WidgetChannelSidebarActionsViewModel$ViewState;,
|
||
|
Lcom/discord/widgets/channels/WidgetChannelSidebarActionsViewModel$StoreState;,
|
||
|
Lcom/discord/widgets/channels/WidgetChannelSidebarActionsViewModel$Factory;
|
||
|
}
|
||
|
.end annotation
|
||
|
|
||
|
.annotation system Ldalvik/annotation/Signature;
|
||
|
value = {
|
||
|
"Lf/a/b/b0<",
|
||
|
"Lcom/discord/widgets/channels/WidgetChannelSidebarActionsViewModel$ViewState;",
|
||
|
">;"
|
||
|
}
|
||
|
.end annotation
|
||
|
|
||
|
|
||
|
# direct methods
|
||
|
.method public constructor <init>(Lrx/Observable;)V
|
||
|
.locals 11
|
||
|
.annotation system Ldalvik/annotation/Signature;
|
||
|
value = {
|
||
|
"(",
|
||
|
"Lrx/Observable<",
|
||
|
"Lcom/discord/widgets/channels/WidgetChannelSidebarActionsViewModel$StoreState;",
|
||
|
">;)V"
|
||
|
}
|
||
|
.end annotation
|
||
|
|
||
|
const/4 v0, 0x0
|
||
|
|
||
|
if-eqz p1, :cond_0
|
||
|
|
||
|
sget-object v1, Lcom/discord/widgets/channels/WidgetChannelSidebarActionsViewModel$ViewState$Uninitialized;->INSTANCE:Lcom/discord/widgets/channels/WidgetChannelSidebarActionsViewModel$ViewState$Uninitialized;
|
||
|
|
||
|
invoke-direct {p0, v1}, Lf/a/b/b0;-><init>(Ljava/lang/Object;)V
|
||
|
|
||
|
const/4 v1, 0x2
|
||
|
|
||
|
invoke-static {p1, p0, v0, v1, 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 v2
|
||
|
|
||
|
const-class v3, Lcom/discord/widgets/channels/WidgetChannelSidebarActionsViewModel;
|
||
|
|
||
|
const/4 v4, 0x0
|
||
|
|
||
|
const/4 v5, 0x0
|
||
|
|
||
|
const/4 v6, 0x0
|
||
|
|
||
|
const/4 v7, 0x0
|
||
|
|
||
|
new-instance v8, Lcom/discord/widgets/channels/WidgetChannelSidebarActionsViewModel$1;
|
||
|
|
||
|
invoke-direct {v8, p0}, Lcom/discord/widgets/channels/WidgetChannelSidebarActionsViewModel$1;-><init>(Lcom/discord/widgets/channels/WidgetChannelSidebarActionsViewModel;)V
|
||
|
|
||
|
const/16 v9, 0x1e
|
||
|
|
||
|
const/4 v10, 0x0
|
||
|
|
||
|
invoke-static/range {v2 .. v10}, 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, "storeStateObservable"
|
||
|
|
||
|
invoke-static {p1}, Ly/v/b/j;->a(Ljava/lang/String;)V
|
||
|
|
||
|
throw v0
|
||
|
.end method
|
||
|
|
||
|
.method public static final synthetic access$handleStoreState(Lcom/discord/widgets/channels/WidgetChannelSidebarActionsViewModel;Lcom/discord/widgets/channels/WidgetChannelSidebarActionsViewModel$StoreState;)V
|
||
|
.locals 0
|
||
|
|
||
|
invoke-direct {p0, p1}, Lcom/discord/widgets/channels/WidgetChannelSidebarActionsViewModel;->handleStoreState(Lcom/discord/widgets/channels/WidgetChannelSidebarActionsViewModel$StoreState;)V
|
||
|
|
||
|
return-void
|
||
|
.end method
|
||
|
|
||
|
.method private final handleStoreState(Lcom/discord/widgets/channels/WidgetChannelSidebarActionsViewModel$StoreState;)V
|
||
|
.locals 10
|
||
|
|
||
|
sget-object v0, Lcom/discord/widgets/channels/WidgetChannelSidebarActionsViewModel$StoreState$ChannelNotFound;->INSTANCE:Lcom/discord/widgets/channels/WidgetChannelSidebarActionsViewModel$StoreState$ChannelNotFound;
|
||
|
|
||
|
invoke-static {p1, v0}, Ly/v/b/j;->areEqual(Ljava/lang/Object;Ljava/lang/Object;)Z
|
||
|
|
||
|
move-result v0
|
||
|
|
||
|
if-eqz v0, :cond_0
|
||
|
|
||
|
sget-object p1, Lcom/discord/widgets/channels/WidgetChannelSidebarActionsViewModel$ViewState$Uninitialized;->INSTANCE:Lcom/discord/widgets/channels/WidgetChannelSidebarActionsViewModel$ViewState$Uninitialized;
|
||
|
|
||
|
invoke-virtual {p0, p1}, Lf/a/b/b0;->updateViewState(Ljava/lang/Object;)V
|
||
|
|
||
|
goto/16 :goto_3
|
||
|
|
||
|
:cond_0
|
||
|
instance-of v0, p1, Lcom/discord/widgets/channels/WidgetChannelSidebarActionsViewModel$StoreState$ChannelFound;
|
||
|
|
||
|
if-eqz v0, :cond_7
|
||
|
|
||
|
check-cast p1, Lcom/discord/widgets/channels/WidgetChannelSidebarActionsViewModel$StoreState$ChannelFound;
|
||
|
|
||
|
invoke-virtual {p1}, Lcom/discord/widgets/channels/WidgetChannelSidebarActionsViewModel$StoreState$ChannelFound;->getChannel()Lcom/discord/models/domain/ModelChannel;
|
||
|
|
||
|
move-result-object v0
|
||
|
|
||
|
invoke-virtual {v0}, Lcom/discord/models/domain/ModelChannel;->isPrivate()Z
|
||
|
|
||
|
move-result v0
|
||
|
|
||
|
const/4 v1, 0x0
|
||
|
|
||
|
const/4 v2, 0x1
|
||
|
|
||
|
if-ne v0, v2, :cond_5
|
||
|
|
||
|
invoke-virtual {p1}, Lcom/discord/widgets/channels/WidgetChannelSidebarActionsViewModel$StoreState$ChannelFound;->getGuildNotificationSettings()Lcom/discord/models/domain/ModelNotificationSettings;
|
||
|
|
||
|
move-result-object v0
|
||
|
|
||
|
invoke-virtual {p1}, Lcom/discord/widgets/channels/WidgetChannelSidebarActionsViewModel$StoreState$ChannelFound;->getChannel()Lcom/discord/models/domain/ModelChannel;
|
||
|
|
||
|
move-result-object v3
|
||
|
|
||
|
invoke-virtual {v3}, Lcom/discord/models/domain/ModelChannel;->getId()J
|
||
|
|
||
|
move-result-wide v3
|
||
|
|
||
|
if-eqz v0, :cond_4
|
||
|
|
||
|
invoke-virtual {v0}, Lcom/discord/models/domain/ModelNotificationSettings;->getChannelOverrides()Ljava/util/List;
|
||
|
|
||
|
move-result-object v0
|
||
|
|
||
|
if-eqz v0, :cond_4
|
||
|
|
||
|
invoke-interface {v0}, Ljava/lang/Iterable;->iterator()Ljava/util/Iterator;
|
||
|
|
||
|
move-result-object v0
|
||
|
|
||
|
:cond_1
|
||
|
invoke-interface {v0}, Ljava/util/Iterator;->hasNext()Z
|
||
|
|
||
|
move-result v5
|
||
|
|
||
|
if-eqz v5, :cond_3
|
||
|
|
||
|
invoke-interface {v0}, Ljava/util/Iterator;->next()Ljava/lang/Object;
|
||
|
|
||
|
move-result-object v5
|
||
|
|
||
|
move-object v6, v5
|
||
|
|
||
|
check-cast v6, Lcom/discord/models/domain/ModelNotificationSettings$ChannelOverride;
|
||
|
|
||
|
const-string v7, "channelOverride"
|
||
|
|
||
|
invoke-static {v6, v7}, Ly/v/b/j;->checkExpressionValueIsNotNull(Ljava/lang/Object;Ljava/lang/String;)V
|
||
|
|
||
|
invoke-virtual {v6}, Lcom/discord/models/domain/ModelNotificationSettings$ChannelOverride;->getChannelId()J
|
||
|
|
||
|
move-result-wide v6
|
||
|
|
||
|
cmp-long v8, v6, v3
|
||
|
|
||
|
if-nez v8, :cond_2
|
||
|
|
||
|
const/4 v6, 0x1
|
||
|
|
||
|
goto :goto_0
|
||
|
|
||
|
:cond_2
|
||
|
const/4 v6, 0x0
|
||
|
|
||
|
:goto_0
|
||
|
if-eqz v6, :cond_1
|
||
|
|
||
|
goto :goto_1
|
||
|
|
||
|
:cond_3
|
||
|
const/4 v5, 0x0
|
||
|
|
||
|
:goto_1
|
||
|
check-cast v5, Lcom/discord/models/domain/ModelNotificationSettings$ChannelOverride;
|
||
|
|
||
|
if-eqz v5, :cond_4
|
||
|
|
||
|
invoke-virtual {v5}, Lcom/discord/models/domain/ModelNotificationSettings$ChannelOverride;->isMuted()Z
|
||
|
|
||
|
move-result v0
|
||
|
|
||
|
if-ne v0, v2, :cond_4
|
||
|
|
||
|
const/4 v1, 0x1
|
||
|
|
||
|
:cond_4
|
||
|
new-instance v0, Lcom/discord/widgets/channels/WidgetChannelSidebarActionsViewModel$ViewState$Private;
|
||
|
|
||
|
invoke-virtual {p1}, Lcom/discord/widgets/channels/WidgetChannelSidebarActionsViewModel$StoreState$ChannelFound;->getChannel()Lcom/discord/models/domain/ModelChannel;
|
||
|
|
||
|
move-result-object p1
|
||
|
|
||
|
invoke-virtual {p1}, Lcom/discord/models/domain/ModelChannel;->getId()J
|
||
|
|
||
|
move-result-wide v2
|
||
|
|
||
|
invoke-direct {v0, v2, v3, v1}, Lcom/discord/widgets/channels/WidgetChannelSidebarActionsViewModel$ViewState$Private;-><init>(JZ)V
|
||
|
|
||
|
invoke-virtual {p0, v0}, Lf/a/b/b0;->updateViewState(Ljava/lang/Object;)V
|
||
|
|
||
|
goto :goto_3
|
||
|
|
||
|
:cond_5
|
||
|
invoke-virtual {p1}, Lcom/discord/widgets/channels/WidgetChannelSidebarActionsViewModel$StoreState$ChannelFound;->getChannel()Lcom/discord/models/domain/ModelChannel;
|
||
|
|
||
|
move-result-object v0
|
||
|
|
||
|
invoke-virtual {v0}, Lcom/discord/models/domain/ModelChannel;->getId()J
|
||
|
|
||
|
move-result-wide v4
|
||
|
|
||
|
invoke-virtual {p1}, Lcom/discord/widgets/channels/WidgetChannelSidebarActionsViewModel$StoreState$ChannelFound;->getChannel()Lcom/discord/models/domain/ModelChannel;
|
||
|
|
||
|
move-result-object v0
|
||
|
|
||
|
invoke-virtual {v0}, Lcom/discord/models/domain/ModelChannel;->getGuildId()Ljava/lang/Long;
|
||
|
|
||
|
move-result-object v0
|
||
|
|
||
|
const-string v3, "storeState.channel.guildId"
|
||
|
|
||
|
invoke-static {v0, v3}, Ly/v/b/j;->checkExpressionValueIsNotNull(Ljava/lang/Object;Ljava/lang/String;)V
|
||
|
|
||
|
invoke-virtual {v0}, Ljava/lang/Long;->longValue()J
|
||
|
|
||
|
move-result-wide v6
|
||
|
|
||
|
invoke-virtual {p1}, Lcom/discord/widgets/channels/WidgetChannelSidebarActionsViewModel$StoreState$ChannelFound;->getGuildNotificationSettings()Lcom/discord/models/domain/ModelNotificationSettings;
|
||
|
|
||
|
move-result-object p1
|
||
|
|
||
|
if-eqz p1, :cond_6
|
||
|
|
||
|
invoke-virtual {p1, v4, v5}, Lcom/discord/models/domain/ModelNotificationSettings;->getChannelOverride(J)Lcom/discord/models/domain/ModelNotificationSettings$ChannelOverride;
|
||
|
|
||
|
move-result-object p1
|
||
|
|
||
|
if-eqz p1, :cond_6
|
||
|
|
||
|
invoke-virtual {p1}, Lcom/discord/models/domain/ModelNotificationSettings$ChannelOverride;->isMuted()Z
|
||
|
|
||
|
move-result p1
|
||
|
|
||
|
if-ne p1, v2, :cond_6
|
||
|
|
||
|
const/4 v8, 0x1
|
||
|
|
||
|
goto :goto_2
|
||
|
|
||
|
:cond_6
|
||
|
const/4 v8, 0x0
|
||
|
|
||
|
:goto_2
|
||
|
new-instance p1, Lcom/discord/widgets/channels/WidgetChannelSidebarActionsViewModel$ViewState$Guild;
|
||
|
|
||
|
const/4 v9, 0x0
|
||
|
|
||
|
move-object v3, p1
|
||
|
|
||
|
invoke-direct/range {v3 .. v9}, Lcom/discord/widgets/channels/WidgetChannelSidebarActionsViewModel$ViewState$Guild;-><init>(JJZZ)V
|
||
|
|
||
|
invoke-virtual {p0, p1}, Lf/a/b/b0;->updateViewState(Ljava/lang/Object;)V
|
||
|
|
||
|
:goto_3
|
||
|
return-void
|
||
|
|
||
|
:cond_7
|
||
|
new-instance p1, Ly/g;
|
||
|
|
||
|
invoke-direct {p1}, Ly/g;-><init>()V
|
||
|
|
||
|
throw p1
|
||
|
.end method
|