diff --git a/src/equicordplugins/betterActivities/index.tsx b/src/equicordplugins/betterActivities/index.tsx index 938f2c6e..1e6524ae 100644 --- a/src/equicordplugins/betterActivities/index.tsx +++ b/src/equicordplugins/betterActivities/index.tsx @@ -349,117 +349,121 @@ export default definePlugin({ if (settings.store.allActivitiesStyle === "carousel") { return ( -
- {activity && currentActivity?.id === activity.id ? ( - - ) : ( - - )} - {activities.length > 1 && -
- {({ - onMouseEnter, - onMouseLeave - }) => { - return { - const index = activities.indexOf(currentActivity!); - if (index - 1 >= 0) { - setCurrentActivity(activities[index - 1]); - } else { - setCurrentActivity(activities[activities.length - 1]); - } - }} - > - - ; - }} - -
- {activities.map((activity, index) => ( -
setCurrentActivity(activity)} - className={`dot ${currentActivity === activity ? "selected" : ""}`} /> - ))} -
- - {({ - onMouseEnter, - onMouseLeave - }) => { - return { - const index = activities.indexOf(currentActivity!); - if (index + 1 < activities.length) { - setCurrentActivity(activities[index + 1]); - } else { - setCurrentActivity(activities[0]); - } - }} - > - = activities.length - 1} - direction="right" /> - ; - }} -
- } -
- ); - } else { - return ( -
- {activities.map((activity, index) => - index === 0 ? ( + { }}> +
+ {activity && currentActivity?.id === activity.id ? ( ) : ( + /> + ) : ( - ))} -
+ )} + {activities.length > 1 && +
+ {({ + onMouseEnter, + onMouseLeave + }) => { + return { + const index = activities.indexOf(currentActivity!); + if (index - 1 >= 0) { + setCurrentActivity(activities[index - 1]); + } else { + setCurrentActivity(activities[activities.length - 1]); + } + }} + > + + ; + }} + +
+ {activities.map((activity, index) => ( +
setCurrentActivity(activity)} + className={`dot ${currentActivity === activity ? "selected" : ""}`} /> + ))} +
+ + {({ + onMouseEnter, + onMouseLeave + }) => { + return { + const index = activities.indexOf(currentActivity!); + if (index + 1 < activities.length) { + setCurrentActivity(activities[index + 1]); + } else { + setCurrentActivity(activities[0]); + } + }} + > + = activities.length - 1} + direction="right" /> + ; + }} +
+ } +
+
+ ); + } else { + return ( + { }}> +
+ {activities.map((activity, index) => + index === 0 ? ( + ) : ( + + ))} +
+
); } }, @@ -479,7 +483,7 @@ export default definePlugin({ find: '"UserProfilePopoutBody"', replacement: { match: /(?<=(\i)\.id\)\}\)\),(\i).*?)\(0,.{0,100}\i\.activity\}\)/, - replace: ",$self.showAllActivitiesComponent({ activity: $2, user: $1 })" + replace: "$self.showAllActivitiesComponent({ activity: $2, user: $1 })" }, predicate: () => settings.store.userPopout }, diff --git a/src/equicordplugins/messageLoggerEnhanced/components/LogsButton.tsx b/src/equicordplugins/messageLoggerEnhanced/components/LogsButton.tsx index dbcc4075..2a12ee8d 100644 --- a/src/equicordplugins/messageLoggerEnhanced/components/LogsButton.tsx +++ b/src/equicordplugins/messageLoggerEnhanced/components/LogsButton.tsx @@ -16,15 +16,11 @@ * along with this program. If not, see . */ -import { LazyComponent } from "@utils/react"; -import { filters, find } from "@webpack"; +import { findComponentByCodeLazy } from "@webpack"; import { openLogModal } from "./LogsModal"; -const HeaderBarIcon = LazyComponent(() => { - const filter = filters.byCode(".HEADER_BAR_BADGE"); - return find(m => m.Icon && filter(m.Icon)).Icon; -}); +const HeaderBarIcon = findComponentByCodeLazy(".HEADER_BAR_BADGE_TOP:", '.iconBadge,"top"'); export function OpenLogsIcon() { return (