mirror of
https://github.com/Equicord/Equicord.git
synced 2025-04-01 13:11:57 -04:00
BetterActivities: QOL Fixes
This commit is contained in:
parent
aa6141f3a7
commit
3b470c843c
1 changed files with 12 additions and 4 deletions
|
@ -242,9 +242,11 @@ export default definePlugin({
|
||||||
|
|
||||||
settings,
|
settings,
|
||||||
|
|
||||||
patchActivityList: ({ activities, user }: { activities: Activity[], user: User; }): JSX.Element | null => {
|
patchActivityList: ({ activities, user, hideTooltip }: { activities: Activity[], user: User, hideTooltip: boolean; }): JSX.Element | null => {
|
||||||
const icons: ActivityListIcon[] = [];
|
const icons: ActivityListIcon[] = [];
|
||||||
|
|
||||||
|
if (user.bot || hideTooltip) return null;
|
||||||
|
|
||||||
const applicationIcons = getApplicationIcons(activities);
|
const applicationIcons = getApplicationIcons(activities);
|
||||||
if (applicationIcons.length) {
|
if (applicationIcons.length) {
|
||||||
const compareImageSource = (a: ApplicationIcon, b: ApplicationIcon) => {
|
const compareImageSource = (a: ApplicationIcon, b: ApplicationIcon) => {
|
||||||
|
@ -383,8 +385,11 @@ export default definePlugin({
|
||||||
onMouseLeave={onMouseLeave}
|
onMouseLeave={onMouseLeave}
|
||||||
onClick={() => {
|
onClick={() => {
|
||||||
const index = activities.indexOf(currentActivity!);
|
const index = activities.indexOf(currentActivity!);
|
||||||
if (index - 1 >= 0)
|
if (index - 1 >= 0) {
|
||||||
setCurrentActivity(activities[index - 1]);
|
setCurrentActivity(activities[index - 1]);
|
||||||
|
} else {
|
||||||
|
setCurrentActivity(activities[activities.length - 1]);
|
||||||
|
}
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
<Caret
|
<Caret
|
||||||
|
@ -411,8 +416,11 @@ export default definePlugin({
|
||||||
onMouseLeave={onMouseLeave}
|
onMouseLeave={onMouseLeave}
|
||||||
onClick={() => {
|
onClick={() => {
|
||||||
const index = activities.indexOf(currentActivity!);
|
const index = activities.indexOf(currentActivity!);
|
||||||
if (index + 1 < activities.length)
|
if (index + 1 < activities.length) {
|
||||||
setCurrentActivity(activities[index + 1]);
|
setCurrentActivity(activities[index + 1]);
|
||||||
|
} else {
|
||||||
|
setCurrentActivity(activities[0]);
|
||||||
|
}
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
<Caret
|
<Caret
|
||||||
|
@ -470,7 +478,7 @@ export default definePlugin({
|
||||||
// Show all activities in the user popout/sidebar
|
// Show all activities in the user popout/sidebar
|
||||||
find: '"UserProfilePopoutBody"',
|
find: '"UserProfilePopoutBody"',
|
||||||
replacement: {
|
replacement: {
|
||||||
match: /(?<=user:(\i).*?\i\.id\)\}\)\),(\i).*?)\(0,\i\.jsx\).{0,100}\i\.activity\}\)/,
|
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
|
predicate: () => settings.store.userPopout
|
||||||
|
|
Loading…
Add table
Reference in a new issue