Skip to content

Commit

Permalink
(improvement)working on crash fix, updated all tweaks, fixed some com…
Browse files Browse the repository at this point in the history
…mand bugs
  • Loading branch information
byeoon committed May 8, 2024
1 parent 5494e93 commit 9eb03ab
Show file tree
Hide file tree
Showing 16 changed files with 22 additions and 58 deletions.
28 changes: 14 additions & 14 deletions dist/vendetta.js

Large diffs are not rendered by default.

4 changes: 1 addition & 3 deletions src/entry.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,9 @@ console.log("Opti has loaded!");
Object.freeze = Object;
Object.seal = Object;

// todo: make this shorter
import(".").then((m) => m.default()).catch((e) => {
console.log(e?.stack ?? e.toString());
alert([
"Opti failed to initialize. Some parts may not function properly.\n",
alert(["Opti failed to initialize. Some parts may not function properly.\n",
`Build Number: ${ClientInfoManager.Build}`,
`Opti Version: ${__vendettaVersion}`,
e?.stack || e.toString(),
Expand Down
3 changes: 1 addition & 2 deletions src/lib/badge/badges.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,5 @@ export function patchBadges()
// aliucord
// enmity
// 2x 3rd party plugins
// and more soon.
console.log("object object is not a function in String, fuck you, now its gone. no more strings to complain about.");
console.log("Badge component failed to load since it is not implomented yet.");
}
2 changes: 0 additions & 2 deletions src/lib/command/index.ts
Original file line number Diff line number Diff line change
@@ -1,13 +1,11 @@
import { registerCommand } from "../commands";
import debug from "./debug";
import reload from "./reload";
import woah from "./woah";

export function initCustomCommands(): void {
const customCommands = [
...debug,
...reload,
...woah,
];
registerCommand(customCommands);
}
Expand Down
16 changes: 0 additions & 16 deletions src/lib/command/woah.tsx

This file was deleted.

2 changes: 0 additions & 2 deletions src/lib/commands.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,9 @@ export function registerCommand(command: ApplicationCommand[]): void {
displayDescription: cmd.description,
type: ApplicationCommandType.CHAT,
inputType: ApplicationCommandInputType.BUILT_IN,
applicationId: "Opti",
...cmd,
__isOpti: true,
};

}
commands.push(...command);
}
Expand Down
3 changes: 3 additions & 0 deletions src/lib/metro/filters.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { MetroModules, PropsFinder, PropsFinderAll } from "@types";
import { getDebugInfo } from "../debug";

// Metro require
declare const __r: (moduleId: number) => any;
Expand All @@ -25,7 +26,9 @@ for (const key in window.modules) {
}
}


// Function to filter through modules
const filterModulesFix = Function.prototype.toString();
const filterModules = (modules: MetroModules, single = false) => (filter: (m: any) => boolean) => {
const found = [];

Expand Down
1 change: 0 additions & 1 deletion src/lib/tweak/HideDumbButtons.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ export function hideDumbButtons() {
}

export function unloadHideButtons() {
console.log("TweakManager has unloaded HideUnneccesaryButtons.");
unpatch;
}

2 changes: 1 addition & 1 deletion src/lib/tweak/enableAppIcons.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ export function appIcons() {
}

export function unloadAppIcons() {
console.log("TweakManager has unloaded FreeAppIcons.");

}


Expand Down
9 changes: 0 additions & 9 deletions src/lib/tweak/enableExperiments.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ export function enableExperiments() {
console.log("TweakManager has loaded EnableExperiments.");
try {
User.getCurrentUser().flags |= 1;

(User as any)._dispatcher._actionHandlers
._computeOrderedActionHandlers("OVERLAY_INITIALIZE")
//@ts-ignore
Expand All @@ -27,13 +26,5 @@ export function enableExperiments() {
}

export function unloadEnableExperiments() {
console.log("TweakManager has unloaded EnableExperiments.");
FluxDispatcher.unsubscribe("CONNECTION_OPEN");
}

// idfk what this does rn
function event() {
FluxDispatcher.unsubscribe("CONNECTION_OPEN", event);
enableExperiments();
};

1 change: 0 additions & 1 deletion src/lib/tweak/removeDelete.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ export function removeDeletePrompt() {
}

export function unloadRemoveDelete() {
console.log("TweakManager has unloaded RemoveDeletePrompt.");
unpatch;
}

1 change: 0 additions & 1 deletion src/lib/tweak/silentTyping.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ export function silentTyping() {
}

export function unloadSilentTyping() {
console.log("TweakManager has unloaded SilentTyping.");
patches.forEach(unpatch => unpatch());
}

Expand Down
3 changes: 1 addition & 2 deletions src/lib/tweak/trustURL.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ export function trustURL() {

export function unloadTrustURL()
{
console.log("TweakManager has unloaded TrustURLs.");
for(const unpatch of patches)
unpatch();
unpatch();
}
1 change: 0 additions & 1 deletion src/ui/settings/components/PluginCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ import { getAssetIDByName } from "@ui/assets";
import { showToast } from "@ui/toasts";
import { showConfirmationAlert } from "@ui/alerts";
import Card, { CardWrapper } from "@ui/settings/components/Card";
import { semanticColors } from "@/ui/color";

async function stopThenStart(plugin: Plugin, callback: Function) {
if (plugin.enabled) stopPlugin(plugin.id, false);
Expand Down
1 change: 1 addition & 0 deletions src/ui/settings/components/SettingsSection.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ const { FormRow, FormSection, FormDivider } = Forms;

export default function SettingsSection() {
const navigation = NavigationNative.useNavigation();
//@ts-ignore
useProxy(settings);

const screens = getRenderableScreens()
Expand Down
3 changes: 0 additions & 3 deletions src/ui/settings/pages/General.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,10 @@ import { Forms, Summary, ErrorBoundary } from "@ui/components";
import settings from "@lib/settings";
import { loaderConfig } from "@lib/settings";
import AssetBrowser from "@ui/settings/pages/AssetBrowser";
import TweakManager from "@ui/settings/pages/TweakManager";
import Version from "@ui/settings/components/Version";
import { connectToDebugger } from "@lib/debug";
import { getPlugins } from "@/lib/plugins";
import { getThemes } from "@/lib/themes";
import { clipboard } from "@metro/common";
import { showToast } from "@/ui/toasts";

const { FormRow, FormSwitchRow, FormSection, FormDivider, FormInput } = Forms;
const { hideActionSheet } = findByProps("openLazy", "hideActionSheet");
Expand Down

0 comments on commit 9eb03ab

Please sign in to comment.