Skip to content

Commit

Permalink
i did a stupid
Browse files Browse the repository at this point in the history
  • Loading branch information
grngxd committed Nov 25, 2024
1 parent adda4dd commit 8827526
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion packages/core/flux/dispatcher.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import { abuseWebpack } from "../webpack/webpack";
let dispatcher: Dispatcher | null = null;
let dispatchBackup: Dispatcher["dispatch"] | null = null;

type Dispatcher = {
export type Dispatcher = {
subscribe: (
event: DispatcherEvent | `${DispatcherEvent}` | string,
callback: (data: unknown) => void
Expand Down
2 changes: 1 addition & 1 deletion packages/core/plugins/manager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ export const add = async (url: string, alsoInit = true): Promise<Plugin | null>
} else {
return existingPlugin;
}
}
}

const blob = new Blob([code], { type: 'application/javascript' });
const blobUrl = URL.createObjectURL(blob);
Expand Down
6 changes: 3 additions & 3 deletions packages/core/settings/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import { sleep } from "+util";
import * as veil from "+veil";
import type { VNode } from "preact";
import { generate } from "short-uuid";
import { getDispatcher } from "../flux/dispatcher";
import { type Dispatcher, getDispatcher } from "../flux/dispatcher";
import { abuseWebpack } from "../webpack/webpack";
type CustomElement = {
section: string;
Expand Down Expand Up @@ -49,8 +49,8 @@ export const removeCustomElement = (element: Partial<CustomElement>) => {
};

export const init = () => {
getDispatcher()
?.waitForDispatch("USER_SETTINGS_MODAL_OPEN")
(getDispatcher() as Dispatcher)
.waitForDispatch("USER_SETTINGS_MODAL_OPEN")
.then(async () => {
if (!window?.veil) return;
// this makes sure only 1 instance of veil is running
Expand Down
2 changes: 1 addition & 1 deletion packages/react/components/pages/SettingsPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ const SettingsPage = () => {
{typeof store.get() === "boolean" ? (
<Toggle
checked={store.get()}
onChange={(value) => plugins.setPluginEnabled(key, value)}
onChange={(value) => store.set(value)}
/>
) : (
<TextBox
Expand Down

0 comments on commit 8827526

Please sign in to comment.