mirror of
https://github.com/streamyfin/streamyfin.git
synced 2026-05-23 07:16:36 +01:00
fix(chapters): address review comments - null starts, ticksToMs, a11y, memoize
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user