Remove obsolete patches for old profiles (#2800)

Co-authored-by: Nuckyz <61953774+Nuckyz@users.noreply.github.com>
This commit is contained in:
v 2024-08-22 17:13:57 +02:00 committed by GitHub
parent 2bdc2f4e82
commit 44c8463496
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
13 changed files with 23 additions and 291 deletions

View file

@ -84,7 +84,7 @@ export default definePlugin({
);
},
patchPopout: ({ user }: UserProps) => {
patchProfilePopout: ({ user }: UserProps) => {
const isSelfUser = user.id === UserStore.getCurrentUser().id;
return (
<div className={isSelfUser ? "vc-uvs-popout-margin-self" : ""}>
@ -94,21 +94,7 @@ export default definePlugin({
},
patches: [
// above message box
{
find: ".popularApplicationCommandIds,",
replacement: {
match: /(?<=,)(?=!\i&&!\i&&.{0,50}setNote:)/,
replace: "$self.patchPopout(arguments[0]),",
}
},
// below username
{
find: ".Messages.MUTUAL_GUILDS_WITH_END_COUNT", // Lazy-loaded
replacement: {
match: /\.body.+?displayProfile:\i}\),/,
replace: "$&$self.patchModal(arguments[0]),",
}
}
// @TODO Maybe patch UserVoiceShow in simplified profile popout
// @TODO Patch new profile modal
],
});