2021-08-03 07:33:18 +00:00
|
|
|
package com.discord.widgets.guilds.invite;
|
|
|
|
|
2021-12-17 21:59:34 +00:00
|
|
|
import b.d.b.a.a;
|
2021-08-03 07:33:18 +00:00
|
|
|
import com.discord.models.user.User;
|
|
|
|
import com.discord.stores.StoreChannels;
|
|
|
|
import com.discord.stores.StoreMessagesMostRecent;
|
|
|
|
import com.discord.stores.StoreStream;
|
|
|
|
import com.discord.stores.StoreUser;
|
|
|
|
import com.discord.stores.StoreUserAffinities;
|
|
|
|
import com.discord.stores.StoreUserRelationships;
|
2021-11-02 06:38:17 +00:00
|
|
|
import d0.z.d.m;
|
2021-08-03 07:33:18 +00:00
|
|
|
import java.util.List;
|
|
|
|
import java.util.Map;
|
|
|
|
import kotlin.jvm.internal.DefaultConstructorMarker;
|
|
|
|
import rx.Observable;
|
|
|
|
/* compiled from: InviteSuggestionsManager.kt */
|
|
|
|
public final class InviteSuggestionsManager {
|
|
|
|
private final StoreChannels storeChannels;
|
|
|
|
private final StoreMessagesMostRecent storeMessagesMostRecent;
|
|
|
|
private final StoreUserAffinities storeUserAffinities;
|
|
|
|
private final StoreUserRelationships storeUserRelationships;
|
|
|
|
private final StoreUser storeUsers;
|
|
|
|
|
|
|
|
/* compiled from: InviteSuggestionsManager.kt */
|
|
|
|
public static final class UserAffinityData {
|
|
|
|
private final Map<Long, Integer> relationships;
|
|
|
|
private final List<Long> userIds;
|
|
|
|
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 WARN: Multi-variable type inference failed */
|
|
|
|
public UserAffinityData(List<Long> list, Map<Long, ? extends User> map, Map<Long, Integer> map2) {
|
|
|
|
m.checkNotNullParameter(list, "userIds");
|
|
|
|
m.checkNotNullParameter(map, "users");
|
|
|
|
m.checkNotNullParameter(map2, "relationships");
|
|
|
|
this.userIds = list;
|
|
|
|
this.users = map;
|
|
|
|
this.relationships = map2;
|
|
|
|
}
|
|
|
|
|
|
|
|
/* JADX DEBUG: Multi-variable search result rejected for r0v0, resolved type: com.discord.widgets.guilds.invite.InviteSuggestionsManager$UserAffinityData */
|
|
|
|
/* JADX WARN: Multi-variable type inference failed */
|
|
|
|
public static /* synthetic */ UserAffinityData copy$default(UserAffinityData userAffinityData, List list, Map map, Map map2, int i, Object obj) {
|
|
|
|
if ((i & 1) != 0) {
|
|
|
|
list = userAffinityData.userIds;
|
|
|
|
}
|
|
|
|
if ((i & 2) != 0) {
|
|
|
|
map = userAffinityData.users;
|
|
|
|
}
|
|
|
|
if ((i & 4) != 0) {
|
|
|
|
map2 = userAffinityData.relationships;
|
|
|
|
}
|
|
|
|
return userAffinityData.copy(list, map, map2);
|
|
|
|
}
|
|
|
|
|
|
|
|
public final List<Long> component1() {
|
|
|
|
return this.userIds;
|
|
|
|
}
|
|
|
|
|
|
|
|
public final Map<Long, User> component2() {
|
|
|
|
return this.users;
|
|
|
|
}
|
|
|
|
|
|
|
|
public final Map<Long, Integer> component3() {
|
|
|
|
return this.relationships;
|
|
|
|
}
|
|
|
|
|
|
|
|
public final UserAffinityData copy(List<Long> list, Map<Long, ? extends User> map, Map<Long, Integer> map2) {
|
|
|
|
m.checkNotNullParameter(list, "userIds");
|
|
|
|
m.checkNotNullParameter(map, "users");
|
|
|
|
m.checkNotNullParameter(map2, "relationships");
|
|
|
|
return new UserAffinityData(list, map, map2);
|
|
|
|
}
|
|
|
|
|
|
|
|
public boolean equals(Object obj) {
|
|
|
|
if (this == obj) {
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
if (!(obj instanceof UserAffinityData)) {
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
UserAffinityData userAffinityData = (UserAffinityData) obj;
|
|
|
|
return m.areEqual(this.userIds, userAffinityData.userIds) && m.areEqual(this.users, userAffinityData.users) && m.areEqual(this.relationships, userAffinityData.relationships);
|
|
|
|
}
|
|
|
|
|
|
|
|
public final Map<Long, Integer> getRelationships() {
|
|
|
|
return this.relationships;
|
|
|
|
}
|
|
|
|
|
|
|
|
public final List<Long> getUserIds() {
|
|
|
|
return this.userIds;
|
|
|
|
}
|
|
|
|
|
|
|
|
public final Map<Long, User> getUsers() {
|
|
|
|
return this.users;
|
|
|
|
}
|
|
|
|
|
|
|
|
public int hashCode() {
|
|
|
|
List<Long> list = this.userIds;
|
|
|
|
int i = 0;
|
|
|
|
int hashCode = (list != null ? list.hashCode() : 0) * 31;
|
|
|
|
Map<Long, User> map = this.users;
|
|
|
|
int hashCode2 = (hashCode + (map != null ? map.hashCode() : 0)) * 31;
|
|
|
|
Map<Long, Integer> map2 = this.relationships;
|
|
|
|
if (map2 != null) {
|
|
|
|
i = map2.hashCode();
|
|
|
|
}
|
|
|
|
return hashCode2 + i;
|
|
|
|
}
|
|
|
|
|
|
|
|
public String toString() {
|
2021-11-05 06:48:17 +00:00
|
|
|
StringBuilder R = a.R("UserAffinityData(userIds=");
|
|
|
|
R.append(this.userIds);
|
|
|
|
R.append(", users=");
|
|
|
|
R.append(this.users);
|
|
|
|
R.append(", relationships=");
|
|
|
|
return a.K(R, this.relationships, ")");
|
2021-08-03 07:33:18 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
public InviteSuggestionsManager() {
|
|
|
|
this(null, null, null, null, null, 31, null);
|
|
|
|
}
|
|
|
|
|
|
|
|
public InviteSuggestionsManager(StoreChannels storeChannels, StoreMessagesMostRecent storeMessagesMostRecent, StoreUserAffinities storeUserAffinities, StoreUser storeUser, StoreUserRelationships storeUserRelationships) {
|
|
|
|
m.checkNotNullParameter(storeChannels, "storeChannels");
|
|
|
|
m.checkNotNullParameter(storeMessagesMostRecent, "storeMessagesMostRecent");
|
|
|
|
m.checkNotNullParameter(storeUserAffinities, "storeUserAffinities");
|
|
|
|
m.checkNotNullParameter(storeUser, "storeUsers");
|
|
|
|
m.checkNotNullParameter(storeUserRelationships, "storeUserRelationships");
|
|
|
|
this.storeChannels = storeChannels;
|
|
|
|
this.storeMessagesMostRecent = storeMessagesMostRecent;
|
|
|
|
this.storeUserAffinities = storeUserAffinities;
|
|
|
|
this.storeUsers = storeUser;
|
|
|
|
this.storeUserRelationships = storeUserRelationships;
|
|
|
|
}
|
|
|
|
|
|
|
|
/* JADX INFO: this call moved to the top of the method (can break code semantics) */
|
|
|
|
public /* synthetic */ InviteSuggestionsManager(StoreChannels storeChannels, StoreMessagesMostRecent storeMessagesMostRecent, StoreUserAffinities storeUserAffinities, StoreUser storeUser, StoreUserRelationships storeUserRelationships, int i, DefaultConstructorMarker defaultConstructorMarker) {
|
|
|
|
this((i & 1) != 0 ? StoreStream.Companion.getChannels() : storeChannels, (i & 2) != 0 ? StoreStream.Companion.getMessagesMostRecent() : storeMessagesMostRecent, (i & 4) != 0 ? StoreStream.Companion.getUserAffinities() : storeUserAffinities, (i & 8) != 0 ? StoreStream.Companion.getUsers() : storeUser, (i & 16) != 0 ? StoreStream.Companion.getUserRelationships() : storeUserRelationships);
|
|
|
|
}
|
|
|
|
|
|
|
|
public static final /* synthetic */ StoreUserRelationships access$getStoreUserRelationships$p(InviteSuggestionsManager inviteSuggestionsManager) {
|
|
|
|
return inviteSuggestionsManager.storeUserRelationships;
|
|
|
|
}
|
|
|
|
|
|
|
|
public static final /* synthetic */ StoreUser access$getStoreUsers$p(InviteSuggestionsManager inviteSuggestionsManager) {
|
|
|
|
return inviteSuggestionsManager.storeUsers;
|
|
|
|
}
|
|
|
|
|
|
|
|
public final Observable<List<InviteSuggestion>> observeInviteSuggestions() {
|
2021-10-22 06:43:45 +00:00
|
|
|
Observable<List<InviteSuggestion>> i = Observable.i(this.storeChannels.observePrivateChannels(), this.storeMessagesMostRecent.observeRecentMessageIds().Z(1), this.storeUserAffinities.observeAffinityUserIds().Y(new InviteSuggestionsManager$observeInviteSuggestions$1(this)), InviteSuggestionsManager$observeInviteSuggestions$2.INSTANCE);
|
2021-08-03 07:33:18 +00:00
|
|
|
m.checkNotNullExpressionValue(i, "Observable.combineLatest… inviteSuggestionList\n }");
|
|
|
|
return i;
|
|
|
|
}
|
|
|
|
}
|