ValidUser: fix rendering old mentions when message is edited
Fixes https://github.com/Vendicated/Vencord/issues/2451
This commit is contained in:
parent
1f1c80c5f3
commit
f6765818d2
2 changed files with 3 additions and 2 deletions
|
@ -83,7 +83,7 @@ export default definePlugin({
|
||||||
// Rendering
|
// Rendering
|
||||||
{
|
{
|
||||||
match: /"renderRow",(\i)=>{(?<="renderDM",.+?(\i\.default),\{channel:.+?)/,
|
match: /"renderRow",(\i)=>{(?<="renderDM",.+?(\i\.default),\{channel:.+?)/,
|
||||||
replace: "$&if($self.isChannelIndex($1.section, $1.row))return $self.renderChannel($1.section,$1.row,$2);"
|
replace: "$&if($self.isChannelIndex($1.section, $1.row))return $self.renderChannel($1.section,$1.row,$2)();"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
match: /"renderSection",(\i)=>{/,
|
match: /"renderSection",(\i)=>{/,
|
||||||
|
|
|
@ -23,7 +23,7 @@ import { sleep } from "@utils/misc";
|
||||||
import { Queue } from "@utils/Queue";
|
import { Queue } from "@utils/Queue";
|
||||||
import definePlugin from "@utils/types";
|
import definePlugin from "@utils/types";
|
||||||
import { Constants, FluxDispatcher, RestAPI, UserProfileStore, UserStore, useState } from "@webpack/common";
|
import { Constants, FluxDispatcher, RestAPI, UserProfileStore, UserStore, useState } from "@webpack/common";
|
||||||
import type { ComponentType, ReactNode } from "react";
|
import { type ComponentType, type ReactNode } from "react";
|
||||||
|
|
||||||
// LYING to the type checker here
|
// LYING to the type checker here
|
||||||
const UserFlags = Constants.UserFlags as Record<string, number>;
|
const UserFlags = Constants.UserFlags as Record<string, number>;
|
||||||
|
@ -205,6 +205,7 @@ export default definePlugin({
|
||||||
return (
|
return (
|
||||||
<ErrorBoundary noop>
|
<ErrorBoundary noop>
|
||||||
<MentionWrapper
|
<MentionWrapper
|
||||||
|
key={"mention" + data.userId}
|
||||||
RoleMention={RoleMention}
|
RoleMention={RoleMention}
|
||||||
UserMention={UserMention}
|
UserMention={UserMention}
|
||||||
data={data}
|
data={data}
|
||||||
|
|
Loading…
Reference in a new issue