Mark TimelineItem memo() to fix send perf regression
This commit is contained in:
parent
6f67a57e8a
commit
30a913161d
1 changed files with 3 additions and 3 deletions
|
@ -2,7 +2,7 @@
|
||||||
// SPDX-License-Identifier: AGPL-3.0-only
|
// SPDX-License-Identifier: AGPL-3.0-only
|
||||||
|
|
||||||
import type { ReactChild, RefObject } from 'react';
|
import type { ReactChild, RefObject } from 'react';
|
||||||
import React from 'react';
|
import React, { memo } from 'react';
|
||||||
|
|
||||||
import type { LocalizerType, ThemeType } from '../../types/Util';
|
import type { LocalizerType, ThemeType } from '../../types/Util';
|
||||||
|
|
||||||
|
@ -184,7 +184,7 @@ export type PropsType = PropsLocalType &
|
||||||
| 'shouldHideMetadata'
|
| 'shouldHideMetadata'
|
||||||
>;
|
>;
|
||||||
|
|
||||||
export function TimelineItem({
|
export const TimelineItem = memo(function TimelineItem({
|
||||||
containerElementRef,
|
containerElementRef,
|
||||||
conversationId,
|
conversationId,
|
||||||
getPreferredBadge,
|
getPreferredBadge,
|
||||||
|
@ -375,4 +375,4 @@ export function TimelineItem({
|
||||||
}
|
}
|
||||||
|
|
||||||
return itemContents;
|
return itemContents;
|
||||||
}
|
});
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue