418 lines
13 KiB
Smali
418 lines
13 KiB
Smali
.class public final Lcom/discord/widgets/spectate/StreamFeedbackSheetViewModel;
|
|
.super Le/a/b/c0;
|
|
.source "StreamFeedbackSheetViewModel.kt"
|
|
|
|
# interfaces
|
|
.implements Lcom/discord/widgets/feedback/FeedbackSheetViewModel;
|
|
|
|
|
|
# annotations
|
|
.annotation system Ldalvik/annotation/MemberClasses;
|
|
value = {
|
|
Lcom/discord/widgets/spectate/StreamFeedbackSheetViewModel$Factory;,
|
|
Lcom/discord/widgets/spectate/StreamFeedbackSheetViewModel$Companion;
|
|
}
|
|
.end annotation
|
|
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"Le/a/b/c0<",
|
|
"Lcom/discord/widgets/feedback/FeedbackSheetViewModel$ViewState;",
|
|
">;",
|
|
"Lcom/discord/widgets/feedback/FeedbackSheetViewModel;"
|
|
}
|
|
.end annotation
|
|
|
|
|
|
# static fields
|
|
.field public static final Companion:Lcom/discord/widgets/spectate/StreamFeedbackSheetViewModel$Companion;
|
|
|
|
.field public static final ISSUES_UI_OPTIONS:Ljava/util/List;
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"Ljava/util/List<",
|
|
"Lcom/discord/widgets/voice/feedback/FeedbackIssue;",
|
|
">;"
|
|
}
|
|
.end annotation
|
|
.end field
|
|
|
|
|
|
# instance fields
|
|
.field public final eventSubject:Lrx/subjects/PublishSubject;
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"Lrx/subjects/PublishSubject<",
|
|
"Lcom/discord/widgets/feedback/FeedbackSheetViewModel$Event;",
|
|
">;"
|
|
}
|
|
.end annotation
|
|
.end field
|
|
|
|
.field public final mediaSessionId:Ljava/lang/String;
|
|
|
|
.field public selectedFeedbackIssue:Lcom/discord/widgets/voice/feedback/FeedbackIssue;
|
|
|
|
.field public final storeAnalytics:Lcom/discord/stores/StoreAnalytics;
|
|
|
|
.field public final streamKey:Ljava/lang/String;
|
|
|
|
.field public submitted:Z
|
|
|
|
|
|
# direct methods
|
|
.method public static constructor <clinit>()V
|
|
.locals 3
|
|
|
|
new-instance v0, Lcom/discord/widgets/spectate/StreamFeedbackSheetViewModel$Companion;
|
|
|
|
const/4 v1, 0x0
|
|
|
|
invoke-direct {v0, v1}, Lcom/discord/widgets/spectate/StreamFeedbackSheetViewModel$Companion;-><init>(Lkotlin/jvm/internal/DefaultConstructorMarker;)V
|
|
|
|
sput-object v0, Lcom/discord/widgets/spectate/StreamFeedbackSheetViewModel;->Companion:Lcom/discord/widgets/spectate/StreamFeedbackSheetViewModel$Companion;
|
|
|
|
const/4 v0, 0x6
|
|
|
|
new-array v0, v0, [Lcom/discord/widgets/voice/feedback/FeedbackIssue;
|
|
|
|
sget-object v1, Lcom/discord/widgets/voice/feedback/FeedbackIssue;->STREAM_REPORT_ENDED_BLACK:Lcom/discord/widgets/voice/feedback/FeedbackIssue;
|
|
|
|
const/4 v2, 0x0
|
|
|
|
aput-object v1, v0, v2
|
|
|
|
sget-object v1, Lcom/discord/widgets/voice/feedback/FeedbackIssue;->STREAM_REPORT_ENDED_BLURRY:Lcom/discord/widgets/voice/feedback/FeedbackIssue;
|
|
|
|
const/4 v2, 0x1
|
|
|
|
aput-object v1, v0, v2
|
|
|
|
sget-object v1, Lcom/discord/widgets/voice/feedback/FeedbackIssue;->STREAM_REPORT_ENDED_LAGGING:Lcom/discord/widgets/voice/feedback/FeedbackIssue;
|
|
|
|
const/4 v2, 0x2
|
|
|
|
aput-object v1, v0, v2
|
|
|
|
sget-object v1, Lcom/discord/widgets/voice/feedback/FeedbackIssue;->STREAM_REPORT_ENDED_OUT_OF_SYNC:Lcom/discord/widgets/voice/feedback/FeedbackIssue;
|
|
|
|
const/4 v2, 0x3
|
|
|
|
aput-object v1, v0, v2
|
|
|
|
sget-object v1, Lcom/discord/widgets/voice/feedback/FeedbackIssue;->STREAM_REPORT_ENDED_AUDIO_MISSING:Lcom/discord/widgets/voice/feedback/FeedbackIssue;
|
|
|
|
const/4 v2, 0x4
|
|
|
|
aput-object v1, v0, v2
|
|
|
|
sget-object v1, Lcom/discord/widgets/voice/feedback/FeedbackIssue;->STREAM_REPORT_ENDED_AUDIO_POOR:Lcom/discord/widgets/voice/feedback/FeedbackIssue;
|
|
|
|
const/4 v2, 0x5
|
|
|
|
aput-object v1, v0, v2
|
|
|
|
invoke-static {v0}, Le/k/a/b/e/p/g;->listOf([Ljava/lang/Object;)Ljava/util/List;
|
|
|
|
move-result-object v0
|
|
|
|
sput-object v0, Lcom/discord/widgets/spectate/StreamFeedbackSheetViewModel;->ISSUES_UI_OPTIONS:Ljava/util/List;
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public constructor <init>(Lcom/discord/stores/StoreAnalytics;Ljava/lang/String;Ljava/lang/String;)V
|
|
.locals 7
|
|
|
|
const/4 v0, 0x0
|
|
|
|
if-eqz p1, :cond_1
|
|
|
|
if-eqz p2, :cond_0
|
|
|
|
new-instance v0, Lcom/discord/widgets/feedback/FeedbackSheetViewModel$ViewState;
|
|
|
|
sget-object v2, Lcom/discord/widgets/voice/feedback/FeedbackRating;->NO_RESPONSE:Lcom/discord/widgets/voice/feedback/FeedbackRating;
|
|
|
|
sget-object v3, Lt/q/o;->d:Lt/q/o;
|
|
|
|
const v4, 0x7f1211c9
|
|
|
|
const v5, 0x7f1211de
|
|
|
|
const v6, 0x7f1211d9
|
|
|
|
move-object v1, v0
|
|
|
|
invoke-direct/range {v1 .. v6}, Lcom/discord/widgets/feedback/FeedbackSheetViewModel$ViewState;-><init>(Lcom/discord/widgets/voice/feedback/FeedbackRating;Ljava/util/List;III)V
|
|
|
|
invoke-direct {p0, v0}, Le/a/b/c0;-><init>(Ljava/lang/Object;)V
|
|
|
|
iput-object p1, p0, Lcom/discord/widgets/spectate/StreamFeedbackSheetViewModel;->storeAnalytics:Lcom/discord/stores/StoreAnalytics;
|
|
|
|
iput-object p2, p0, Lcom/discord/widgets/spectate/StreamFeedbackSheetViewModel;->streamKey:Ljava/lang/String;
|
|
|
|
iput-object p3, p0, Lcom/discord/widgets/spectate/StreamFeedbackSheetViewModel;->mediaSessionId:Ljava/lang/String;
|
|
|
|
invoke-static {}, Lrx/subjects/PublishSubject;->o()Lrx/subjects/PublishSubject;
|
|
|
|
move-result-object p1
|
|
|
|
iput-object p1, p0, Lcom/discord/widgets/spectate/StreamFeedbackSheetViewModel;->eventSubject:Lrx/subjects/PublishSubject;
|
|
|
|
return-void
|
|
|
|
:cond_0
|
|
const-string p1, "streamKey"
|
|
|
|
invoke-static {p1}, Lt/u/b/j;->a(Ljava/lang/String;)V
|
|
|
|
throw v0
|
|
|
|
:cond_1
|
|
const-string p1, "storeAnalytics"
|
|
|
|
invoke-static {p1}, Lt/u/b/j;->a(Ljava/lang/String;)V
|
|
|
|
throw v0
|
|
.end method
|
|
|
|
.method public static final synthetic access$getISSUES_UI_OPTIONS$cp()Ljava/util/List;
|
|
.locals 1
|
|
|
|
sget-object v0, Lcom/discord/widgets/spectate/StreamFeedbackSheetViewModel;->ISSUES_UI_OPTIONS:Ljava/util/List;
|
|
|
|
return-object v0
|
|
.end method
|
|
|
|
.method private final createViewState(Lcom/discord/widgets/voice/feedback/FeedbackRating;Ljava/util/List;)Lcom/discord/widgets/feedback/FeedbackSheetViewModel$ViewState;
|
|
.locals 7
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"(",
|
|
"Lcom/discord/widgets/voice/feedback/FeedbackRating;",
|
|
"Ljava/util/List<",
|
|
"+",
|
|
"Lcom/discord/widgets/voice/feedback/FeedbackIssue;",
|
|
">;)",
|
|
"Lcom/discord/widgets/feedback/FeedbackSheetViewModel$ViewState;"
|
|
}
|
|
.end annotation
|
|
|
|
new-instance v6, Lcom/discord/widgets/feedback/FeedbackSheetViewModel$ViewState;
|
|
|
|
const v3, 0x7f1211c9
|
|
|
|
const v4, 0x7f1211de
|
|
|
|
const v5, 0x7f1211d9
|
|
|
|
move-object v0, v6
|
|
|
|
move-object v1, p1
|
|
|
|
move-object v2, p2
|
|
|
|
invoke-direct/range {v0 .. v5}, Lcom/discord/widgets/feedback/FeedbackSheetViewModel$ViewState;-><init>(Lcom/discord/widgets/voice/feedback/FeedbackRating;Ljava/util/List;III)V
|
|
|
|
return-object v6
|
|
.end method
|
|
|
|
.method private final emitSubmittedEvent(Z)V
|
|
.locals 2
|
|
|
|
iget-object v0, p0, Lcom/discord/widgets/spectate/StreamFeedbackSheetViewModel;->eventSubject:Lrx/subjects/PublishSubject;
|
|
|
|
new-instance v1, Lcom/discord/widgets/feedback/FeedbackSheetViewModel$Event$Submitted;
|
|
|
|
invoke-direct {v1, p1}, Lcom/discord/widgets/feedback/FeedbackSheetViewModel$Event$Submitted;-><init>(Z)V
|
|
|
|
invoke-virtual {v0, v1}, Lrx/subjects/PublishSubject;->onNext(Ljava/lang/Object;)V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
|
|
# virtual methods
|
|
.method public observeEvents()Lrx/Observable;
|
|
.locals 2
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"()",
|
|
"Lrx/Observable<",
|
|
"Lcom/discord/widgets/feedback/FeedbackSheetViewModel$Event;",
|
|
">;"
|
|
}
|
|
.end annotation
|
|
|
|
iget-object v0, p0, Lcom/discord/widgets/spectate/StreamFeedbackSheetViewModel;->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 selectIssue(Lcom/discord/widgets/voice/feedback/FeedbackIssue;Ljava/lang/String;)V
|
|
.locals 0
|
|
|
|
iput-object p1, p0, Lcom/discord/widgets/spectate/StreamFeedbackSheetViewModel;->selectedFeedbackIssue:Lcom/discord/widgets/voice/feedback/FeedbackIssue;
|
|
|
|
invoke-virtual {p0}, Le/a/b/c0;->getViewState()Ljava/lang/Object;
|
|
|
|
move-result-object p1
|
|
|
|
check-cast p1, Lcom/discord/widgets/feedback/FeedbackSheetViewModel$ViewState;
|
|
|
|
invoke-virtual {p1}, Lcom/discord/widgets/feedback/FeedbackSheetViewModel$ViewState;->getSelectedFeedbackRating()Lcom/discord/widgets/voice/feedback/FeedbackRating;
|
|
|
|
move-result-object p1
|
|
|
|
sget-object p2, Lcom/discord/widgets/spectate/StreamFeedbackSheetViewModel$WhenMappings;->$EnumSwitchMapping$1:[I
|
|
|
|
invoke-virtual {p1}, Ljava/lang/Enum;->ordinal()I
|
|
|
|
move-result p1
|
|
|
|
aget p1, p2, p1
|
|
|
|
const/4 p2, 0x1
|
|
|
|
if-eq p1, p2, :cond_0
|
|
|
|
const/4 p2, 0x2
|
|
|
|
if-eq p1, p2, :cond_0
|
|
|
|
goto :goto_0
|
|
|
|
:cond_0
|
|
invoke-virtual {p0}, Lcom/discord/widgets/spectate/StreamFeedbackSheetViewModel;->submitForm()V
|
|
|
|
:goto_0
|
|
return-void
|
|
.end method
|
|
|
|
.method public selectRating(Lcom/discord/widgets/voice/feedback/FeedbackRating;)V
|
|
.locals 3
|
|
|
|
const/4 v0, 0x0
|
|
|
|
if-eqz p1, :cond_2
|
|
|
|
sget-object v1, Lcom/discord/widgets/spectate/StreamFeedbackSheetViewModel$WhenMappings;->$EnumSwitchMapping$0:[I
|
|
|
|
invoke-virtual {p1}, Ljava/lang/Enum;->ordinal()I
|
|
|
|
move-result v2
|
|
|
|
aget v1, v1, v2
|
|
|
|
const/4 v2, 0x1
|
|
|
|
if-eq v1, v2, :cond_1
|
|
|
|
const/4 v2, 0x2
|
|
|
|
if-eq v1, v2, :cond_1
|
|
|
|
const/4 v0, 0x3
|
|
|
|
if-eq v1, v0, :cond_0
|
|
|
|
const/4 v0, 0x4
|
|
|
|
if-eq v1, v0, :cond_0
|
|
|
|
goto :goto_0
|
|
|
|
:cond_0
|
|
sget-object v0, Lcom/discord/widgets/spectate/StreamFeedbackSheetViewModel;->ISSUES_UI_OPTIONS:Ljava/util/List;
|
|
|
|
invoke-direct {p0, p1, v0}, Lcom/discord/widgets/spectate/StreamFeedbackSheetViewModel;->createViewState(Lcom/discord/widgets/voice/feedback/FeedbackRating;Ljava/util/List;)Lcom/discord/widgets/feedback/FeedbackSheetViewModel$ViewState;
|
|
|
|
move-result-object p1
|
|
|
|
invoke-virtual {p0, p1}, Le/a/b/c0;->updateViewState(Ljava/lang/Object;)V
|
|
|
|
goto :goto_0
|
|
|
|
:cond_1
|
|
invoke-virtual {p0, v0, v0}, Lcom/discord/widgets/spectate/StreamFeedbackSheetViewModel;->selectIssue(Lcom/discord/widgets/voice/feedback/FeedbackIssue;Ljava/lang/String;)V
|
|
|
|
sget-object v0, Lt/q/o;->d:Lt/q/o;
|
|
|
|
invoke-direct {p0, p1, v0}, Lcom/discord/widgets/spectate/StreamFeedbackSheetViewModel;->createViewState(Lcom/discord/widgets/voice/feedback/FeedbackRating;Ljava/util/List;)Lcom/discord/widgets/feedback/FeedbackSheetViewModel$ViewState;
|
|
|
|
move-result-object p1
|
|
|
|
invoke-virtual {p0, p1}, Le/a/b/c0;->updateViewState(Ljava/lang/Object;)V
|
|
|
|
invoke-virtual {p0}, Lcom/discord/widgets/spectate/StreamFeedbackSheetViewModel;->submitForm()V
|
|
|
|
:goto_0
|
|
return-void
|
|
|
|
:cond_2
|
|
const-string p1, "feedbackRating"
|
|
|
|
invoke-static {p1}, Lt/u/b/j;->a(Ljava/lang/String;)V
|
|
|
|
throw v0
|
|
.end method
|
|
|
|
.method public submitForm()V
|
|
.locals 6
|
|
|
|
iget-boolean v0, p0, Lcom/discord/widgets/spectate/StreamFeedbackSheetViewModel;->submitted:Z
|
|
|
|
if-eqz v0, :cond_0
|
|
|
|
return-void
|
|
|
|
:cond_0
|
|
const/4 v0, 0x1
|
|
|
|
iput-boolean v0, p0, Lcom/discord/widgets/spectate/StreamFeedbackSheetViewModel;->submitted:Z
|
|
|
|
sget-object v1, Lcom/discord/models/domain/ModelApplicationStream;->Companion:Lcom/discord/models/domain/ModelApplicationStream$Companion;
|
|
|
|
iget-object v2, p0, Lcom/discord/widgets/spectate/StreamFeedbackSheetViewModel;->streamKey:Ljava/lang/String;
|
|
|
|
invoke-virtual {v1, v2}, Lcom/discord/models/domain/ModelApplicationStream$Companion;->decodeStreamKey(Ljava/lang/String;)Lcom/discord/models/domain/ModelApplicationStream;
|
|
|
|
move-result-object v1
|
|
|
|
invoke-virtual {p0}, Le/a/b/c0;->getViewState()Ljava/lang/Object;
|
|
|
|
move-result-object v2
|
|
|
|
check-cast v2, Lcom/discord/widgets/feedback/FeedbackSheetViewModel$ViewState;
|
|
|
|
invoke-virtual {v2}, Lcom/discord/widgets/feedback/FeedbackSheetViewModel$ViewState;->getSelectedFeedbackRating()Lcom/discord/widgets/voice/feedback/FeedbackRating;
|
|
|
|
move-result-object v2
|
|
|
|
iget-object v3, p0, Lcom/discord/widgets/spectate/StreamFeedbackSheetViewModel;->storeAnalytics:Lcom/discord/stores/StoreAnalytics;
|
|
|
|
iget-object v4, p0, Lcom/discord/widgets/spectate/StreamFeedbackSheetViewModel;->selectedFeedbackIssue:Lcom/discord/widgets/voice/feedback/FeedbackIssue;
|
|
|
|
iget-object v5, p0, Lcom/discord/widgets/spectate/StreamFeedbackSheetViewModel;->mediaSessionId:Ljava/lang/String;
|
|
|
|
invoke-virtual {v3, v1, v2, v4, v5}, Lcom/discord/stores/StoreAnalytics;->reportStreamProblem(Lcom/discord/models/domain/ModelApplicationStream;Lcom/discord/widgets/voice/feedback/FeedbackRating;Lcom/discord/widgets/voice/feedback/FeedbackIssue;Ljava/lang/String;)V
|
|
|
|
sget-object v1, Lcom/discord/widgets/voice/feedback/FeedbackRating;->NO_RESPONSE:Lcom/discord/widgets/voice/feedback/FeedbackRating;
|
|
|
|
if-eq v2, v1, :cond_1
|
|
|
|
goto :goto_0
|
|
|
|
:cond_1
|
|
const/4 v0, 0x0
|
|
|
|
:goto_0
|
|
invoke-direct {p0, v0}, Lcom/discord/widgets/spectate/StreamFeedbackSheetViewModel;->emitSubmittedEvent(Z)V
|
|
|
|
return-void
|
|
.end method
|