mirror of
https://github.com/R0m1k3/xtremobile.git
synced 2026-10-11 17:29:26 +02:00
v1.0.5: Add favorite toggle button to Live TV channels
This commit is contained in:
1 parent
cce8625372
commit
3cf5aaeb67
2 files changed
+17
-1
No files matched your search
@@ -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),
|
||||
],
|
||||
|
||||
@@ -108,7 +108,7 @@ class _MobileSettingsTabState extends ConsumerState<MobileSettingsTab> {
|
||||
),
|
||||
SizedBox(height: 4),
|
||||
Text(
|
||||
'Version 1.0.4',
|
||||
'Version 1.0.5',
|
||||
style: TextStyle(
|
||||
fontSize: 13,
|
||||
color: AppColors.textSecondary,
|
||||
|
||||
Reference in new issue
Block a user