about summary refs log tree commit diff
path: root/src/screens/Messages/List/ChatListItem.tsx
diff options
context:
space:
mode:
Diffstat (limited to 'src/screens/Messages/List/ChatListItem.tsx')
-rw-r--r--src/screens/Messages/List/ChatListItem.tsx11
1 files changed, 9 insertions, 2 deletions
diff --git a/src/screens/Messages/List/ChatListItem.tsx b/src/screens/Messages/List/ChatListItem.tsx
index 791dc82c0..9a9a78ba7 100644
--- a/src/screens/Messages/List/ChatListItem.tsx
+++ b/src/screens/Messages/List/ChatListItem.tsx
@@ -25,12 +25,17 @@ import {Bell2Off_Filled_Corner0_Rounded as BellStroke} from '#/components/icons/
 import {useMenuControl} from '#/components/Menu'
 import {Text} from '#/components/Typography'
 
-export function ChatListItem({convo}: {convo: ChatBskyConvoDefs.ConvoView}) {
+export let ChatListItem = ({
+  convo,
+}: {
+  convo: ChatBskyConvoDefs.ConvoView
+}): React.ReactNode => {
   const {currentAccount} = useSession()
+  const moderationOpts = useModerationOpts()
+
   const otherUser = convo.members.find(
     member => member.did !== currentAccount?.did,
   )
-  const moderationOpts = useModerationOpts()
 
   if (!otherUser || !moderationOpts) {
     return null
@@ -45,6 +50,8 @@ export function ChatListItem({convo}: {convo: ChatBskyConvoDefs.ConvoView}) {
   )
 }
 
+ChatListItem = React.memo(ChatListItem)
+
 function ChatListItemReady({
   convo,
   profile: profileUnshadowed,