Skip to content

Commit

Permalink
Its back!!
Browse files Browse the repository at this point in the history
  • Loading branch information
E-boi committed Mar 12, 2023
1 parent 434a072 commit ab5f737
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 14 deletions.
33 changes: 19 additions & 14 deletions plugins/customrpc/components/UserActivities.tsx
Original file line number Diff line number Diff line change
@@ -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"),
Expand All @@ -21,21 +21,26 @@ export default () => {
(ActivityStore!.getActivities as AnyFunction)(),
) as unknown[];

if (!Scroller) return null;

return (
<div className={`${classes.profileColors} rprpc-activities`}>
{activities?.map(
(a) =>
UserActivity && (
<UserActivity
activity={a}
className="rprpc-activity"
source="Profile Modal"
type="ProfileV2"
useStoreStream={false}
user={(user?.getCurrentUser as AnyFunction)()}
/>
),
)}
{/* eslint-disable-next-line new-cap */}
{Scroller({
children: activities?.map(
(a) =>
UserActivity && (
<UserActivity
activity={a}
className="rprpc-activity"
source="Profile Modal"
type="ProfileV2"
useStoreStream={false}
user={(user?.getCurrentUser as AnyFunction)()}
/>
),
),
})}
</div>
);
};
15 changes: 15 additions & 0 deletions plugins/customrpc/components/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit ab5f737

Please sign in to comment.