1
0
mirror of https://github.com/tooot-app/app synced 2025-06-05 22:19:13 +02:00

Clean up react memo

This commit is contained in:
Zhiyuan Zheng
2022-04-30 21:47:17 +02:00
parent f93d6f7db8
commit 293447f65c
8 changed files with 93 additions and 82 deletions

View File

@ -10,7 +10,10 @@ import { useTranslation } from 'react-i18next'
import { StyleSheet, Text, View } from 'react-native'
export interface Props {
status: Mastodon.Status
status: Pick<
Mastodon.Status,
'id' | 'edited_at' | 'reblogs_count' | 'favourites_count'
>
highlighted: boolean
}
@ -125,6 +128,7 @@ const TimelineFeedback = React.memo(
)
},
(prev, next) =>
prev.status.edited_at === next.status.edited_at &&
prev.status.reblogs_count === next.status.reblogs_count &&
prev.status.favourites_count === next.status.favourites_count
)