803 lines
28 KiB
Smali
803 lines
28 KiB
Smali
.class public final Lcom/discord/widgets/guilds/invite/WidgetGuildInviteShareViewModel;
|
|
.super Lf/a/b/b0;
|
|
.source "WidgetGuildInviteShareViewModel.kt"
|
|
|
|
# interfaces
|
|
.implements Lcom/discord/app/AppComponent;
|
|
|
|
|
|
# annotations
|
|
.annotation system Ldalvik/annotation/MemberClasses;
|
|
value = {
|
|
Lcom/discord/widgets/guilds/invite/WidgetGuildInviteShareViewModel$ViewState;
|
|
}
|
|
.end annotation
|
|
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"Lf/a/b/b0<",
|
|
"Lcom/discord/widgets/guilds/invite/WidgetGuildInviteShareViewModel$ViewState;",
|
|
">;",
|
|
"Lcom/discord/app/AppComponent;"
|
|
}
|
|
.end annotation
|
|
|
|
|
|
# instance fields
|
|
.field public final filterPublisher:Lrx/subjects/BehaviorSubject;
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"Lrx/subjects/BehaviorSubject<",
|
|
"Ljava/lang/String;",
|
|
">;"
|
|
}
|
|
.end annotation
|
|
.end field
|
|
|
|
.field public final inviteGenerator:Lcom/discord/widgets/guilds/invite/InviteGenerator;
|
|
|
|
.field public final inviteSuggestionsService:Lcom/discord/widgets/guilds/invite/InviteSuggestionsService;
|
|
|
|
.field public final refreshUiSubject:Lrx/subjects/BehaviorSubject;
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"Lrx/subjects/BehaviorSubject<",
|
|
"Lkotlin/Unit;",
|
|
">;"
|
|
}
|
|
.end annotation
|
|
.end field
|
|
|
|
.field public final resources:Landroid/content/res/Resources;
|
|
|
|
.field public final selectedChannelSubject:Lrx/subjects/BehaviorSubject;
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"Lrx/subjects/BehaviorSubject<",
|
|
"Ljava/lang/Long;",
|
|
">;"
|
|
}
|
|
.end annotation
|
|
.end field
|
|
|
|
.field public final sentInvitesSubject:Lrx/subjects/BehaviorSubject;
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"Lrx/subjects/BehaviorSubject<",
|
|
"Ljava/util/Map<",
|
|
"Ljava/lang/String;",
|
|
"Ljava/util/Set<",
|
|
"Ljava/lang/Long;",
|
|
">;>;>;"
|
|
}
|
|
.end annotation
|
|
.end field
|
|
|
|
.field public final storeChannels:Lcom/discord/stores/StoreChannels;
|
|
|
|
.field public final storeInviteSettings:Lcom/discord/stores/StoreInviteSettings;
|
|
|
|
.field public final storeUser:Lcom/discord/stores/StoreUser;
|
|
|
|
.field public final subscribeOnInit:Z
|
|
|
|
|
|
# direct methods
|
|
.method public constructor <init>(Lcom/discord/stores/StoreChannels;Lcom/discord/stores/StoreInviteSettings;Lcom/discord/stores/StoreUser;Lcom/discord/widgets/guilds/invite/InviteGenerator;Lcom/discord/widgets/guilds/invite/InviteSuggestionsService;Landroid/content/res/Resources;Z)V
|
|
.locals 17
|
|
|
|
move-object/from16 v0, p0
|
|
|
|
move-object/from16 v1, p1
|
|
|
|
move-object/from16 v2, p2
|
|
|
|
move-object/from16 v3, p3
|
|
|
|
move-object/from16 v4, p4
|
|
|
|
move-object/from16 v5, p5
|
|
|
|
move-object/from16 v6, p6
|
|
|
|
const/4 v7, 0x0
|
|
|
|
if-eqz v1, :cond_6
|
|
|
|
if-eqz v2, :cond_5
|
|
|
|
if-eqz v3, :cond_4
|
|
|
|
if-eqz v4, :cond_3
|
|
|
|
if-eqz v5, :cond_2
|
|
|
|
if-eqz v6, :cond_1
|
|
|
|
sget-object v8, Lcom/discord/widgets/guilds/invite/WidgetGuildInviteShareViewModel$ViewState$Uninitialized;->INSTANCE:Lcom/discord/widgets/guilds/invite/WidgetGuildInviteShareViewModel$ViewState$Uninitialized;
|
|
|
|
invoke-direct {v0, v8}, Lf/a/b/b0;-><init>(Ljava/lang/Object;)V
|
|
|
|
iput-object v1, v0, Lcom/discord/widgets/guilds/invite/WidgetGuildInviteShareViewModel;->storeChannels:Lcom/discord/stores/StoreChannels;
|
|
|
|
iput-object v2, v0, Lcom/discord/widgets/guilds/invite/WidgetGuildInviteShareViewModel;->storeInviteSettings:Lcom/discord/stores/StoreInviteSettings;
|
|
|
|
iput-object v3, v0, Lcom/discord/widgets/guilds/invite/WidgetGuildInviteShareViewModel;->storeUser:Lcom/discord/stores/StoreUser;
|
|
|
|
iput-object v4, v0, Lcom/discord/widgets/guilds/invite/WidgetGuildInviteShareViewModel;->inviteGenerator:Lcom/discord/widgets/guilds/invite/InviteGenerator;
|
|
|
|
iput-object v5, v0, Lcom/discord/widgets/guilds/invite/WidgetGuildInviteShareViewModel;->inviteSuggestionsService:Lcom/discord/widgets/guilds/invite/InviteSuggestionsService;
|
|
|
|
iput-object v6, v0, Lcom/discord/widgets/guilds/invite/WidgetGuildInviteShareViewModel;->resources:Landroid/content/res/Resources;
|
|
|
|
move/from16 v1, p7
|
|
|
|
iput-boolean v1, v0, Lcom/discord/widgets/guilds/invite/WidgetGuildInviteShareViewModel;->subscribeOnInit:Z
|
|
|
|
invoke-static {}, Ly/q/l;->emptyMap()Ljava/util/Map;
|
|
|
|
move-result-object v1
|
|
|
|
invoke-static {v1}, Lrx/subjects/BehaviorSubject;->a(Ljava/lang/Object;)Lrx/subjects/BehaviorSubject;
|
|
|
|
move-result-object v1
|
|
|
|
const-string v2, "BehaviorSubject.create(emptyMap())"
|
|
|
|
invoke-static {v1, v2}, Ly/u/b/j;->checkExpressionValueIsNotNull(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
iput-object v1, v0, Lcom/discord/widgets/guilds/invite/WidgetGuildInviteShareViewModel;->sentInvitesSubject:Lrx/subjects/BehaviorSubject;
|
|
|
|
const-string v1, ""
|
|
|
|
invoke-static {v1}, Lrx/subjects/BehaviorSubject;->a(Ljava/lang/Object;)Lrx/subjects/BehaviorSubject;
|
|
|
|
move-result-object v1
|
|
|
|
iput-object v1, v0, Lcom/discord/widgets/guilds/invite/WidgetGuildInviteShareViewModel;->filterPublisher:Lrx/subjects/BehaviorSubject;
|
|
|
|
invoke-static {v7}, Lrx/subjects/BehaviorSubject;->a(Ljava/lang/Object;)Lrx/subjects/BehaviorSubject;
|
|
|
|
move-result-object v1
|
|
|
|
const-string v2, "BehaviorSubject.create(null as ChannelId?)"
|
|
|
|
invoke-static {v1, v2}, Ly/u/b/j;->checkExpressionValueIsNotNull(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
iput-object v1, v0, Lcom/discord/widgets/guilds/invite/WidgetGuildInviteShareViewModel;->selectedChannelSubject:Lrx/subjects/BehaviorSubject;
|
|
|
|
sget-object v1, Lkotlin/Unit;->a:Lkotlin/Unit;
|
|
|
|
invoke-static {v1}, Lrx/subjects/BehaviorSubject;->a(Ljava/lang/Object;)Lrx/subjects/BehaviorSubject;
|
|
|
|
move-result-object v1
|
|
|
|
const-string v2, "BehaviorSubject.create(Unit)"
|
|
|
|
invoke-static {v1, v2}, Ly/u/b/j;->checkExpressionValueIsNotNull(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
iput-object v1, v0, Lcom/discord/widgets/guilds/invite/WidgetGuildInviteShareViewModel;->refreshUiSubject:Lrx/subjects/BehaviorSubject;
|
|
|
|
iget-boolean v1, v0, Lcom/discord/widgets/guilds/invite/WidgetGuildInviteShareViewModel;->subscribeOnInit:Z
|
|
|
|
if-eqz v1, :cond_0
|
|
|
|
invoke-virtual/range {p0 .. p0}, Lcom/discord/widgets/guilds/invite/WidgetGuildInviteShareViewModel;->observeViewStateFromStores$app_productionDiscordExternalRelease()Lrx/Observable;
|
|
|
|
move-result-object v1
|
|
|
|
new-instance v2, Lcom/discord/widgets/guilds/invite/WidgetGuildInviteShareViewModel$1;
|
|
|
|
invoke-direct {v2, v0}, Lcom/discord/widgets/guilds/invite/WidgetGuildInviteShareViewModel$1;-><init>(Lcom/discord/widgets/guilds/invite/WidgetGuildInviteShareViewModel;)V
|
|
|
|
invoke-virtual {v1, v2}, Lrx/Observable;->b(Lrx/functions/Action1;)Lrx/Observable;
|
|
|
|
move-result-object v1
|
|
|
|
const-string v2, "observeViewStateFromStor\u2026romViewState(viewState) }"
|
|
|
|
invoke-static {v1, v2}, Ly/u/b/j;->checkExpressionValueIsNotNull(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
invoke-static {v1}, Lcom/discord/utilities/rx/ObservableExtensionsKt;->computationBuffered(Lrx/Observable;)Lrx/Observable;
|
|
|
|
move-result-object v1
|
|
|
|
const/4 v2, 0x2
|
|
|
|
invoke-static {v1, v0, v7, v2, v7}, 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 v8
|
|
|
|
const-class v9, Lcom/discord/widgets/guilds/invite/WidgetGuildInviteShareViewModel;
|
|
|
|
const/4 v10, 0x0
|
|
|
|
const/4 v11, 0x0
|
|
|
|
const/4 v12, 0x0
|
|
|
|
const/4 v13, 0x0
|
|
|
|
new-instance v14, Lcom/discord/widgets/guilds/invite/WidgetGuildInviteShareViewModel$2;
|
|
|
|
invoke-direct {v14, v0}, Lcom/discord/widgets/guilds/invite/WidgetGuildInviteShareViewModel$2;-><init>(Lcom/discord/widgets/guilds/invite/WidgetGuildInviteShareViewModel;)V
|
|
|
|
const/16 v15, 0x1e
|
|
|
|
const/16 v16, 0x0
|
|
|
|
invoke-static/range {v8 .. v16}, 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_0
|
|
return-void
|
|
|
|
:cond_1
|
|
const-string v1, "resources"
|
|
|
|
invoke-static {v1}, Ly/u/b/j;->a(Ljava/lang/String;)V
|
|
|
|
throw v7
|
|
|
|
:cond_2
|
|
const-string v1, "inviteSuggestionsService"
|
|
|
|
invoke-static {v1}, Ly/u/b/j;->a(Ljava/lang/String;)V
|
|
|
|
throw v7
|
|
|
|
:cond_3
|
|
const-string v1, "inviteGenerator"
|
|
|
|
invoke-static {v1}, Ly/u/b/j;->a(Ljava/lang/String;)V
|
|
|
|
throw v7
|
|
|
|
:cond_4
|
|
const-string v1, "storeUser"
|
|
|
|
invoke-static {v1}, Ly/u/b/j;->a(Ljava/lang/String;)V
|
|
|
|
throw v7
|
|
|
|
:cond_5
|
|
const-string v1, "storeInviteSettings"
|
|
|
|
invoke-static {v1}, Ly/u/b/j;->a(Ljava/lang/String;)V
|
|
|
|
throw v7
|
|
|
|
:cond_6
|
|
const-string v1, "storeChannels"
|
|
|
|
invoke-static {v1}, Ly/u/b/j;->a(Ljava/lang/String;)V
|
|
|
|
throw v7
|
|
.end method
|
|
|
|
.method public static final synthetic access$generateInviteLinkFromViewState(Lcom/discord/widgets/guilds/invite/WidgetGuildInviteShareViewModel;Lcom/discord/widgets/guilds/invite/WidgetGuildInviteShareViewModel$ViewState$Loaded;)V
|
|
.locals 0
|
|
|
|
invoke-direct {p0, p1}, Lcom/discord/widgets/guilds/invite/WidgetGuildInviteShareViewModel;->generateInviteLinkFromViewState(Lcom/discord/widgets/guilds/invite/WidgetGuildInviteShareViewModel$ViewState$Loaded;)V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public static final synthetic access$getInviteLink$p(Lcom/discord/widgets/guilds/invite/WidgetGuildInviteShareViewModel;Lcom/discord/models/domain/ModelInvite;)Ljava/lang/String;
|
|
.locals 0
|
|
|
|
invoke-direct {p0, p1}, Lcom/discord/widgets/guilds/invite/WidgetGuildInviteShareViewModel;->getInviteLink(Lcom/discord/models/domain/ModelInvite;)Ljava/lang/String;
|
|
|
|
move-result-object p0
|
|
|
|
return-object p0
|
|
.end method
|
|
|
|
.method public static final synthetic access$updateViewState(Lcom/discord/widgets/guilds/invite/WidgetGuildInviteShareViewModel;Lcom/discord/widgets/guilds/invite/WidgetGuildInviteShareViewModel$ViewState;)V
|
|
.locals 0
|
|
|
|
invoke-virtual {p0, p1}, Lf/a/b/b0;->updateViewState(Ljava/lang/Object;)V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method private final generateInviteLinkFromViewState(Lcom/discord/widgets/guilds/invite/WidgetGuildInviteShareViewModel$ViewState$Loaded;)V
|
|
.locals 3
|
|
|
|
invoke-virtual {p1}, Lcom/discord/widgets/guilds/invite/WidgetGuildInviteShareViewModel$ViewState$Loaded;->getWidgetInviteModel()Lcom/discord/widgets/guilds/invite/WidgetInviteModel;
|
|
|
|
move-result-object p1
|
|
|
|
invoke-virtual {p1}, Lcom/discord/widgets/guilds/invite/WidgetInviteModel;->isValidInvite()Z
|
|
|
|
move-result v0
|
|
|
|
if-nez v0, :cond_0
|
|
|
|
invoke-virtual {p1}, Lcom/discord/widgets/guilds/invite/WidgetInviteModel;->isGeneratingInvite()Z
|
|
|
|
move-result v0
|
|
|
|
if-nez v0, :cond_0
|
|
|
|
invoke-virtual {p1}, Lcom/discord/widgets/guilds/invite/WidgetInviteModel;->getTargetChannel()Lcom/discord/models/domain/ModelChannel;
|
|
|
|
move-result-object v0
|
|
|
|
if-eqz v0, :cond_0
|
|
|
|
iget-object v0, p0, Lcom/discord/widgets/guilds/invite/WidgetGuildInviteShareViewModel;->inviteGenerator:Lcom/discord/widgets/guilds/invite/InviteGenerator;
|
|
|
|
invoke-virtual {p1}, Lcom/discord/widgets/guilds/invite/WidgetInviteModel;->getTargetChannel()Lcom/discord/models/domain/ModelChannel;
|
|
|
|
move-result-object p1
|
|
|
|
invoke-virtual {p1}, Lcom/discord/models/domain/ModelChannel;->getId()J
|
|
|
|
move-result-wide v1
|
|
|
|
invoke-virtual {v0, p0, v1, v2}, Lcom/discord/widgets/guilds/invite/InviteGenerator;->generateForAppComponent(Lcom/discord/app/AppComponent;J)V
|
|
|
|
:cond_0
|
|
return-void
|
|
.end method
|
|
|
|
.method private final getInviteLink(Lcom/discord/models/domain/ModelInvite;)Ljava/lang/String;
|
|
.locals 2
|
|
|
|
const-string v0, "https://discord.gg"
|
|
|
|
if-nez p1, :cond_0
|
|
|
|
goto :goto_0
|
|
|
|
:cond_0
|
|
iget-object v1, p0, Lcom/discord/widgets/guilds/invite/WidgetGuildInviteShareViewModel;->resources:Landroid/content/res/Resources;
|
|
|
|
invoke-virtual {p1, v1, v0}, Lcom/discord/models/domain/ModelInvite;->toLink(Landroid/content/res/Resources;Ljava/lang/String;)Ljava/lang/String;
|
|
|
|
move-result-object v0
|
|
|
|
:goto_0
|
|
return-object v0
|
|
.end method
|
|
|
|
.method private final observeWidgetInviteViewModel()Lrx/Observable;
|
|
.locals 8
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"()",
|
|
"Lrx/Observable<",
|
|
"Lcom/discord/widgets/guilds/invite/WidgetInviteModel;",
|
|
">;"
|
|
}
|
|
.end annotation
|
|
|
|
iget-object v0, p0, Lcom/discord/widgets/guilds/invite/WidgetGuildInviteShareViewModel;->storeInviteSettings:Lcom/discord/stores/StoreInviteSettings;
|
|
|
|
invoke-virtual {v0}, Lcom/discord/stores/StoreInviteSettings;->getInviteSettings()Lrx/Observable;
|
|
|
|
move-result-object v1
|
|
|
|
iget-object v0, p0, Lcom/discord/widgets/guilds/invite/WidgetGuildInviteShareViewModel;->storeInviteSettings:Lcom/discord/stores/StoreInviteSettings;
|
|
|
|
invoke-virtual {v0}, Lcom/discord/stores/StoreInviteSettings;->getInvitableChannels()Lrx/Observable;
|
|
|
|
move-result-object v2
|
|
|
|
iget-object v0, p0, Lcom/discord/widgets/guilds/invite/WidgetGuildInviteShareViewModel;->inviteGenerator:Lcom/discord/widgets/guilds/invite/InviteGenerator;
|
|
|
|
invoke-virtual {v0}, Lcom/discord/widgets/guilds/invite/InviteGenerator;->getGenerationState()Lrx/Observable;
|
|
|
|
move-result-object v3
|
|
|
|
iget-object v4, p0, Lcom/discord/widgets/guilds/invite/WidgetGuildInviteShareViewModel;->selectedChannelSubject:Lrx/subjects/BehaviorSubject;
|
|
|
|
iget-object v0, p0, Lcom/discord/widgets/guilds/invite/WidgetGuildInviteShareViewModel;->storeUser:Lcom/discord/stores/StoreUser;
|
|
|
|
invoke-virtual {v0}, Lcom/discord/stores/StoreUser;->observeMe()Lrx/Observable;
|
|
|
|
move-result-object v5
|
|
|
|
iget-object v0, p0, Lcom/discord/widgets/guilds/invite/WidgetGuildInviteShareViewModel;->storeChannels:Lcom/discord/stores/StoreChannels;
|
|
|
|
invoke-virtual {v0}, Lcom/discord/stores/StoreChannels;->getDMs()Lrx/Observable;
|
|
|
|
move-result-object v6
|
|
|
|
sget-object v7, Lcom/discord/widgets/guilds/invite/WidgetGuildInviteShareViewModel$observeWidgetInviteViewModel$1;->INSTANCE:Lcom/discord/widgets/guilds/invite/WidgetGuildInviteShareViewModel$observeWidgetInviteViewModel$1;
|
|
|
|
invoke-static/range {v1 .. v7}, Lrx/Observable;->a(Lrx/Observable;Lrx/Observable;Lrx/Observable;Lrx/Observable;Lrx/Observable;Lrx/Observable;Lrx/functions/Func6;)Lrx/Observable;
|
|
|
|
move-result-object v0
|
|
|
|
const-string v1, "Observable\n .comb\u2026dms\n )\n }"
|
|
|
|
invoke-static {v0, v1}, Ly/u/b/j;->checkExpressionValueIsNotNull(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
invoke-static {v0}, Lcom/discord/utilities/rx/ObservableExtensionsKt;->computationLatest(Lrx/Observable;)Lrx/Observable;
|
|
|
|
move-result-object v0
|
|
|
|
invoke-virtual {v0}, Lrx/Observable;->a()Lrx/Observable;
|
|
|
|
move-result-object v0
|
|
|
|
const-string v1, "Observable\n .comb\u2026 .distinctUntilChanged()"
|
|
|
|
invoke-static {v0, v1}, Ly/u/b/j;->checkExpressionValueIsNotNull(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
return-object v0
|
|
.end method
|
|
|
|
|
|
# virtual methods
|
|
.method public final generateInviteLink(J)V
|
|
.locals 1
|
|
|
|
iget-object v0, p0, Lcom/discord/widgets/guilds/invite/WidgetGuildInviteShareViewModel;->inviteGenerator:Lcom/discord/widgets/guilds/invite/InviteGenerator;
|
|
|
|
invoke-virtual {v0, p0, p1, p2}, Lcom/discord/widgets/guilds/invite/InviteGenerator;->generateForAppComponent(Lcom/discord/app/AppComponent;J)V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public final getInviteGenerator()Lcom/discord/widgets/guilds/invite/InviteGenerator;
|
|
.locals 1
|
|
|
|
iget-object v0, p0, Lcom/discord/widgets/guilds/invite/WidgetGuildInviteShareViewModel;->inviteGenerator:Lcom/discord/widgets/guilds/invite/InviteGenerator;
|
|
|
|
return-object v0
|
|
.end method
|
|
|
|
.method public final getInviteSuggestionsService()Lcom/discord/widgets/guilds/invite/InviteSuggestionsService;
|
|
.locals 1
|
|
|
|
iget-object v0, p0, Lcom/discord/widgets/guilds/invite/WidgetGuildInviteShareViewModel;->inviteSuggestionsService:Lcom/discord/widgets/guilds/invite/InviteSuggestionsService;
|
|
|
|
return-object v0
|
|
.end method
|
|
|
|
.method public final getResources()Landroid/content/res/Resources;
|
|
.locals 1
|
|
|
|
iget-object v0, p0, Lcom/discord/widgets/guilds/invite/WidgetGuildInviteShareViewModel;->resources:Landroid/content/res/Resources;
|
|
|
|
return-object v0
|
|
.end method
|
|
|
|
.method public final getStoreChannels()Lcom/discord/stores/StoreChannels;
|
|
.locals 1
|
|
|
|
iget-object v0, p0, Lcom/discord/widgets/guilds/invite/WidgetGuildInviteShareViewModel;->storeChannels:Lcom/discord/stores/StoreChannels;
|
|
|
|
return-object v0
|
|
.end method
|
|
|
|
.method public final getStoreInviteSettings()Lcom/discord/stores/StoreInviteSettings;
|
|
.locals 1
|
|
|
|
iget-object v0, p0, Lcom/discord/widgets/guilds/invite/WidgetGuildInviteShareViewModel;->storeInviteSettings:Lcom/discord/stores/StoreInviteSettings;
|
|
|
|
return-object v0
|
|
.end method
|
|
|
|
.method public final getStoreUser()Lcom/discord/stores/StoreUser;
|
|
.locals 1
|
|
|
|
iget-object v0, p0, Lcom/discord/widgets/guilds/invite/WidgetGuildInviteShareViewModel;->storeUser:Lcom/discord/stores/StoreUser;
|
|
|
|
return-object v0
|
|
.end method
|
|
|
|
.method public final getSubscribeOnInit()Z
|
|
.locals 1
|
|
|
|
iget-boolean v0, p0, Lcom/discord/widgets/guilds/invite/WidgetGuildInviteShareViewModel;->subscribeOnInit:Z
|
|
|
|
return v0
|
|
.end method
|
|
|
|
.method public final observeViewStateFromStores$app_productionDiscordExternalRelease()Lrx/Observable;
|
|
.locals 6
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"()",
|
|
"Lrx/Observable<",
|
|
"Lcom/discord/widgets/guilds/invite/WidgetGuildInviteShareViewModel$ViewState$Loaded;",
|
|
">;"
|
|
}
|
|
.end annotation
|
|
|
|
invoke-direct {p0}, Lcom/discord/widgets/guilds/invite/WidgetGuildInviteShareViewModel;->observeWidgetInviteViewModel()Lrx/Observable;
|
|
|
|
move-result-object v0
|
|
|
|
iget-object v1, p0, Lcom/discord/widgets/guilds/invite/WidgetGuildInviteShareViewModel;->inviteSuggestionsService:Lcom/discord/widgets/guilds/invite/InviteSuggestionsService;
|
|
|
|
invoke-virtual {v1}, Lcom/discord/widgets/guilds/invite/InviteSuggestionsService;->observeInviteSuggestions()Lrx/Observable;
|
|
|
|
move-result-object v1
|
|
|
|
iget-object v2, p0, Lcom/discord/widgets/guilds/invite/WidgetGuildInviteShareViewModel;->filterPublisher:Lrx/subjects/BehaviorSubject;
|
|
|
|
iget-object v3, p0, Lcom/discord/widgets/guilds/invite/WidgetGuildInviteShareViewModel;->sentInvitesSubject:Lrx/subjects/BehaviorSubject;
|
|
|
|
iget-object v4, p0, Lcom/discord/widgets/guilds/invite/WidgetGuildInviteShareViewModel;->refreshUiSubject:Lrx/subjects/BehaviorSubject;
|
|
|
|
new-instance v5, Lcom/discord/widgets/guilds/invite/WidgetGuildInviteShareViewModel$observeViewStateFromStores$1;
|
|
|
|
invoke-direct {v5, p0}, Lcom/discord/widgets/guilds/invite/WidgetGuildInviteShareViewModel$observeViewStateFromStores$1;-><init>(Lcom/discord/widgets/guilds/invite/WidgetGuildInviteShareViewModel;)V
|
|
|
|
invoke-static/range {v0 .. v5}, Lrx/Observable;->a(Lrx/Observable;Lrx/Observable;Lrx/Observable;Lrx/Observable;Lrx/Observable;Lrx/functions/Func5;)Lrx/Observable;
|
|
|
|
move-result-object v0
|
|
|
|
const-string v1, "Observable.combineLatest\u2026sentInvites\n )\n }"
|
|
|
|
invoke-static {v0, v1}, Ly/u/b/j;->checkExpressionValueIsNotNull(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
return-object v0
|
|
.end method
|
|
|
|
.method public final refreshUi()V
|
|
.locals 2
|
|
|
|
iget-object v0, p0, Lcom/discord/widgets/guilds/invite/WidgetGuildInviteShareViewModel;->refreshUiSubject:Lrx/subjects/BehaviorSubject;
|
|
|
|
sget-object v1, Lkotlin/Unit;->a:Lkotlin/Unit;
|
|
|
|
invoke-virtual {v0, v1}, Lrx/subjects/BehaviorSubject;->onNext(Ljava/lang/Object;)V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public final selectChannel(J)V
|
|
.locals 1
|
|
|
|
iget-object v0, p0, Lcom/discord/widgets/guilds/invite/WidgetGuildInviteShareViewModel;->selectedChannelSubject:Lrx/subjects/BehaviorSubject;
|
|
|
|
invoke-static {p1, p2}, Ljava/lang/Long;->valueOf(J)Ljava/lang/Long;
|
|
|
|
move-result-object p1
|
|
|
|
invoke-virtual {v0, p1}, Lrx/subjects/BehaviorSubject;->onNext(Ljava/lang/Object;)V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public final sendInviteToChannel(JLcom/discord/widgets/guilds/invite/WidgetGuildInviteShareViewModel$ViewState$Loaded;Lcom/discord/models/domain/ModelInvite;)V
|
|
.locals 18
|
|
|
|
move-object/from16 v0, p0
|
|
|
|
move-object/from16 v1, p3
|
|
|
|
move-object/from16 v2, p4
|
|
|
|
const/4 v3, 0x0
|
|
|
|
if-eqz v1, :cond_0
|
|
|
|
invoke-direct {v0, v2}, Lcom/discord/widgets/guilds/invite/WidgetGuildInviteShareViewModel;->getInviteLink(Lcom/discord/models/domain/ModelInvite;)Ljava/lang/String;
|
|
|
|
move-result-object v15
|
|
|
|
sget-object v4, Lcom/discord/stores/StoreStream;->Companion:Lcom/discord/stores/StoreStream$Companion;
|
|
|
|
invoke-virtual {v4}, Lcom/discord/stores/StoreStream$Companion;->getMessages()Lcom/discord/stores/StoreMessages;
|
|
|
|
move-result-object v4
|
|
|
|
invoke-virtual/range {p3 .. p3}, Lcom/discord/widgets/guilds/invite/WidgetGuildInviteShareViewModel$ViewState$Loaded;->getWidgetInviteModel()Lcom/discord/widgets/guilds/invite/WidgetInviteModel;
|
|
|
|
move-result-object v5
|
|
|
|
invoke-virtual {v5}, Lcom/discord/widgets/guilds/invite/WidgetInviteModel;->getMe()Lcom/discord/models/domain/ModelUser;
|
|
|
|
move-result-object v7
|
|
|
|
const-string v5, "inviteLink"
|
|
|
|
invoke-static {v15, v5}, Ly/u/b/j;->checkExpressionValueIsNotNull(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
const/4 v9, 0x0
|
|
|
|
const/4 v10, 0x0
|
|
|
|
const/4 v11, 0x0
|
|
|
|
const/4 v12, 0x0
|
|
|
|
const/4 v13, 0x0
|
|
|
|
const/16 v14, 0xe0
|
|
|
|
const/16 v16, 0x0
|
|
|
|
move-wide/from16 v5, p1
|
|
|
|
move-object v8, v15
|
|
|
|
move-object/from16 v17, v15
|
|
|
|
move-object/from16 v15, v16
|
|
|
|
invoke-static/range {v4 .. v15}, Lcom/discord/stores/StoreMessages;->sendMessage$default(Lcom/discord/stores/StoreMessages;JLcom/discord/models/domain/ModelUser;Ljava/lang/String;Ljava/util/List;Ljava/util/List;Lcom/discord/models/domain/ModelApplication;Lcom/discord/models/domain/activity/ModelActivity;Lcom/discord/models/domain/ModelMessage$Activity;ILjava/lang/Object;)Lrx/Observable;
|
|
|
|
move-result-object v4
|
|
|
|
const/4 v5, 0x0
|
|
|
|
const/4 v6, 0x1
|
|
|
|
invoke-static {v4, v5, v6, v3}, Lcom/discord/utilities/rx/ObservableExtensionsKt;->restSubscribeOn$default(Lrx/Observable;ZILjava/lang/Object;)Lrx/Observable;
|
|
|
|
move-result-object v4
|
|
|
|
const/4 v5, 0x2
|
|
|
|
invoke-static {v4, v0, v3, v5, v3}, 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 v6
|
|
|
|
const-class v7, Lcom/discord/widgets/guilds/invite/WidgetGuildInviteShareViewModel;
|
|
|
|
const/4 v8, 0x0
|
|
|
|
new-instance v12, Lcom/discord/widgets/guilds/invite/WidgetGuildInviteShareViewModel$sendInviteToChannel$1;
|
|
|
|
move-object/from16 v3, v17
|
|
|
|
invoke-direct {v12, v0, v2, v1, v3}, Lcom/discord/widgets/guilds/invite/WidgetGuildInviteShareViewModel$sendInviteToChannel$1;-><init>(Lcom/discord/widgets/guilds/invite/WidgetGuildInviteShareViewModel;Lcom/discord/models/domain/ModelInvite;Lcom/discord/widgets/guilds/invite/WidgetGuildInviteShareViewModel$ViewState$Loaded;Ljava/lang/String;)V
|
|
|
|
const/16 v13, 0x1e
|
|
|
|
const/4 v14, 0x0
|
|
|
|
invoke-static/range {v6 .. v14}, 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 v1, "viewState"
|
|
|
|
invoke-static {v1}, Ly/u/b/j;->a(Ljava/lang/String;)V
|
|
|
|
throw v3
|
|
.end method
|
|
|
|
.method public final sendInviteToUser(JLcom/discord/widgets/guilds/invite/WidgetGuildInviteShareViewModel$ViewState$Loaded;Lcom/discord/models/domain/ModelInvite;)V
|
|
.locals 10
|
|
|
|
const/4 v0, 0x0
|
|
|
|
if-eqz p3, :cond_0
|
|
|
|
sget-object v1, Lcom/discord/stores/StoreStream;->Companion:Lcom/discord/stores/StoreStream$Companion;
|
|
|
|
invoke-virtual {v1}, Lcom/discord/stores/StoreStream$Companion;->getChannels()Lcom/discord/stores/StoreChannels;
|
|
|
|
move-result-object v1
|
|
|
|
invoke-virtual {v1, p1, p2}, Lcom/discord/stores/StoreChannels;->createPrivateChannel(J)Lrx/Observable;
|
|
|
|
move-result-object p1
|
|
|
|
const/4 p2, 0x0
|
|
|
|
const/4 v1, 0x1
|
|
|
|
invoke-static {p1, p2, v1, v0}, Lcom/discord/utilities/rx/ObservableExtensionsKt;->restSubscribeOn$default(Lrx/Observable;ZILjava/lang/Object;)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/guilds/invite/WidgetGuildInviteShareViewModel;
|
|
|
|
const/4 v3, 0x0
|
|
|
|
const/4 v4, 0x0
|
|
|
|
const/4 v5, 0x0
|
|
|
|
const/4 v6, 0x0
|
|
|
|
new-instance v7, Lcom/discord/widgets/guilds/invite/WidgetGuildInviteShareViewModel$sendInviteToUser$1;
|
|
|
|
invoke-direct {v7, p0, p3, p4}, Lcom/discord/widgets/guilds/invite/WidgetGuildInviteShareViewModel$sendInviteToUser$1;-><init>(Lcom/discord/widgets/guilds/invite/WidgetGuildInviteShareViewModel;Lcom/discord/widgets/guilds/invite/WidgetGuildInviteShareViewModel$ViewState$Loaded;Lcom/discord/models/domain/ModelInvite;)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, "viewState"
|
|
|
|
invoke-static {p1}, Ly/u/b/j;->a(Ljava/lang/String;)V
|
|
|
|
throw v0
|
|
.end method
|
|
|
|
.method public final updateInviteSettings(Lcom/discord/models/domain/ModelInvite$Settings;)V
|
|
.locals 1
|
|
|
|
if-eqz p1, :cond_0
|
|
|
|
iget-object v0, p0, Lcom/discord/widgets/guilds/invite/WidgetGuildInviteShareViewModel;->storeInviteSettings:Lcom/discord/stores/StoreInviteSettings;
|
|
|
|
invoke-virtual {v0, p1}, Lcom/discord/stores/StoreInviteSettings;->setInviteSettings(Lcom/discord/models/domain/ModelInvite$Settings;)V
|
|
|
|
return-void
|
|
|
|
:cond_0
|
|
const-string p1, "settings"
|
|
|
|
invoke-static {p1}, Ly/u/b/j;->a(Ljava/lang/String;)V
|
|
|
|
const/4 p1, 0x0
|
|
|
|
throw p1
|
|
.end method
|
|
|
|
.method public final updateSearchQuery(Ljava/lang/String;)V
|
|
.locals 1
|
|
|
|
if-eqz p1, :cond_0
|
|
|
|
iget-object v0, p0, Lcom/discord/widgets/guilds/invite/WidgetGuildInviteShareViewModel;->filterPublisher:Lrx/subjects/BehaviorSubject;
|
|
|
|
invoke-virtual {v0, p1}, Lrx/subjects/BehaviorSubject;->onNext(Ljava/lang/Object;)V
|
|
|
|
return-void
|
|
|
|
:cond_0
|
|
const-string p1, "searchQuery"
|
|
|
|
invoke-static {p1}, Ly/u/b/j;->a(Ljava/lang/String;)V
|
|
|
|
const/4 p1, 0x0
|
|
|
|
throw p1
|
|
.end method
|
|
|
|
.method public final updateSentInvites(Ljava/util/Map;)V
|
|
.locals 1
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"(",
|
|
"Ljava/util/Map<",
|
|
"Ljava/lang/String;",
|
|
"+",
|
|
"Ljava/util/Set<",
|
|
"Ljava/lang/Long;",
|
|
">;>;)V"
|
|
}
|
|
.end annotation
|
|
|
|
if-eqz p1, :cond_0
|
|
|
|
iget-object v0, p0, Lcom/discord/widgets/guilds/invite/WidgetGuildInviteShareViewModel;->sentInvitesSubject:Lrx/subjects/BehaviorSubject;
|
|
|
|
invoke-virtual {v0, p1}, Lrx/subjects/BehaviorSubject;->onNext(Ljava/lang/Object;)V
|
|
|
|
return-void
|
|
|
|
:cond_0
|
|
const-string p1, "sentInvites"
|
|
|
|
invoke-static {p1}, Ly/u/b/j;->a(Ljava/lang/String;)V
|
|
|
|
const/4 p1, 0x0
|
|
|
|
throw p1
|
|
.end method
|