QuestCompleter: Fix Conflict

This commit is contained in:
thororen1234 2025-12-06 00:49:53 -05:00
parent fe1c27d4ab
commit 51fd7986c6
No known key found for this signature in database
4 changed files with 25 additions and 11 deletions

View file

@ -4,8 +4,8 @@
* SPDX-License-Identifier: GPL-3.0-or-later
*/
import { Settings } from "@api/Settings";
import { tarExtMatcher } from "@plugins/anonymiseFileNames";
import { isPluginEnabled } from "@api/PluginManager";
import anonymiseFileNames, { tarExtMatcher } from "@plugins/anonymiseFileNames";
import { Devs } from "@utils/constants";
import definePlugin, { ReporterTestable } from "@utils/types";
import { CloudUpload } from "@vencord/discord-types";
@ -40,7 +40,7 @@ export default definePlugin({
replace: "$&$1.forEach($self.fixExt);"
}
],
predicate: () => !Settings.plugins.AnonymiseFileNames.enabled,
predicate: () => !isPluginEnabled(anonymiseFileNames.name),
},
],
fixExt(upload: CloudUpload) {

View file

@ -20,7 +20,9 @@ import "./style.css";
import { HeaderBarButton } from "@api/HeaderBar";
import { showNotification } from "@api/Notifications";
import { isPluginEnabled } from "@api/PluginManager";
import { definePluginSettings } from "@api/Settings";
import questify from "@equicordplugins/questify";
import { Devs } from "@utils/constants";
import { getTheme, Theme } from "@utils/discord";
import definePlugin, { OptionType } from "@utils/types";
@ -223,10 +225,18 @@ export default definePlugin({
patches: [
{
find: ".platformSelectorPrimary,",
replacement: {
match: /(?<=questId:(\i\.id).*?"secondary",)disabled:!0/,
replace: "onClick:()=>$self.mobileQuestPatch($1)"
},
replacement: [
{
match: /(?<=fullWidth:!0}\)}\):.{0,200}?secondary",)disabled:!0/,
replace: "onClick:()=>$self.mobileQuestPatch(arguments[0]?.quest?.id),",
predicate: () => !isPluginEnabled(questify.name),
},
{
match: /(?<=fullWidth:!0}\)}\):.{0,200}?secondary",.{0,150}fullWidth:!0)/,
replace: ",onClick:()=>$self.mobileQuestPatch(arguments[0]?.quest?.id)",
predicate: () => isPluginEnabled(questify.name),
},
],
},
],
mobileQuestPatch(questId) {

View file

@ -8,8 +8,10 @@ import "./style.css";
import { findGroupChildrenByChildId, NavContextMenuPatchCallback } from "@api/ContextMenu";
import { DataStore } from "@api/index";
import { definePluginSettings, Settings } from "@api/Settings";
import { isPluginEnabled } from "@api/PluginManager";
import { definePluginSettings } from "@api/Settings";
import { Button, ErrorBoundary, Heading, TextButton } from "@components/index";
import mentionAvatars from "@plugins/mentionAvatars";
import { Devs, EquicordDevs } from "@utils/constants";
import { ModalCloseButton, ModalContent, ModalFooter, ModalHeader, ModalProps, ModalRoot, openModal } from "@utils/index";
import definePlugin, { OptionType } from "@utils/types";
@ -934,7 +936,7 @@ export default definePlugin({
{
match: /(?<=onContextMenu:\i\},\i\),{children:)/,
replace: "showMeYourNameMention??",
predicate: () => !Settings.plugins.MentionAvatars.enabled,
predicate: () => !isPluginEnabled(mentionAvatars.name),
}
]
},

View file

@ -18,9 +18,11 @@
import "./styles.css";
import { definePluginSettings, Settings } from "@api/Settings";
import { isPluginEnabled } from "@api/PluginManager";
import { definePluginSettings } from "@api/Settings";
import { classNameFactory } from "@api/Styles";
import { Button } from "@components/Button";
import fullVcPfp from "@equicordplugins/fullVcPfp";
import { Devs } from "@utils/constants";
import definePlugin, { OptionType } from "@utils/types";
@ -67,7 +69,7 @@ export default definePlugin({
},
{
find: "\"data-selenium-video-tile\":",
predicate: () => !Settings.plugins.FullVCPFP.enabled && settings.store.voiceBackground,
predicate: () => !isPluginEnabled(fullVcPfp.name) && settings.store.voiceBackground,
replacement: [
{
match: /(?<=function\((\i),\i\)\{)(?=let.{20,40},style:)/,