Skip to content

Commit

Permalink
fix: lock file version (#506)
Browse files Browse the repository at this point in the history
* fix: lock file version

* feat(types): update to build 210578

* feat(types): update parser

* fix: cspell

* feat(types): update messages module
  • Loading branch information
FedeIlLeone authored Jul 5, 2023
1 parent 09c17b0 commit 3d8be71
Show file tree
Hide file tree
Showing 8 changed files with 29 additions and 7 deletions.
1 change: 1 addition & 0 deletions cspell.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@
"LOCALAPPDATA",
"logname",
"Millis",
"notif",
"notrack",
"outfile",
"popout",
Expand Down
2 changes: 1 addition & 1 deletion pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions src/renderer/modules/common/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ export const UserFlags = getExportsForProps<Record<string, number>>(Constants, [
"SPAMMER",
])!;

// ThemeColor
export const CSSVariables = await waitForProps<Record<string, string>>(
"TEXT_NORMAL",
"BACKGROUND_PRIMARY",
Expand Down
6 changes: 3 additions & 3 deletions src/renderer/modules/common/flux.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/* eslint-disable @typescript-eslint/no-explicit-any */
import type { FluxDispatcher as Dispatcher } from "./fluxDispatcher";
import type { Band, FluxDispatcher as Dispatcher } from "./fluxDispatcher";
import { waitForProps } from "../webpack";

type DispatchToken = string;
Expand Down Expand Up @@ -55,7 +55,7 @@ declare class Callbacks {
}

export declare class Store {
public constructor(dispatcher: Dispatcher, actions?: ActionHandlerRecord, band?: number);
public constructor(dispatcher: Dispatcher, actions?: ActionHandlerRecord, band?: Band);

public static destroy(): void;
public static getAll(): Store[];
Expand Down Expand Up @@ -85,7 +85,7 @@ export declare class Store {
public removeChangeListener(listener: Callback): void;
public removeReactChangeListener(listener: Callback): void;

public registerActionHandlers(actions: ActionHandlerRecord, band?: number): void;
public registerActionHandlers(actions: ActionHandlerRecord, band?: Band): void;

// eslint-disable-next-line @typescript-eslint/naming-convention
public __getLocalVars?(): Record<string, unknown>;
Expand Down
7 changes: 4 additions & 3 deletions src/renderer/modules/common/messages.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ interface InviteSuggestion {
isFiltered: boolean;
}

interface FetchMessageOptions {
interface FetchMessagesOptions {
channelId: string;
/** Snowflake */
before?: string;
Expand All @@ -53,7 +53,7 @@ interface FetchMessageOptions {
truncate?: boolean;
}

type FetchMessagesCachedOptions = Omit<FetchMessageOptions, "isPreload" | "skipLocalFetch">;
type FetchMessagesCachedOptions = Omit<FetchMessagesOptions, "isPreload" | "skipLocalFetch">;

interface FocusMessageOptions {
channelId: string;
Expand Down Expand Up @@ -354,7 +354,8 @@ export interface MessageActions {
limit: number,
localFetchComplete: LocalFetchComplete,
) => Promise<void>;
fetchMessages: (options: FetchMessageOptions) => Promise<boolean>;
fetchMessages: (options: FetchMessagesOptions) => Promise<boolean>;
fetchNewLocalMessages: (channelId: string, limit: number) => Promise<void>;
focusMessage: (options: FocusMessageOptions) => void;
getSendMessageOptionsForReply: (
options: SendMessageForReplyOptions,
Expand Down
14 changes: 14 additions & 0 deletions src/renderer/modules/common/parser.ts
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,20 @@ type ParseFn = (
export interface Parser {
defaultRules: DefaultRules;
guildEventRules: Omit<DefaultRules, "codeBlock" | "blockQuote" | "br">;
notifCenterV2MessagePreviewRules: Omit<
DefaultRules,
| "paragraph"
| "newline"
| "strong"
| "codeBlock"
| "inlineCode"
| "u"
| "link"
| "url"
| "autolink"
| "list"
| "heading"
>;
parse: ParseFn;
parseAutoModerationSystemMessage: ParseFn;
parseAutoModerationSystemMessageToAST: ParseFn;
Expand Down
1 change: 1 addition & 0 deletions src/renderer/modules/common/users.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ export interface GuildMemberStore {
getMemberIds: (guildId?: string) => string[];
getMemberRoleWithPendingUpdates: (guildId: string, userId: string) => string[];
getMembers: (guildId?: string) => GuildMember[];
getMemberVersion: () => number;
getMutableAllGuildsAndMembers: () => Record<string, Record<string, GuildMember>>;
getNick: (guildId?: string, userId?: string) => string | null;
getNicknameGuildsMapping: (userId: string) => Record<string, string[]>;
Expand Down
4 changes: 4 additions & 0 deletions src/renderer/modules/components/Text.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,10 @@ export type Variant =
| "text-lg/medium"
| "text-lg/semibold"
| "text-lg/bold"
| "redesign/message-preview/normal"
| "redesign/message-preview/medium"
| "redesign/message-preview/semibold"
| "redesign/message-preview/bold"
| "display-sm"
| "display-md"
| "display-lg"
Expand Down

0 comments on commit 3d8be71

Please sign in to comment.