Fixes For BetterActivities

This commit is contained in:
thororen1234 2025-03-27 11:44:36 -04:00
parent f54fdd14a2
commit 5e337d628e
No known key found for this signature in database
2 changed files with 109 additions and 109 deletions

View file

@ -349,6 +349,7 @@ export default definePlugin({
if (settings.store.allActivitiesStyle === "carousel") {
return (
<ErrorBoundary noop onError={() => { }}>
<div style={{ display: "flex", flexDirection: "column" }}>
{activity && currentActivity?.id === activity.id ? (
<ActivityView
@ -431,9 +432,11 @@ export default definePlugin({
</div>
}
</div>
</ErrorBoundary>
);
} else {
return (
<ErrorBoundary noop onError={() => { }}>
<div
style={{
display: "flex",
@ -460,6 +463,7 @@ export default definePlugin({
/>
))}
</div>
</ErrorBoundary>
);
}
},
@ -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
},

View file

@ -16,15 +16,11 @@
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
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 (