2021-06-27 20:44:35 +00:00
|
|
|
package com.discord.widgets.feedback;
|
|
|
|
|
|
|
|
import androidx.annotation.StringRes;
|
|
|
|
import c.d.b.a.a;
|
|
|
|
import com.discord.widgets.voice.feedback.FeedbackIssue;
|
|
|
|
import com.discord.widgets.voice.feedback.FeedbackRating;
|
|
|
|
import com.discord.widgets.voice.feedback.PendingFeedback;
|
|
|
|
import d0.z.d.m;
|
|
|
|
import java.util.List;
|
|
|
|
import kotlin.jvm.internal.DefaultConstructorMarker;
|
|
|
|
import rx.Observable;
|
|
|
|
/* compiled from: FeedbackSheetViewModel.kt */
|
|
|
|
public interface FeedbackSheetViewModel {
|
|
|
|
|
|
|
|
/* compiled from: FeedbackSheetViewModel.kt */
|
|
|
|
public static final class DefaultImpls {
|
|
|
|
public static void selectRating(FeedbackSheetViewModel feedbackSheetViewModel, FeedbackRating feedbackRating) {
|
|
|
|
m.checkNotNullParameter(feedbackRating, "feedbackRating");
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
/* compiled from: FeedbackSheetViewModel.kt */
|
|
|
|
public static abstract class Event {
|
|
|
|
|
|
|
|
/* compiled from: FeedbackSheetViewModel.kt */
|
|
|
|
public static final class NavigateToIssueDetails extends Event {
|
|
|
|
private final PendingFeedback pendingFeedback;
|
|
|
|
private final boolean showCxLinkForIssueDetails;
|
|
|
|
|
|
|
|
/* JADX INFO: super call moved to the top of the method (can break code semantics) */
|
|
|
|
public NavigateToIssueDetails(PendingFeedback pendingFeedback, boolean z2) {
|
|
|
|
super(null);
|
|
|
|
m.checkNotNullParameter(pendingFeedback, "pendingFeedback");
|
|
|
|
this.pendingFeedback = pendingFeedback;
|
|
|
|
this.showCxLinkForIssueDetails = z2;
|
|
|
|
}
|
|
|
|
|
|
|
|
public static /* synthetic */ NavigateToIssueDetails copy$default(NavigateToIssueDetails navigateToIssueDetails, PendingFeedback pendingFeedback, boolean z2, int i, Object obj) {
|
|
|
|
if ((i & 1) != 0) {
|
|
|
|
pendingFeedback = navigateToIssueDetails.pendingFeedback;
|
|
|
|
}
|
|
|
|
if ((i & 2) != 0) {
|
|
|
|
z2 = navigateToIssueDetails.showCxLinkForIssueDetails;
|
|
|
|
}
|
|
|
|
return navigateToIssueDetails.copy(pendingFeedback, z2);
|
|
|
|
}
|
|
|
|
|
|
|
|
public final PendingFeedback component1() {
|
|
|
|
return this.pendingFeedback;
|
|
|
|
}
|
|
|
|
|
|
|
|
public final boolean component2() {
|
|
|
|
return this.showCxLinkForIssueDetails;
|
|
|
|
}
|
|
|
|
|
|
|
|
public final NavigateToIssueDetails copy(PendingFeedback pendingFeedback, boolean z2) {
|
|
|
|
m.checkNotNullParameter(pendingFeedback, "pendingFeedback");
|
|
|
|
return new NavigateToIssueDetails(pendingFeedback, z2);
|
|
|
|
}
|
|
|
|
|
|
|
|
public boolean equals(Object obj) {
|
|
|
|
if (this == obj) {
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
if (!(obj instanceof NavigateToIssueDetails)) {
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
NavigateToIssueDetails navigateToIssueDetails = (NavigateToIssueDetails) obj;
|
|
|
|
return m.areEqual(this.pendingFeedback, navigateToIssueDetails.pendingFeedback) && this.showCxLinkForIssueDetails == navigateToIssueDetails.showCxLinkForIssueDetails;
|
|
|
|
}
|
|
|
|
|
|
|
|
public final PendingFeedback getPendingFeedback() {
|
|
|
|
return this.pendingFeedback;
|
|
|
|
}
|
|
|
|
|
|
|
|
public final boolean getShowCxLinkForIssueDetails() {
|
|
|
|
return this.showCxLinkForIssueDetails;
|
|
|
|
}
|
|
|
|
|
|
|
|
public int hashCode() {
|
|
|
|
PendingFeedback pendingFeedback = this.pendingFeedback;
|
|
|
|
int hashCode = (pendingFeedback != null ? pendingFeedback.hashCode() : 0) * 31;
|
|
|
|
boolean z2 = this.showCxLinkForIssueDetails;
|
|
|
|
if (z2) {
|
|
|
|
z2 = true;
|
|
|
|
}
|
|
|
|
int i = z2 ? 1 : 0;
|
|
|
|
int i2 = z2 ? 1 : 0;
|
|
|
|
int i3 = z2 ? 1 : 0;
|
|
|
|
return hashCode + i;
|
|
|
|
}
|
|
|
|
|
|
|
|
public String toString() {
|
|
|
|
StringBuilder L = a.L("NavigateToIssueDetails(pendingFeedback=");
|
|
|
|
L.append(this.pendingFeedback);
|
|
|
|
L.append(", showCxLinkForIssueDetails=");
|
|
|
|
return a.G(L, this.showCxLinkForIssueDetails, ")");
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
/* compiled from: FeedbackSheetViewModel.kt */
|
|
|
|
public static final class Submitted extends Event {
|
|
|
|
private final boolean showConfirmation;
|
|
|
|
|
|
|
|
public Submitted(boolean z2) {
|
|
|
|
super(null);
|
|
|
|
this.showConfirmation = z2;
|
|
|
|
}
|
|
|
|
|
|
|
|
public static /* synthetic */ Submitted copy$default(Submitted submitted, boolean z2, int i, Object obj) {
|
|
|
|
if ((i & 1) != 0) {
|
|
|
|
z2 = submitted.showConfirmation;
|
|
|
|
}
|
|
|
|
return submitted.copy(z2);
|
|
|
|
}
|
|
|
|
|
|
|
|
public final boolean component1() {
|
|
|
|
return this.showConfirmation;
|
|
|
|
}
|
|
|
|
|
|
|
|
public final Submitted copy(boolean z2) {
|
|
|
|
return new Submitted(z2);
|
|
|
|
}
|
|
|
|
|
|
|
|
public boolean equals(Object obj) {
|
|
|
|
if (this != obj) {
|
|
|
|
return (obj instanceof Submitted) && this.showConfirmation == ((Submitted) obj).showConfirmation;
|
|
|
|
}
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
|
|
|
|
public final boolean getShowConfirmation() {
|
|
|
|
return this.showConfirmation;
|
|
|
|
}
|
|
|
|
|
|
|
|
public int hashCode() {
|
|
|
|
boolean z2 = this.showConfirmation;
|
|
|
|
if (z2) {
|
|
|
|
return 1;
|
|
|
|
}
|
|
|
|
return z2 ? 1 : 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
public String toString() {
|
|
|
|
return a.G(a.L("Submitted(showConfirmation="), this.showConfirmation, ")");
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
private Event() {
|
|
|
|
}
|
|
|
|
|
|
|
|
public /* synthetic */ Event(DefaultConstructorMarker defaultConstructorMarker) {
|
|
|
|
this();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
/* compiled from: FeedbackSheetViewModel.kt */
|
|
|
|
public static final class ViewState {
|
|
|
|
private final List<FeedbackIssue> feedbackIssues;
|
|
|
|
private final int issuesHeaderTextResId;
|
|
|
|
private final Integer promptTextResId;
|
|
|
|
private final FeedbackRating selectedFeedbackRating;
|
|
|
|
private final boolean showFaceRatings;
|
|
|
|
private final int titleTextResId;
|
|
|
|
|
|
|
|
/* JADX DEBUG: Multi-variable search result rejected for r3v0, resolved type: java.util.List<? extends com.discord.widgets.voice.feedback.FeedbackIssue> */
|
|
|
|
/* JADX WARN: Multi-variable type inference failed */
|
|
|
|
public ViewState(FeedbackRating feedbackRating, List<? extends FeedbackIssue> list, @StringRes int i, @StringRes Integer num, @StringRes int i2) {
|
|
|
|
m.checkNotNullParameter(feedbackRating, "selectedFeedbackRating");
|
|
|
|
m.checkNotNullParameter(list, "feedbackIssues");
|
|
|
|
this.selectedFeedbackRating = feedbackRating;
|
|
|
|
this.feedbackIssues = list;
|
|
|
|
this.titleTextResId = i;
|
|
|
|
this.promptTextResId = num;
|
|
|
|
this.issuesHeaderTextResId = i2;
|
|
|
|
this.showFaceRatings = num != null;
|
|
|
|
}
|
|
|
|
|
|
|
|
/* JADX INFO: this call moved to the top of the method (can break code semantics) */
|
|
|
|
public /* synthetic */ ViewState(FeedbackRating feedbackRating, List list, int i, Integer num, int i2, int i3, DefaultConstructorMarker defaultConstructorMarker) {
|
|
|
|
this(feedbackRating, list, i, (i3 & 8) != 0 ? null : num, i2);
|
|
|
|
}
|
|
|
|
|
|
|
|
/* JADX DEBUG: Multi-variable search result rejected for r3v0, resolved type: com.discord.widgets.feedback.FeedbackSheetViewModel$ViewState */
|
|
|
|
/* JADX WARN: Multi-variable type inference failed */
|
|
|
|
public static /* synthetic */ ViewState copy$default(ViewState viewState, FeedbackRating feedbackRating, List list, int i, Integer num, int i2, int i3, Object obj) {
|
|
|
|
if ((i3 & 1) != 0) {
|
|
|
|
feedbackRating = viewState.selectedFeedbackRating;
|
|
|
|
}
|
|
|
|
if ((i3 & 2) != 0) {
|
|
|
|
list = viewState.feedbackIssues;
|
|
|
|
}
|
|
|
|
if ((i3 & 4) != 0) {
|
|
|
|
i = viewState.titleTextResId;
|
|
|
|
}
|
|
|
|
if ((i3 & 8) != 0) {
|
|
|
|
num = viewState.promptTextResId;
|
|
|
|
}
|
|
|
|
if ((i3 & 16) != 0) {
|
|
|
|
i2 = viewState.issuesHeaderTextResId;
|
|
|
|
}
|
|
|
|
return viewState.copy(feedbackRating, list, i, num, i2);
|
|
|
|
}
|
|
|
|
|
|
|
|
public final FeedbackRating component1() {
|
|
|
|
return this.selectedFeedbackRating;
|
|
|
|
}
|
|
|
|
|
|
|
|
public final List<FeedbackIssue> component2() {
|
|
|
|
return this.feedbackIssues;
|
|
|
|
}
|
|
|
|
|
|
|
|
public final int component3() {
|
|
|
|
return this.titleTextResId;
|
|
|
|
}
|
|
|
|
|
|
|
|
public final Integer component4() {
|
|
|
|
return this.promptTextResId;
|
|
|
|
}
|
|
|
|
|
|
|
|
public final int component5() {
|
|
|
|
return this.issuesHeaderTextResId;
|
|
|
|
}
|
|
|
|
|
|
|
|
public final ViewState copy(FeedbackRating feedbackRating, List<? extends FeedbackIssue> list, @StringRes int i, @StringRes Integer num, @StringRes int i2) {
|
|
|
|
m.checkNotNullParameter(feedbackRating, "selectedFeedbackRating");
|
|
|
|
m.checkNotNullParameter(list, "feedbackIssues");
|
|
|
|
return new ViewState(feedbackRating, list, i, num, i2);
|
|
|
|
}
|
|
|
|
|
|
|
|
public boolean equals(Object obj) {
|
|
|
|
if (this == obj) {
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
if (!(obj instanceof ViewState)) {
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
ViewState viewState = (ViewState) obj;
|
|
|
|
return m.areEqual(this.selectedFeedbackRating, viewState.selectedFeedbackRating) && m.areEqual(this.feedbackIssues, viewState.feedbackIssues) && this.titleTextResId == viewState.titleTextResId && m.areEqual(this.promptTextResId, viewState.promptTextResId) && this.issuesHeaderTextResId == viewState.issuesHeaderTextResId;
|
|
|
|
}
|
|
|
|
|
|
|
|
public final List<FeedbackIssue> getFeedbackIssues() {
|
|
|
|
return this.feedbackIssues;
|
|
|
|
}
|
|
|
|
|
|
|
|
public final int getIssuesHeaderTextResId() {
|
|
|
|
return this.issuesHeaderTextResId;
|
|
|
|
}
|
|
|
|
|
|
|
|
public final Integer getPromptTextResId() {
|
|
|
|
return this.promptTextResId;
|
|
|
|
}
|
|
|
|
|
|
|
|
public final FeedbackRating getSelectedFeedbackRating() {
|
|
|
|
return this.selectedFeedbackRating;
|
|
|
|
}
|
|
|
|
|
|
|
|
public final boolean getShowFaceRatings() {
|
|
|
|
return this.showFaceRatings;
|
|
|
|
}
|
|
|
|
|
|
|
|
public final int getTitleTextResId() {
|
|
|
|
return this.titleTextResId;
|
|
|
|
}
|
|
|
|
|
|
|
|
public int hashCode() {
|
|
|
|
FeedbackRating feedbackRating = this.selectedFeedbackRating;
|
|
|
|
int i = 0;
|
|
|
|
int hashCode = (feedbackRating != null ? feedbackRating.hashCode() : 0) * 31;
|
|
|
|
List<FeedbackIssue> list = this.feedbackIssues;
|
|
|
|
int hashCode2 = (((hashCode + (list != null ? list.hashCode() : 0)) * 31) + this.titleTextResId) * 31;
|
|
|
|
Integer num = this.promptTextResId;
|
|
|
|
if (num != null) {
|
|
|
|
i = num.hashCode();
|
|
|
|
}
|
|
|
|
return ((hashCode2 + i) * 31) + this.issuesHeaderTextResId;
|
|
|
|
}
|
|
|
|
|
|
|
|
public String toString() {
|
|
|
|
StringBuilder L = a.L("ViewState(selectedFeedbackRating=");
|
|
|
|
L.append(this.selectedFeedbackRating);
|
|
|
|
L.append(", feedbackIssues=");
|
|
|
|
L.append(this.feedbackIssues);
|
|
|
|
L.append(", titleTextResId=");
|
|
|
|
L.append(this.titleTextResId);
|
|
|
|
L.append(", promptTextResId=");
|
|
|
|
L.append(this.promptTextResId);
|
|
|
|
L.append(", issuesHeaderTextResId=");
|
2021-07-13 20:23:20 +00:00
|
|
|
return a.y(L, this.issuesHeaderTextResId, ")");
|
2021-06-27 20:44:35 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
Observable<Event> observeEvents();
|
|
|
|
|
|
|
|
Observable<ViewState> observeViewState();
|
|
|
|
|
|
|
|
void selectIssue(FeedbackIssue feedbackIssue, String str);
|
|
|
|
|
|
|
|
void selectRating(FeedbackRating feedbackRating);
|
|
|
|
|
|
|
|
void submitForm();
|
|
|
|
}
|