discord-jadx/app/src/main/java/com/discord/widgets/user/presence/ModelRichPresence.java

124 lines
4.4 KiB
Java

package com.discord.widgets.user.presence;
import c.d.b.a.a;
import com.discord.api.activity.Activity;
import com.discord.api.application.Application;
import com.discord.models.presence.Presence;
import com.discord.stores.StoreStream;
import com.discord.stores.StoreUserPresence;
import com.discord.utilities.presence.PresenceUtils;
import d0.z.d.m;
import kotlin.jvm.internal.DefaultConstructorMarker;
import rx.Observable;
/* compiled from: ModelRichPresence.kt */
public final class ModelRichPresence {
public static final Companion Companion = new Companion(null);
private final Presence presence;
private final Application primaryApplication;
/* compiled from: ModelRichPresence.kt */
public static final class Companion {
private Companion() {
}
public /* synthetic */ Companion(DefaultConstructorMarker defaultConstructorMarker) {
this();
}
public static /* synthetic */ Observable get$default(Companion companion, long j, StoreUserPresence storeUserPresence, int i, Object obj) {
if ((i & 2) != 0) {
storeUserPresence = StoreStream.Companion.getPresences();
}
return companion.get(j, storeUserPresence);
}
public final Observable<ModelRichPresence> get(long j, StoreUserPresence storeUserPresence) {
m.checkNotNullParameter(storeUserPresence, "storeUserPresence");
Observable<R> Y = storeUserPresence.observePresenceForUser(j).Y(ModelRichPresence$Companion$get$1.INSTANCE);
m.checkNotNullExpressionValue(Y, "storeUserPresence\n … }\n }");
return Y;
}
}
public ModelRichPresence(Presence presence, Application application) {
m.checkNotNullParameter(presence, "presence");
this.presence = presence;
this.primaryApplication = application;
}
/* JADX INFO: this call moved to the top of the method (can break code semantics) */
public /* synthetic */ ModelRichPresence(Presence presence, Application application, int i, DefaultConstructorMarker defaultConstructorMarker) {
this(presence, (i & 2) != 0 ? null : application);
}
public static /* synthetic */ ModelRichPresence copy$default(ModelRichPresence modelRichPresence, Presence presence, Application application, int i, Object obj) {
if ((i & 1) != 0) {
presence = modelRichPresence.presence;
}
if ((i & 2) != 0) {
application = modelRichPresence.primaryApplication;
}
return modelRichPresence.copy(presence, application);
}
public static final Observable<ModelRichPresence> get(long j, StoreUserPresence storeUserPresence) {
return Companion.get(j, storeUserPresence);
}
public final Presence component1() {
return this.presence;
}
public final Application component2() {
return this.primaryApplication;
}
public final ModelRichPresence copy(Presence presence, Application application) {
m.checkNotNullParameter(presence, "presence");
return new ModelRichPresence(presence, application);
}
public boolean equals(Object obj) {
if (this == obj) {
return true;
}
if (!(obj instanceof ModelRichPresence)) {
return false;
}
ModelRichPresence modelRichPresence = (ModelRichPresence) obj;
return m.areEqual(this.presence, modelRichPresence.presence) && m.areEqual(this.primaryApplication, modelRichPresence.primaryApplication);
}
public final Presence getPresence() {
return this.presence;
}
public final Activity getPrimaryActivity() {
return PresenceUtils.INSTANCE.getPrimaryActivity(this.presence);
}
public final Application getPrimaryApplication() {
return this.primaryApplication;
}
public int hashCode() {
Presence presence = this.presence;
int i = 0;
int hashCode = (presence != null ? presence.hashCode() : 0) * 31;
Application application = this.primaryApplication;
if (application != null) {
i = application.hashCode();
}
return hashCode + i;
}
public String toString() {
StringBuilder L = a.L("ModelRichPresence(presence=");
L.append(this.presence);
L.append(", primaryApplication=");
L.append(this.primaryApplication);
L.append(")");
return L.toString();
}
}