177 lines
7.9 KiB
Java
177 lines
7.9 KiB
Java
package com.discord.widgets.channels.memberlist;
|
|
|
|
import c.d.b.a.a;
|
|
import com.discord.api.channel.Channel;
|
|
import com.discord.models.domain.ModelApplicationStream;
|
|
import com.discord.models.presence.Presence;
|
|
import com.discord.models.user.User;
|
|
import com.discord.stores.StoreApplicationStreaming;
|
|
import com.discord.stores.StoreStream;
|
|
import com.discord.stores.StoreUser;
|
|
import com.discord.stores.StoreUserPresence;
|
|
import d0.z.d.m;
|
|
import java.util.Map;
|
|
import java.util.concurrent.TimeUnit;
|
|
import kotlin.jvm.internal.DefaultConstructorMarker;
|
|
import rx.Observable;
|
|
/* compiled from: PrivateChannelMemberListService.kt */
|
|
public final class PrivateChannelMemberListService {
|
|
private final StoreApplicationStreaming storeApplicationStreaming;
|
|
private final StoreUserPresence storePresences;
|
|
private final StoreUser storeUser;
|
|
|
|
/* compiled from: PrivateChannelMemberListService.kt */
|
|
public static final class State {
|
|
private final Map<Long, ModelApplicationStream> applicationStreams;
|
|
private final Channel channel;
|
|
private final Map<Long, Presence> presences;
|
|
private final Map<Long, User> users;
|
|
|
|
/* JADX DEBUG: Multi-variable search result rejected for r3v0, resolved type: java.util.Map<java.lang.Long, ? extends com.discord.models.user.User> */
|
|
/* JADX DEBUG: Multi-variable search result rejected for r5v0, resolved type: java.util.Map<java.lang.Long, ? extends com.discord.models.domain.ModelApplicationStream> */
|
|
/* JADX WARN: Multi-variable type inference failed */
|
|
public State(Channel channel, Map<Long, ? extends User> map, Map<Long, Presence> map2, Map<Long, ? extends ModelApplicationStream> map3) {
|
|
m.checkNotNullParameter(channel, "channel");
|
|
m.checkNotNullParameter(map, "users");
|
|
m.checkNotNullParameter(map2, "presences");
|
|
m.checkNotNullParameter(map3, "applicationStreams");
|
|
this.channel = channel;
|
|
this.users = map;
|
|
this.presences = map2;
|
|
this.applicationStreams = map3;
|
|
}
|
|
|
|
/* JADX DEBUG: Multi-variable search result rejected for r0v0, resolved type: com.discord.widgets.channels.memberlist.PrivateChannelMemberListService$State */
|
|
/* JADX WARN: Multi-variable type inference failed */
|
|
public static /* synthetic */ State copy$default(State state, Channel channel, Map map, Map map2, Map map3, int i, Object obj) {
|
|
if ((i & 1) != 0) {
|
|
channel = state.channel;
|
|
}
|
|
if ((i & 2) != 0) {
|
|
map = state.users;
|
|
}
|
|
if ((i & 4) != 0) {
|
|
map2 = state.presences;
|
|
}
|
|
if ((i & 8) != 0) {
|
|
map3 = state.applicationStreams;
|
|
}
|
|
return state.copy(channel, map, map2, map3);
|
|
}
|
|
|
|
public final Channel component1() {
|
|
return this.channel;
|
|
}
|
|
|
|
public final Map<Long, User> component2() {
|
|
return this.users;
|
|
}
|
|
|
|
public final Map<Long, Presence> component3() {
|
|
return this.presences;
|
|
}
|
|
|
|
public final Map<Long, ModelApplicationStream> component4() {
|
|
return this.applicationStreams;
|
|
}
|
|
|
|
public final State copy(Channel channel, Map<Long, ? extends User> map, Map<Long, Presence> map2, Map<Long, ? extends ModelApplicationStream> map3) {
|
|
m.checkNotNullParameter(channel, "channel");
|
|
m.checkNotNullParameter(map, "users");
|
|
m.checkNotNullParameter(map2, "presences");
|
|
m.checkNotNullParameter(map3, "applicationStreams");
|
|
return new State(channel, map, map2, map3);
|
|
}
|
|
|
|
public boolean equals(Object obj) {
|
|
if (this == obj) {
|
|
return true;
|
|
}
|
|
if (!(obj instanceof State)) {
|
|
return false;
|
|
}
|
|
State state = (State) obj;
|
|
return m.areEqual(this.channel, state.channel) && m.areEqual(this.users, state.users) && m.areEqual(this.presences, state.presences) && m.areEqual(this.applicationStreams, state.applicationStreams);
|
|
}
|
|
|
|
public final Map<Long, ModelApplicationStream> getApplicationStreams() {
|
|
return this.applicationStreams;
|
|
}
|
|
|
|
public final Channel getChannel() {
|
|
return this.channel;
|
|
}
|
|
|
|
public final Map<Long, Presence> getPresences() {
|
|
return this.presences;
|
|
}
|
|
|
|
public final Map<Long, User> getUsers() {
|
|
return this.users;
|
|
}
|
|
|
|
public int hashCode() {
|
|
Channel channel = this.channel;
|
|
int i = 0;
|
|
int hashCode = (channel != null ? channel.hashCode() : 0) * 31;
|
|
Map<Long, User> map = this.users;
|
|
int hashCode2 = (hashCode + (map != null ? map.hashCode() : 0)) * 31;
|
|
Map<Long, Presence> map2 = this.presences;
|
|
int hashCode3 = (hashCode2 + (map2 != null ? map2.hashCode() : 0)) * 31;
|
|
Map<Long, ModelApplicationStream> map3 = this.applicationStreams;
|
|
if (map3 != null) {
|
|
i = map3.hashCode();
|
|
}
|
|
return hashCode3 + i;
|
|
}
|
|
|
|
public String toString() {
|
|
StringBuilder K = a.K("State(channel=");
|
|
K.append(this.channel);
|
|
K.append(", users=");
|
|
K.append(this.users);
|
|
K.append(", presences=");
|
|
K.append(this.presences);
|
|
K.append(", applicationStreams=");
|
|
return a.E(K, this.applicationStreams, ")");
|
|
}
|
|
}
|
|
|
|
public PrivateChannelMemberListService() {
|
|
this(null, null, null, 7, null);
|
|
}
|
|
|
|
public PrivateChannelMemberListService(StoreUser storeUser, StoreUserPresence storeUserPresence, StoreApplicationStreaming storeApplicationStreaming) {
|
|
m.checkNotNullParameter(storeUser, "storeUser");
|
|
m.checkNotNullParameter(storeUserPresence, "storePresences");
|
|
m.checkNotNullParameter(storeApplicationStreaming, "storeApplicationStreaming");
|
|
this.storeUser = storeUser;
|
|
this.storePresences = storeUserPresence;
|
|
this.storeApplicationStreaming = storeApplicationStreaming;
|
|
}
|
|
|
|
/* JADX INFO: this call moved to the top of the method (can break code semantics) */
|
|
public /* synthetic */ PrivateChannelMemberListService(StoreUser storeUser, StoreUserPresence storeUserPresence, StoreApplicationStreaming storeApplicationStreaming, int i, DefaultConstructorMarker defaultConstructorMarker) {
|
|
this((i & 1) != 0 ? StoreStream.Companion.getUsers() : storeUser, (i & 2) != 0 ? StoreStream.Companion.getPresences() : storeUserPresence, (i & 4) != 0 ? StoreStream.Companion.getApplicationStreaming() : storeApplicationStreaming);
|
|
}
|
|
|
|
public static final /* synthetic */ StoreApplicationStreaming access$getStoreApplicationStreaming$p(PrivateChannelMemberListService privateChannelMemberListService) {
|
|
return privateChannelMemberListService.storeApplicationStreaming;
|
|
}
|
|
|
|
public static final /* synthetic */ StoreUserPresence access$getStorePresences$p(PrivateChannelMemberListService privateChannelMemberListService) {
|
|
return privateChannelMemberListService.storePresences;
|
|
}
|
|
|
|
public static final /* synthetic */ StoreUser access$getStoreUser$p(PrivateChannelMemberListService privateChannelMemberListService) {
|
|
return privateChannelMemberListService.storeUser;
|
|
}
|
|
|
|
public final Observable<State> observeStateForGroupDm(Channel channel) {
|
|
m.checkNotNullParameter(channel, "channel");
|
|
Observable<State> Y = Observable.H(this.storeUser.observeMeId().Z(1).c0(5000, TimeUnit.MILLISECONDS), Observable.A(channel.w()).F(PrivateChannelMemberListService$observeStateForGroupDm$1.INSTANCE)).f0().Y(new PrivateChannelMemberListService$observeStateForGroupDm$2(this, channel));
|
|
m.checkNotNullExpressionValue(Y, "Observable.merge(\n … }\n }");
|
|
return Y;
|
|
}
|
|
}
|