mirror of
https://github.com/Equicord/Equicord.git
synced 2025-01-31 11:43:32 -05:00
Shorten match
This commit is contained in:
parent
1cca020b8f
commit
b0880ba7af
1 changed files with 2 additions and 2 deletions
|
@ -620,7 +620,7 @@ export default definePlugin({
|
||||||
{
|
{
|
||||||
find: ".removeMosaicItemHoverButton",
|
find: ".removeMosaicItemHoverButton",
|
||||||
replacement: {
|
replacement: {
|
||||||
match: /(\i=(\i)=>{)(.{1,6500}isSingleMosaicItem)/,
|
match: /(\i=(\i)=>{)(.{1,3550}isSingleMosaicItem)/,
|
||||||
replace: "$1 let forceUpdate=Vencord.Util.useForceUpdater();$self.patchAttachments($2,forceUpdate);$3"
|
replace: "$1 let forceUpdate=Vencord.Util.useForceUpdater();$self.patchAttachments($2,forceUpdate);$3"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
@ -701,7 +701,7 @@ export default definePlugin({
|
||||||
attachments: new Map<string, LoggedAttachment>(),
|
attachments: new Map<string, LoggedAttachment>(),
|
||||||
patchAttachments(props: { attachment: LoggedAttachment, message: LoggedMessage; }, forceUpdate: () => void) {
|
patchAttachments(props: { attachment: LoggedAttachment, message: LoggedMessage; }, forceUpdate: () => void) {
|
||||||
const { attachment, message } = props;
|
const { attachment, message } = props;
|
||||||
if (!message.deleted || !LoggedMessageManager.hasMessageInLogs(message.id))
|
if (!message?.deleted || !LoggedMessageManager.hasMessageInLogs(message.id))
|
||||||
return; // Flogger.log("ignoring", message.id);
|
return; // Flogger.log("ignoring", message.id);
|
||||||
|
|
||||||
if (this.attachments.has(attachment.id))
|
if (this.attachments.has(attachment.id))
|
||||||
|
|
Loading…
Reference in a new issue