mirror of
https://github.com/Equicord/Equicord.git
synced 2025-06-16 01:53:05 -04:00
feat(API): updateMessage API for forcing re-renders
This commit is contained in:
parent
9b9a5322c9
commit
537fc5e33d
8 changed files with 106 additions and 20 deletions
25
src/webpack/common/types/stores.d.ts
vendored
25
src/webpack/common/types/stores.d.ts
vendored
|
@ -41,8 +41,33 @@ export class FluxStore {
|
|||
__getLocalVars(): Record<string, any>;
|
||||
}
|
||||
|
||||
export class FluxEmitter {
|
||||
constructor();
|
||||
|
||||
changeSentinel: number;
|
||||
changedStores: Set<FluxStore>;
|
||||
isBatchEmitting: boolean;
|
||||
isDispatching: boolean;
|
||||
isPaused: boolean;
|
||||
pauseTimer: NodeJS.Timeout | null;
|
||||
reactChangedStores: Set<FluxStore>;
|
||||
|
||||
batched(batch: (...args: any[]) => void): void;
|
||||
destroy(): void;
|
||||
emit(): void;
|
||||
emitNonReactOnce(): void;
|
||||
emitReactOnce(): void;
|
||||
getChangeSentinel(): number;
|
||||
getIsPaused(): boolean;
|
||||
injectBatchEmitChanges(batch: (...args: any[]) => void): void;
|
||||
markChanged(store: FluxStore): void;
|
||||
pause(): void;
|
||||
resume(): void;
|
||||
}
|
||||
|
||||
export interface Flux {
|
||||
Store: typeof FluxStore;
|
||||
Emitter: FluxEmitter;
|
||||
}
|
||||
|
||||
export class WindowStore extends FluxStore {
|
||||
|
|
|
@ -144,6 +144,7 @@ const persistFilter = filters.byCode("[zustand persist middleware]");
|
|||
export const { persist: zustandPersist } = findLazy(m => m.persist && persistFilter(m.persist));
|
||||
|
||||
export const MessageActions = findByPropsLazy("editMessage", "sendMessage");
|
||||
export const MessageCache = findByPropsLazy("clearCache", "_channelMessages");
|
||||
export const UserProfileActions = findByPropsLazy("openUserProfileModal", "closeUserProfileModal");
|
||||
export const InviteActions = findByPropsLazy("resolveInvite");
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue