From b34487f766ebbf61bba09faf0f3396c5144dc5bc Mon Sep 17 00:00:00 2001 From: Thibault Deckers Date: Sun, 20 Aug 2023 20:33:33 +0200 Subject: [PATCH] video: fixed disabling subtitles --- lib/widgets/dialogs/video_stream_selection_dialog.dart | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lib/widgets/dialogs/video_stream_selection_dialog.dart b/lib/widgets/dialogs/video_stream_selection_dialog.dart index 5420ce3e3..668ac50f9 100644 --- a/lib/widgets/dialogs/video_stream_selection_dialog.dart +++ b/lib/widgets/dialogs/video_stream_selection_dialog.dart @@ -143,8 +143,9 @@ class _VideoStreamSelectionDialogState extends State ), Padding( padding: const EdgeInsets.symmetric(horizontal: 16), - child: TextDropdownButton( - values: streams.whereNotNull().toList(), + // allow `null` subtitle stream to disable subtitles + child: TextDropdownButton( + values: streams, valueText: _streamName, value: current, onChanged: streams.length > 1 ? (newValue) => setState(() => setter(newValue)) : null,