mirror of
https://github.com/Equicord/Equicord.git
synced 2025-06-18 10:57:04 -04:00
Fix ViewIcons and NoProfileThemes
This commit is contained in:
parent
2e81b9aeba
commit
ed9b28febf
5 changed files with 29 additions and 34 deletions
|
@ -57,14 +57,7 @@ export default definePlugin({
|
|||
settings,
|
||||
patches: [
|
||||
{
|
||||
find: ".NITRO_BANNER,",
|
||||
replacement: {
|
||||
match: /\?\(0,\i\.jsx\)\(\i,{type:\i,shown/,
|
||||
replace: "&&$self.shouldShowBadge(arguments[0])$&"
|
||||
}
|
||||
},
|
||||
{
|
||||
find: ".banner)==null",
|
||||
find: '.banner)==null?"COMPLETE"',
|
||||
replacement: {
|
||||
match: /(?<=void 0:)\i.getPreviewBanner\(\i,\i,\i\)/,
|
||||
replace: "$self.patchBannerUrl(arguments[0])||$&"
|
||||
|
@ -109,10 +102,6 @@ export default definePlugin({
|
|||
if (this.userHasBackground(displayProfile?.userId)) return this.getImageUrl(displayProfile?.userId);
|
||||
},
|
||||
|
||||
shouldShowBadge({ displayProfile, user }: any) {
|
||||
return displayProfile?.banner && (!this.userHasBackground(user.id) || settings.store.nitroFirst);
|
||||
},
|
||||
|
||||
userHasBackground(userId: string) {
|
||||
return !!this.data?.users[userId];
|
||||
},
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue