Fix ImplicitRelationships, RelationshipNotifier & ServerInfo
This commit is contained in:
parent
3a1e17e04d
commit
8d97863db6
7 changed files with 30 additions and 26 deletions
|
|
@ -46,11 +46,7 @@ export let SelectedChannelStore: Stores.SelectedChannelStore & t.FluxStore;
|
|||
export let SelectedGuildStore: t.FluxStore & Record<string, any>;
|
||||
export let ChannelStore: Stores.ChannelStore & t.FluxStore;
|
||||
export let GuildMemberStore: Stores.GuildMemberStore & t.FluxStore;
|
||||
export let RelationshipStore: Stores.RelationshipStore & t.FluxStore & {
|
||||
/** Get the date (as a string) that the relationship was created */
|
||||
getSince(userId: string): string;
|
||||
isIgnored(userId: string): boolean;
|
||||
};
|
||||
export let RelationshipStore: t.RelationshipStore;
|
||||
|
||||
export let EmojiStore: t.EmojiStore;
|
||||
export let ThemeStore: t.ThemeStore;
|
||||
|
|
|
|||
17
src/webpack/common/types/stores.d.ts
vendored
17
src/webpack/common/types/stores.d.ts
vendored
|
|
@ -233,3 +233,20 @@ export type useStateFromStores = <T>(
|
|||
dependencies?: any,
|
||||
isEqual?: (old: T, newer: T) => boolean
|
||||
) => T;
|
||||
|
||||
export class RelationshipStore extends FluxStore {
|
||||
getFriendIDs(): string[];
|
||||
/** Related to friend nicknames experiment. */
|
||||
getNickname(userId: string): string;
|
||||
getPendingCount(): number;
|
||||
getRelationshipCount(): number;
|
||||
/** @returns Enum value from constants.RelationshipTypes */
|
||||
getRelationshipType(userId: string): number;
|
||||
/** @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