From ab5f73757a08b59d1a8fca3c257751ea905db1c0 Mon Sep 17 00:00:00 2001 From: pog who? <54505527+E-boi@users.noreply.github.com> Date: Sat, 11 Mar 2023 23:33:55 -0500 Subject: [PATCH] Its back!! --- .../customrpc/components/UserActivities.tsx | 33 +++++++++++-------- plugins/customrpc/components/index.ts | 15 +++++++++ 2 files changed, 34 insertions(+), 14 deletions(-) diff --git a/plugins/customrpc/components/UserActivities.tsx b/plugins/customrpc/components/UserActivities.tsx index c366afc..a280d4e 100644 --- a/plugins/customrpc/components/UserActivities.tsx +++ b/plugins/customrpc/components/UserActivities.tsx @@ -1,6 +1,6 @@ import { webpack } from "replugged"; import { AnyFunction, ObjectExports } from "replugged/dist/types"; -import { UserActivity } from "."; +import { Scroller, UserActivity } from "."; const useStateFromStoreRaw = await webpack.waitForModule( webpack.filters.bySource("useStateFromStores"), @@ -21,21 +21,26 @@ export default () => { (ActivityStore!.getActivities as AnyFunction)(), ) as unknown[]; + if (!Scroller) return null; + return (
- {activities?.map( - (a) => - UserActivity && ( - - ), - )} + {/* eslint-disable-next-line new-cap */} + {Scroller({ + children: activities?.map( + (a) => + UserActivity && ( + + ), + ), + })}
); }; diff --git a/plugins/customrpc/components/index.ts b/plugins/customrpc/components/index.ts index 4dd5da3..1d9fbbb 100644 --- a/plugins/customrpc/components/index.ts +++ b/plugins/customrpc/components/index.ts @@ -22,6 +22,21 @@ export const FormItemRaw = FormItemMod && Object.values(FormItemMod).find((x) => x?.render?.toString()?.includes("titleClassName")); +const ScrollerMod = webpack.getBySource( + '"children","className","dir","orientation","paddingFix","fade","onScroll","style"', +); + +export const Scroller: undefined | FC<{ children: ReactNode }> = + (ScrollerMod && + Object.values(ScrollerMod).find((x) => + x?.render + ?.toString() + ?.includes( + '"children","className","dir","orientation","paddingFix","fade","onScroll","style"', + ), + )) || + undefined; + export const SelectMenuRaw = webpack.getFunctionBySource< FC<{ className?: string;