From 32af7fd9201a9cae1832739d48abcf68c8ed5f48 Mon Sep 17 00:00:00 2001 From: Michael SCHAL Date: Wed, 10 Dec 2025 22:19:39 +0100 Subject: [PATCH] feat: add mobile IPTV playlist management screen with auto-login functionality --- lib/core/theme/app_colors.dart | 8 ++++---- .../iptv/screens/mobile_playlist_screen.dart | 17 +++++++++++++++++ 2 files changed, 21 insertions(+), 4 deletions(-) diff --git a/lib/core/theme/app_colors.dart b/lib/core/theme/app_colors.dart index 088d83e..1d83c2c 100644 --- a/lib/core/theme/app_colors.dart +++ b/lib/core/theme/app_colors.dart @@ -36,13 +36,13 @@ class AppColors { end: Alignment.bottomRight, ); - /// Apple TV Style Background Gradient (Grey/Black Radial) + /// Apple TV Style Background Gradient (Lighter Grey for categories) static const RadialGradient appleTvGradient = RadialGradient( center: Alignment.center, - radius: 1.5, + radius: 2.0, colors: [ - Color(0xFF2C2C2E), // Apple Dark Gray - Color(0xFF000000), // Black + Color(0xFF3A3A3C), // Lighter Apple Gray + Color(0xFF1C1C1E), // Dark Gray (not pure black) ], stops: [0.0, 1.0], ); diff --git a/lib/mobile/features/iptv/screens/mobile_playlist_screen.dart b/lib/mobile/features/iptv/screens/mobile_playlist_screen.dart index e26f565..ca697ef 100644 --- a/lib/mobile/features/iptv/screens/mobile_playlist_screen.dart +++ b/lib/mobile/features/iptv/screens/mobile_playlist_screen.dart @@ -28,6 +28,23 @@ class _MobilePlaylistScreenState extends ConsumerState { void initState() { super.initState(); _playlistService.init(); + + // Auto-login: if playlists exist, navigate to first one automatically + WidgetsBinding.instance.addPostFrameCallback((_) { + _checkAutoLogin(); + }); + } + + Future _checkAutoLogin() async { + try { + final playlists = await _playlistService.getPlaylists(); + if (playlists.isNotEmpty && mounted) { + // Navigate to first playlist automatically + _navigateToDashboard(playlists.first); + } + } catch (e) { + debugPrint('Auto-login check failed: $e'); + } } void _refreshPlaylists() {