Skip to content

Commit

Permalink
test again
Browse files Browse the repository at this point in the history
  • Loading branch information
byeoon committed Oct 16, 2024
1 parent 7ee8256 commit af49f2d
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 6 deletions.
9 changes: 8 additions & 1 deletion src/entry.ts
Original file line number Diff line number Diff line change
@@ -1,16 +1,23 @@
import { ClientInfoManager } from "@lib/native";
import { NavigationNative } from "./lib/metro/common";
import Developer from "./ui/settings/pages/Developer";

// This logs in the native logging implementation, e.g. logcat
console.log("Hello from Opti!");

// Make 'freeze' and 'seal' do nothing
Object.freeze = Object;
Object.seal = Object;
const navigation = NavigationNative.useNavigation();

import(".").then((m) => m.default()).catch((e) => {
console.log(e?.stack ?? e.toString());
navigation.push("VendettaCustomPage", {
title: "Welcome to Opti",
render: Developer,
});
alert([
"Failed to load Vendetta!\n",
"Failed to load Opti!\n",
`Build Number: ${ClientInfoManager.Build}`,
`Vendetta: ${__optiVersion}`,
e?.stack || e.toString(),
Expand Down
6 changes: 1 addition & 5 deletions src/lib/security.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,5 @@ import { ReactNative as RN, NavigationNative } from "@metro/common";

export function patchSecurity() {
const navigation = NavigationNative.useNavigation();

navigation.push("VendettaCustomPage", {
title: "Welcome to Opti",
render: Developer,
});
// hm.
}

0 comments on commit af49f2d

Please sign in to comment.