refactor: Simplify subtitle rendering logic with early return

This commit is contained in:
Kirill Boychenko 2025-07-28 01:20:30 +02:00
parent ee824f5f16
commit d60522b021
2 changed files with 4 additions and 9 deletions

View file

@ -289,7 +289,7 @@ class _DesktopControlsState extends ConsumerState<DesktopControls> {
}
Widget bottomButtons(BuildContext context) {
return Container(child: Consumer(builder: (context, ref, child) {
return Consumer(builder: (context, ref, child) {
final mediaPlayback = ref.watch(mediaPlaybackProvider);
final bitRateOptions = ref.watch(playBackModel.select((value) => value?.bitRateOptions));
return Container(
@ -430,7 +430,7 @@ class _DesktopControlsState extends ConsumerState<DesktopControls> {
),
),
);
}));
});
}
Widget progressBar(MediaPlaybackModel mediaPlayback) {