fix: add unmount cancellation guard, simplify keyExtractor, update spec

This commit is contained in:
Developer
2026-03-11 14:48:19 +08:00
parent 287a608e97
commit 4e8beae209
3 changed files with 11 additions and 11 deletions

View File

@@ -99,10 +99,10 @@ export default function HomeScreen() {
<Animated.FlatList
style={styles.listContainer}
data={rows}
keyExtractor={(row: any, index) =>
keyExtractor={(row: any) =>
row.type === 'big'
? `big-${row.item.bvid}`
: `pair-${row.left.bvid}-${row.right?.bvid ?? 'empty'}-${index}`
: `pair-${row.left.bvid}-${row.right?.bvid ?? 'empty'}`
}
contentContainerStyle={{
paddingTop: insets.top + NAV_H + 6,