fix: rn downloads

This commit is contained in:
Fredrik Burmester
2025-10-01 15:25:16 +02:00
parent 6fc4c33759
commit 32c01c6f89
12 changed files with 222 additions and 197 deletions

View File

@@ -47,19 +47,17 @@ export const MediaSourceSelector: React.FC<Props> = ({
const optionGroups: OptionGroup[] = useMemo(
() => [
{
id: "media-sources",
title: "Media sources",
options:
item.MediaSources?.map((source, idx) => ({
id: `${source.Id || idx}`,
item.MediaSources?.map((source) => ({
type: "radio" as const,
groupId: "media-sources",
label: getDisplayName(source),
value: source,
selected: source.Id === selected?.Id,
onPress: () => onChange(source),
})) || [],
},
],
[item.MediaSources, selected, getDisplayName],
[item.MediaSources, selected, getDisplayName, onChange],
);
const handleOptionSelect = (optionId: string) => {
@@ -87,26 +85,19 @@ export const MediaSourceSelector: React.FC<Props> = ({
if (isTv) return null;
return (
<View
className='flex shrink'
style={{
minWidth: 50,
<PlatformDropdown
groups={optionGroups}
trigger={trigger}
title={t("item_card.video")}
open={open}
onOpenChange={setOpen}
onOptionSelect={handleOptionSelect}
expoUIConfig={{
hostStyle: { flex: 1 },
}}
>
<PlatformDropdown
groups={optionGroups}
trigger={trigger}
title={t("item_card.video")}
open={open}
onOpenChange={setOpen}
onOptionSelect={handleOptionSelect}
expoUIConfig={{
hostStyle: { flex: 1 },
}}
bottomSheetConfig={{
enablePanDownToClose: true,
}}
/>
</View>
bottomSheetConfig={{
enablePanDownToClose: true,
}}
/>
);
};