[🐴] Minor nits (#4102)
* set a better size for `initialNumToRender` * memo list items * scroll to end on both platforms * rev
This commit is contained in:
parent
5343910570
commit
1ac13abf4d
3 changed files with 18 additions and 6 deletions
|
|
@ -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,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue