Key Inspector: add showToast to Eval scope

This commit is contained in:
everestmcarthur 2026-08-01 21:35:08 -04:00
parent 19e2316724
commit ab79f69e68
2 changed files with 4 additions and 1 deletions

View file

@ -2,6 +2,7 @@ import { findByProps, findByName, findByTypeName, findByStoreName, findByPropsAl
import { React, ReactNative, FluxDispatcher } from "@vendetta/metro/common"; import { React, ReactNative, FluxDispatcher } from "@vendetta/metro/common";
import { instead, before, after } from "@vendetta/patcher"; import { instead, before, after } from "@vendetta/patcher";
import { getAssetIDByName } from "@vendetta/ui/assets"; import { getAssetIDByName } from "@vendetta/ui/assets";
import { showToast } from "@vendetta/ui/toasts";
import { rawFind, rawFindByTypeName, rawFindByProps, rawFindByName, rawFindByStoreName } from "@shared/lib/rawFind"; import { rawFind, rawFindByTypeName, rawFindByProps, rawFindByName, rawFindByStoreName } from "@shared/lib/rawFind";
declare const window: any; declare const window: any;
@ -86,6 +87,7 @@ export async function runEval(rawCode: string): Promise<string> {
"before", "before",
"after", "after",
"getAssetIDByName", "getAssetIDByName",
"showToast",
"React", "React",
"ReactNative", "ReactNative",
"FluxDispatcher", "FluxDispatcher",
@ -110,6 +112,7 @@ export async function runEval(rawCode: string): Promise<string> {
before, before,
after, after,
getAssetIDByName, getAssetIDByName,
showToast,
React, React,
ReactNative, ReactNative,
FluxDispatcher, FluxDispatcher,

View file

@ -89,7 +89,7 @@ function EvalSection() {
outside the sandbox. In scope: findByProps/findByName/ outside the sandbox. In scope: findByProps/findByName/
findByTypeName/findByStoreName/findByPropsAll/findByNameAll/find, the raw* findByTypeName/findByStoreName/findByPropsAll/findByNameAll/find, the raw*
passive variants (rawFind/rawFindByTypeName/rawFindByProps/rawFindByName/ passive variants (rawFind/rawFindByTypeName/rawFindByProps/rawFindByName/
rawFindByStoreName), instead/before/after, getAssetIDByName, React, ReactNative, rawFindByStoreName), instead/before/after, getAssetIDByName, showToast, React, ReactNative,
FluxDispatcher, and window. Nothing runs until you tap the button. FluxDispatcher, and window. Nothing runs until you tap the button.
</Text> </Text>
</View> </View>