QuestCompleter: Drop Mobile Quest Support

This commit is contained in:
thororen1234 2025-12-06 01:00:56 -05:00
parent 219695393c
commit 5825c01ed1
No known key found for this signature in database

View file

@ -20,9 +20,7 @@ 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";
@ -34,8 +32,6 @@ const ApplicationStreamingStore = findStoreLazy("ApplicationStreamingStore");
const RunningGameStore = findStoreLazy("RunningGameStore");
const QuestsStore = findByPropsLazy("getQuest");
let questIdCheck = 0;
function ToolBarHeader() {
return (
<HeaderBarButton
@ -222,34 +218,6 @@ export default definePlugin({
description: "A plugin to complete quests without having the game installed.",
authors: [Devs.amia],
settings,
patches: [
{
find: ".platformSelectorPrimary,",
predicate: () => !isPluginEnabled(questify.name),
replacement: {
match: /(?<=fullWidth:!0}\)}\):.{0,200}?secondary",)disabled:!0/,
replace: "onClick:()=>$self.mobileQuestPatch(arguments[0]?.quest?.id)"
},
},
{
find: ".platformSelectorPrimary,",
predicate: () => isPluginEnabled(questify.name),
replacement: {
match: /(?<=fullWidth:!0}\)}\):.{0,200}?secondary",.{0,150}fullWidth:!0)/,
replace: ",onClick:()=>$self.mobileQuestPatch(arguments[0]?.quest?.id)"
},
},
],
mobileQuestPatch(questId) {
if (questId === questIdCheck) return;
questIdCheck = questId;
Vencord.Webpack.Common.RestAPI.post({
url: `/quests/${questId}/enroll`,
body: {
location: 11
}
});
},
headerBarButton: {
icon: QuestIcon,
render: ToolBarHeader