mirror of
https://github.com/Equicord/Equicord.git
synced 2025-06-20 03:47:01 -04:00
Fixes
This commit is contained in:
parent
b27ddc222a
commit
15c1af2b6b
2 changed files with 38 additions and 7 deletions
|
@ -206,11 +206,17 @@ export default definePlugin({
|
||||||
},
|
},
|
||||||
// active now list
|
// active now list
|
||||||
{
|
{
|
||||||
find: "getUserAffinitiesUserIds(){",
|
find: "NOW_PLAYING_CARD_HOVERED,",
|
||||||
replacement: {
|
replacement: [
|
||||||
match: /return (\i.affinityUserIds)/,
|
{
|
||||||
replace: "return new Set(Array.from($1).filter(id => !$self.shouldHideUser(id)))"
|
match: /(\{party:)(\i)(.*?\}=\i)/,
|
||||||
}
|
replace: "$1eq_$2$3,$2=$self.partyFilterIgnoredUsers(eq_$2)",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
match: /\{party:(\i).*,\i=\i\(\)\(\i,\i\);/,
|
||||||
|
replace: "$&if($self.shoudBeNull($1)){return null;}"
|
||||||
|
}
|
||||||
|
]
|
||||||
},
|
},
|
||||||
// mutual friends list in user profile
|
// mutual friends list in user profile
|
||||||
{
|
{
|
||||||
|
@ -220,5 +226,30 @@ export default definePlugin({
|
||||||
replace: "$1if($2 != undefined) return $2.filter(u => !$self.shouldHideUser(u.key))"
|
replace: "$1if($2 != undefined) return $2.filter(u => !$self.shouldHideUser(u.key))"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
]
|
],
|
||||||
|
partyFilterIgnoredUsers,
|
||||||
|
shoudBeNull
|
||||||
});
|
});
|
||||||
|
|
||||||
|
// From https://github.com/Vendicated/Vencord/blob/29060f9ec9359a036fa83e61b5378a19789481dd/src/plugins/HideInActiveNow/index.ts
|
||||||
|
|
||||||
|
function partyFilterIgnoredUsers(party) {
|
||||||
|
const filteredPartyMembers = party.partiedMembers.filter(user => shouldHideUser(user));
|
||||||
|
const filteredPartyMembersLength = filteredPartyMembers.length;
|
||||||
|
if (filteredPartyMembersLength === 0) return { ...party, partiedMembers: [] };
|
||||||
|
|
||||||
|
const filteredParty = {
|
||||||
|
...party,
|
||||||
|
partiedMembers: filteredPartyMembers,
|
||||||
|
currentActivities: party.currentActivities,
|
||||||
|
priorityMembers: party.priorityMembers,
|
||||||
|
voiceChannels: party.voiceChannels
|
||||||
|
};
|
||||||
|
return filteredParty;
|
||||||
|
}
|
||||||
|
|
||||||
|
function shoudBeNull(party) {
|
||||||
|
if (!party) return true;
|
||||||
|
if (party.partiedMembers.length === 0) return true;
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
|
@ -23,7 +23,7 @@ import { findStoreLazy } from "@webpack";
|
||||||
import { Constants, FluxDispatcher, GuildStore, RelationshipStore, RestAPI, SnowflakeUtils, UserStore } from "@webpack/common";
|
import { Constants, FluxDispatcher, GuildStore, RelationshipStore, RestAPI, SnowflakeUtils, UserStore } from "@webpack/common";
|
||||||
import { Settings } from "Vencord";
|
import { Settings } from "Vencord";
|
||||||
|
|
||||||
const UserAffinitiesStore = findStoreLazy("UserAffinitiesStore");
|
const UserAffinitiesStore = findStoreLazy("UserAffinitiesV2Store");
|
||||||
|
|
||||||
export default definePlugin({
|
export default definePlugin({
|
||||||
name: "ImplicitRelationships",
|
name: "ImplicitRelationships",
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue