mirror of
https://github.com/Equicord/Equicord.git
synced 2025-06-19 03:17:02 -04:00
Merge remote-tracking branch 'upstream/dev'
This commit is contained in:
commit
ad0b1a5dd3
9 changed files with 201 additions and 162 deletions
|
@ -25,6 +25,7 @@ import definePlugin, { PluginNative, StartAt } from "@utils/types";
|
|||
import * as Webpack from "@webpack";
|
||||
import { extract, filters, findAll, findModuleId, search } from "@webpack";
|
||||
import * as Common from "@webpack/common";
|
||||
import { loadLazyChunks } from "debug/loadLazyChunks";
|
||||
import type { ComponentType } from "react";
|
||||
|
||||
const DESKTOP_ONLY = (f: string) => () => {
|
||||
|
@ -82,6 +83,7 @@ function makeShortcuts() {
|
|||
wpsearch: search,
|
||||
wpex: extract,
|
||||
wpexs: (code: string) => extract(findModuleId(code)!),
|
||||
loadLazyChunks: IS_DEV ? loadLazyChunks : () => { throw new Error("loadLazyChunks is dev only."); },
|
||||
find,
|
||||
findAll: findAll,
|
||||
findByProps,
|
||||
|
|
|
@ -44,7 +44,6 @@ const settings = Settings.plugins;
|
|||
|
||||
export function isPluginEnabled(p: string) {
|
||||
return (
|
||||
IS_REPORTER ||
|
||||
Plugins[p]?.required ||
|
||||
Plugins[p]?.isDependency ||
|
||||
settings[p]?.enabled
|
||||
|
|
|
@ -62,6 +62,16 @@ export default definePlugin({
|
|||
replace: "return 0;"
|
||||
}
|
||||
},
|
||||
// New message requests hook
|
||||
{
|
||||
find: "useNewMessageRequestsCount:",
|
||||
predicate: () => settings.store.hideMessageRequestsCount,
|
||||
replacement: {
|
||||
match: /getNonChannelAckId\(\i\.\i\.MESSAGE_REQUESTS\).+?return /,
|
||||
replace: "$&0;"
|
||||
}
|
||||
},
|
||||
// Old message requests hook
|
||||
{
|
||||
find: "getMessageRequestsCount(){",
|
||||
predicate: () => settings.store.hideMessageRequestsCount,
|
||||
|
|
|
@ -18,7 +18,7 @@
|
|||
|
||||
import { definePluginSettings, migratePluginSettings } from "@api/Settings";
|
||||
import { Devs } from "@utils/constants";
|
||||
import definePlugin, { OptionType } from "@utils/types";
|
||||
import definePlugin, { OptionType, ReporterTestable } from "@utils/types";
|
||||
import { FluxDispatcher } from "@webpack/common";
|
||||
|
||||
const enum Intensity {
|
||||
|
@ -46,6 +46,7 @@ export default definePlugin({
|
|||
name: "PartyMode",
|
||||
description: "Allows you to use party mode cause the party never ends ✨",
|
||||
authors: [Devs.UwUDev],
|
||||
reporterTestable: ReporterTestable.None,
|
||||
settings,
|
||||
|
||||
start() {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue