ViewIcons: Fix conflict with unread Group DMs (#3011)
This commit is contained in:
parent
211569f7f5
commit
66a75747f8
1 changed files with 3 additions and 2 deletions
|
@ -209,10 +209,11 @@ export default definePlugin({
|
|||
},
|
||||
// Group DMs top small & large icon
|
||||
{
|
||||
find: /\.recipients\.length>=2(?!<isMultiUserDM.{0,50})/,
|
||||
find: '["aria-hidden"],"aria-label":',
|
||||
replacement: {
|
||||
match: /null==\i\.icon\?.+?src:(\(0,\i\.\i\).+?\))(?=[,}])/,
|
||||
replace: (m, iconUrl) => `${m},onClick:()=>$self.openAvatar(${iconUrl})`
|
||||
// We have to check that icon is not an unread GDM in the server bar
|
||||
replace: (m, iconUrl) => `${m},onClick:()=>arguments[0]?.size!=="SIZE_48"&&$self.openAvatar(${iconUrl})`
|
||||
}
|
||||
},
|
||||
// User DMs top small icon
|
||||
|
|
Loading…
Reference in a new issue