Skip to content

Commit

Permalink
feat(noDefaultHangStatus): add experimental plugin
Browse files Browse the repository at this point in the history
  • Loading branch information
D3SOX committed May 16, 2024
1 parent aeacd6f commit 44227e1
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 1 deletion.
3 changes: 2 additions & 1 deletion index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,11 @@ export const Native = getNative();
import Plugins from "~plugins";

const PLUGINS = [
require("./betterActivities").default,
require("./d3soxUpdater").default,
require("./followUser").default,
require("./ignoreTerms").default,
require("./betterActivities").default,
require("./noDefaultHangStatus").default,
require("./notifyUserChanges").default,
require("./screenShareStreamerMode").default,
require("./serverProfilesToolbox").default,
Expand Down
24 changes: 24 additions & 0 deletions noDefaultHangStatus/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
/*
* Vencord, a Discord client mod
* Copyright (c) 2024 Vendicated and contributors
* SPDX-License-Identifier: GPL-3.0-or-later
*/

import { Devs } from "@utils/constants";
import definePlugin from "@utils/types";
import { FluxDispatcher } from "@webpack/common";

export default definePlugin({
name: "NoDefaultHangStatus",
description: "Disable the default hang status",
authors: [Devs.D3SOX],

flux: {
UPDATE_HANG_STATUS: ({ status, saveAsDefault }: { status: string, saveAsDefault?: boolean }) => {
if (saveAsDefault === undefined && status) {
// console.log("UPDATE_HANG_STATUS", status, "clearing...");
FluxDispatcher.dispatch({ type: "CLEAR_HANG_STATUS" });
}
},
}
});

0 comments on commit 44227e1

Please sign in to comment.