mirror of
https://github.com/Equicord/Equicord.git
synced 2025-06-28 16:04:24 -04:00
ServerInfo: fix Blocked & Ignored tabs
This commit is contained in:
parent
96516f113a
commit
ba76c43a26
2 changed files with 13 additions and 9 deletions
|
@ -220,12 +220,12 @@ function FriendsTab({ guild, setCount }: RelationshipProps) {
|
|||
}
|
||||
|
||||
function BlockedUsersTab({ guild, setCount }: RelationshipProps) {
|
||||
const blockedIds = Object.keys(RelationshipStore.getMutableRelationships()).filter(id => RelationshipStore.isBlocked(id));
|
||||
const blockedIds = RelationshipStore.getBlockedIDs();
|
||||
return UserList("blocked", guild, blockedIds, setCount);
|
||||
}
|
||||
|
||||
function IgnoredUserTab({ guild, setCount }: RelationshipProps) {
|
||||
const ignoredIds = Object.keys(RelationshipStore.getMutableRelationships()).filter(id => RelationshipStore.isIgnored(id));
|
||||
const ignoredIds = RelationshipStore.getIgnoredIDs();
|
||||
return UserList("ignored", guild, ignoredIds, setCount);
|
||||
}
|
||||
|
||||
|
|
18
src/webpack/common/types/stores.d.ts
vendored
18
src/webpack/common/types/stores.d.ts
vendored
|
@ -236,17 +236,21 @@ export type useStateFromStores = <T>(
|
|||
|
||||
export class RelationshipStore extends FluxStore {
|
||||
getFriendIDs(): string[];
|
||||
/** Related to friend nicknames experiment. */
|
||||
getNickname(userId: string): string;
|
||||
getIgnoredIDs(): string[];
|
||||
getBlockedIDs(): string[];
|
||||
|
||||
getPendingCount(): number;
|
||||
getRelationshipCount(): number;
|
||||
|
||||
/** Related to friend nicknames. */
|
||||
getNickname(userId: string): string;
|
||||
/** @returns Enum value from constants.RelationshipTypes */
|
||||
getRelationshipType(userId: string): number;
|
||||
isFriend(userId: string): boolean;
|
||||
isBlocked(userId: string): boolean;
|
||||
isIgnored(userId: string): boolean;
|
||||
getSince(userId: string): string;
|
||||
|
||||
/** @returns Format: [userId: Enum value from constants.RelationshipTypes] */
|
||||
getMutableRelationships(): Record<number, number>;
|
||||
isBlocked(userId: string): boolean;
|
||||
isFriend(userId: string): boolean;
|
||||
|
||||
getSince(userId: string): string;
|
||||
isIgnored(userId: string): boolean;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue