This repository has been archived on 2025-05-02. You can view files and clone it, but cannot push or open issues or pull requests.
aerocord/src/renderer/patches/hideSwitchDevice.tsx

25 lines
770 B
TypeScript

/*
* SPDX-License-Identifier: GPL-3.0
* Aerocord, a vesktop fork for older microsoft NT releases such as NT 6.0, 6.1, 6.2 and 6.3.
* Credits to vendicated and the rest of the vesktop contribuitors for making Vesktop!
*/
import { addPatch } from "./shared";
addPatch({
patches: [
{
find: "lastOutputSystemDevice.justChanged",
replacement: {
// eslint-disable-next-line no-useless-escape
match: /(\i)\.default\.getState\(\).neverShowModal/,
replace: "$& || $self.shouldIgnore($1)"
}
}
],
shouldIgnore(state: any) {
return Object.keys(state?.default?.lastDeviceConnected ?? {})?.[0] === "vencord-screen-share";
}
});