fix(chapters): address review comments - null starts, ticksToMs, a11y, memoize

This commit is contained in:
Uruk
2026-05-22 12:32:37 +02:00
parent 87b181b66f
commit f061e3b757
5 changed files with 39 additions and 10 deletions

View File

@@ -72,13 +72,18 @@ export function ChapterList({
<Text style={{ color: "#fff", fontSize: 17, fontWeight: "700" }}>
{t("chapters.title")}
</Text>
<Pressable onPress={onClose} hitSlop={10}>
<Pressable
onPress={onClose}
hitSlop={10}
accessibilityRole='button'
accessibilityLabel={t("chapters.close")}
>
<Ionicons name='close' size={24} color='#fff' />
</Pressable>
</View>
<FlatList
data={entries}
keyExtractor={(_, i) => String(i)}
keyExtractor={(item, index) => `${item.positionMs}-${index}`}
renderItem={({ item, index }) => {
const positionMs = item.positionMs;
const isActive = index === activeIndex;