Skip to content

Commit

Permalink
feat: support 263+ clients
Browse files Browse the repository at this point in the history
  • Loading branch information
PalmDevs committed Jan 22, 2025
1 parent eb424ae commit f1ba456
Show file tree
Hide file tree
Showing 4 changed files with 2 additions and 75 deletions.
1 change: 1 addition & 0 deletions src/entry.ts
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@ if (typeof globalThis.__r !== "undefined") {
_requireFunc = function patchedRequire(a: number) {
// Initializing index.ts(x)
if (a === 0) {
if (window.modules instanceof Map) window.modules = Object.fromEntries(window.modules);
onceIndexRequired(v);
_requireFunc = v;
} else return v(a);
Expand Down
2 changes: 0 additions & 2 deletions src/lib/ui/settings/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
import { lazy } from "react";
import type { ImageURISource } from "react-native";

import { patchPanelUI } from "./patches/panel";
import { patchTabsUI } from "./patches/tabs";

export interface RowConfig {
Expand Down Expand Up @@ -32,7 +31,6 @@ export function registerSection(section: { name: string; items: RowConfig[]; })
export function patchSettings() {
const unpatches = new Array<() => boolean>;

patchPanelUI(unpatches);
patchTabsUI(unpatches);

return () => unpatches.forEach(u => u());
Expand Down
72 changes: 0 additions & 72 deletions src/lib/ui/settings/patches/panel.tsx

This file was deleted.

2 changes: 1 addition & 1 deletion src/metro/internals/modules.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import { ModuleFlags, ModulesMapInternal } from "./enums";
const { before, instead } = require("spitroast");

export const metroModules: Metro.ModuleList = window.modules;
const metroRequire: Metro.Require = window.__r;
const metroRequire = (id: string | number) => window.__r(+id);

// eslint-disable-next-line func-call-spacing
const moduleSubscriptions = new Map<number, Set<() => void>>();
Expand Down

0 comments on commit f1ba456

Please sign in to comment.