From 787161807cd30e4d3c90db0853d97646e0f00e75 Mon Sep 17 00:00:00 2001 From: Emiliano Frascaro Date: Tue, 2 Jun 2026 23:03:56 +0200 Subject: [PATCH] =?UTF-8?q?Ripristina=20scelta=20visibilit=C3=A0=20con=20d?= =?UTF-8?q?ue=20pulsanti=20segmentati=20in=20app.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Pubblico (default) e privato/non in elenco, stessa logica di prima. Co-authored-by: Cursor --- .../setup_wizard/step_transmission.dart | 41 +++++++++++-------- 1 file changed, 25 insertions(+), 16 deletions(-) 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),