NoScreensharePreview: Allow plugin to be turned on/off
This commit is contained in:
parent
a3f5dc39a0
commit
cea0a3c9d9
1 changed files with 6 additions and 2 deletions
|
@ -16,7 +16,6 @@
|
||||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import { Settings } from "@api/Settings";
|
|
||||||
import { getUserSettingLazy } from "@api/UserSettings";
|
import { getUserSettingLazy } from "@api/UserSettings";
|
||||||
import { Devs } from "@utils/constants";
|
import { Devs } from "@utils/constants";
|
||||||
import definePlugin from "@utils/types";
|
import definePlugin from "@utils/types";
|
||||||
|
@ -28,11 +27,16 @@ export default definePlugin({
|
||||||
name: "NoScreensharePreview",
|
name: "NoScreensharePreview",
|
||||||
description: "Disables screenshare previews from being sent.",
|
description: "Disables screenshare previews from being sent.",
|
||||||
authors: [Devs.Nuckyz],
|
authors: [Devs.Nuckyz],
|
||||||
|
|
||||||
start() {
|
start() {
|
||||||
if (!DisableStreamPreviews.getSetting()) {
|
if (!DisableStreamPreviews.getSetting()) {
|
||||||
DisableStreamPreviews.updateSetting(true);
|
DisableStreamPreviews.updateSetting(true);
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
|
||||||
Settings.plugins.NoScreensharePreview.enabled = false;
|
stop() {
|
||||||
|
if (DisableStreamPreviews.getSetting()) {
|
||||||
|
DisableStreamPreviews.updateSetting(false);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in a new issue