From 3cf5aaeb67d1554c4dd14b67a71af8211de505f5 Mon Sep 17 00:00:00 2001 From: Michael SCHAL Date: Wed, 10 Dec 2025 13:43:43 +0100 Subject: [PATCH] v1.0.5: Add favorite toggle button to Live TV channels --- .../iptv/widgets/mobile_live_tv_tab.dart | 16 ++++++++++++++++ .../iptv/widgets/mobile_settings_tab.dart | 2 +- 2 files changed, 17 insertions(+), 1 deletion(-) diff --git a/lib/mobile/features/iptv/widgets/mobile_live_tv_tab.dart b/lib/mobile/features/iptv/widgets/mobile_live_tv_tab.dart index a59eb2e..5c3c1e7 100644 --- a/lib/mobile/features/iptv/widgets/mobile_live_tv_tab.dart +++ b/lib/mobile/features/iptv/widgets/mobile_live_tv_tab.dart @@ -370,6 +370,10 @@ class _MobileChannelTileState extends ConsumerState<_MobileChannelTile> { final iconUrl = widget.channel.streamIcon.isNotEmpty && widget.channel.streamIcon.startsWith('http') ? widget.channel.streamIcon : null; + + // Watch favorites state + final favorites = ref.watch(mobileFavoritesProvider); + final isFavorite = favorites.contains(widget.channel.streamId); return InkWell( onTap: widget.onTap, @@ -432,6 +436,18 @@ class _MobileChannelTileState extends ConsumerState<_MobileChannelTile> { ], ), ), + // Favorite Button + IconButton( + icon: Icon( + isFavorite ? Icons.favorite : Icons.favorite_border, + color: isFavorite ? Colors.red : AppColors.textSecondary, + ), + onPressed: () { + ref.read(mobileFavoritesProvider.notifier).toggle(widget.channel.streamId); + }, + padding: EdgeInsets.zero, + constraints: const BoxConstraints(minWidth: 40, minHeight: 40), + ), // Play Icon const Icon(Icons.play_circle_outline, color: AppColors.primary), ], diff --git a/lib/mobile/features/iptv/widgets/mobile_settings_tab.dart b/lib/mobile/features/iptv/widgets/mobile_settings_tab.dart index 7547deb..69f75f9 100644 --- a/lib/mobile/features/iptv/widgets/mobile_settings_tab.dart +++ b/lib/mobile/features/iptv/widgets/mobile_settings_tab.dart @@ -108,7 +108,7 @@ class _MobileSettingsTabState extends ConsumerState { ), SizedBox(height: 4), Text( - 'Version 1.0.4', + 'Version 1.0.5', style: TextStyle( fontSize: 13, color: AppColors.textSecondary,