Skip to content

Commit

Permalink
finish this stupit pluing
Browse files Browse the repository at this point in the history
  • Loading branch information
Rico040 committed Jun 6, 2024
1 parent faf6cd8 commit a5b7f7b
Showing 1 changed file with 6 additions and 7 deletions.
13 changes: 6 additions & 7 deletions plugins/action-sheet-finder/src/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,21 +4,20 @@ import { getAssetIDByName } from '@vendetta/ui/assets';
import { findByProps } from "@vendetta/metro";

const LazyActionSheet = findByProps("openLazy", "hideActionSheet");
let unpatchOpenLazy: () => boolean;

function SheetOutput(text) {
console.log("[ActionSheetFinder] Found ActionSheet: " + text);
showToast("[ActionSheetFinder] Found ActionSheet: " + text, getAssetIDByName("Check"))
}

const unpatchOpenLazy = before("openLazy", LazyActionSheet, ([_, key]) => {
// console.log(this)
return SheetOutput(key);
});

export default {
onLoad() {
onLoad: () => {
console.log("[ActionSheetFinder] Hello world!")
unpatchOpenLazy = before('openLazy', LazyActionSheet, ([key]) => {
console.log(this)
return SheetOutput(key);
});
},
onUnload: unpatchOpenLazy
onUnload: () => {unpatchOpenLazy()}
};

0 comments on commit a5b7f7b

Please sign in to comment.