diff --git a/src/plugins/noScreensharePreview/index.ts b/src/plugins/noScreensharePreview/index.ts index 6ad39a90..d4bb9c1e 100644 --- a/src/plugins/noScreensharePreview/index.ts +++ b/src/plugins/noScreensharePreview/index.ts @@ -16,7 +16,6 @@ * along with this program. If not, see . */ -import { Settings } from "@api/Settings"; import { getUserSettingLazy } from "@api/UserSettings"; import { Devs } from "@utils/constants"; import definePlugin from "@utils/types"; @@ -28,11 +27,16 @@ export default definePlugin({ name: "NoScreensharePreview", description: "Disables screenshare previews from being sent.", authors: [Devs.Nuckyz], + start() { if (!DisableStreamPreviews.getSetting()) { DisableStreamPreviews.updateSetting(true); } + }, - Settings.plugins.NoScreensharePreview.enabled = false; + stop() { + if (DisableStreamPreviews.getSetting()) { + DisableStreamPreviews.updateSetting(false); + } } });