diff --git a/mobile/lib/features/setup_wizard/step_transmission.dart b/mobile/lib/features/setup_wizard/step_transmission.dart index 75e0307..8e05ffb 100644 --- a/mobile/lib/features/setup_wizard/step_transmission.dart +++ b/mobile/lib/features/setup_wizard/step_transmission.dart @@ -30,7 +30,7 @@ class StepTransmission extends ConsumerStatefulWidget { class _StepTransmissionState extends ConsumerState { String _platform = 'matchlivetv'; - bool _linkOnly = false; + String _privacy = 'public'; String? _youtubeChannel; bool _creating = false; @@ -60,7 +60,7 @@ class _StepTransmissionState extends ConsumerState { widget.match.id, platform: _platform, youtubeChannel: _platform == 'youtube' ? _youtubeChannel : null, - privacyStatus: _linkOnly ? 'unlisted' : 'public', + privacyStatus: _privacy, qualityPreset: '720p_30_2.5mbps', targetBitrate: 2500000, targetFps: 30, @@ -216,23 +216,32 @@ class _StepTransmissionState extends ConsumerState { Text('Visibilità', style: theme.textTheme.titleLarge), const SizedBox(height: 8), Text( - 'Vale per Match Live TV e YouTube (canale nostro o della società). ' - 'Di default la diretta è pubblica.', + 'Match Live TV e YouTube (canale nostro o società).', style: theme.textTheme.bodySmall, ), + const SizedBox(height: 12), + SegmentedButton( + segments: const [ + ButtonSegment( + value: 'public', + label: Text('Pubblico'), + icon: Icon(Icons.public), + ), + ButtonSegment( + value: 'unlisted', + label: Text('Privato / non in elenco'), + icon: Icon(Icons.link), + ), + ], + selected: {_privacy}, + onSelectionChanged: (s) => setState(() => _privacy = s.first), + ), const SizedBox(height: 8), - SwitchListTile( - contentPadding: EdgeInsets.zero, - value: _linkOnly, - onChanged: (v) => setState(() => _linkOnly = v), - title: const Text('Privato / non in elenco'), - subtitle: Text( - _platform == 'matchlivetv' - ? 'Non compare nell\'elenco dirette del sito. Solo chi ha il link.' - : _platform == 'youtube' - ? 'Non compare su YouTube in ricerca o nel canale. Solo chi ha il link.' - : 'Visibile solo a chi ha il link, non in elenco pubblico.', - ), + Text( + _privacy == 'public' + ? 'Compare nell\'elenco dirette e sul canale YouTube scelto.' + : 'Solo chi ha il link. Non in elenco pubblico né nelle ricerche.', + style: theme.textTheme.bodySmall?.copyWith(color: AppTheme.textSecondary), ), const SizedBox(height: 24), Text('Qualità', style: theme.textTheme.titleLarge),