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
@@ -371,6 +371,10 @@ class _MobileChannelTileState extends ConsumerState<_MobileChannelTile> {
|
|||||||
? widget.channel.streamIcon
|
? widget.channel.streamIcon
|
||||||
: null;
|
: null;
|
||||||
|
|
||||||
|
// Watch favorites state
|
||||||
|
final favorites = ref.watch(mobileFavoritesProvider);
|
||||||
|
final isFavorite = favorites.contains(widget.channel.streamId);
|
||||||
|
|
||||||
return InkWell(
|
return InkWell(
|
||||||
onTap: widget.onTap,
|
onTap: widget.onTap,
|
||||||
borderRadius: BorderRadius.circular(12),
|
borderRadius: BorderRadius.circular(12),
|
||||||
@@ -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
|
// Play Icon
|
||||||
const Icon(Icons.play_circle_outline, color: AppColors.primary),
|
const Icon(Icons.play_circle_outline, color: AppColors.primary),
|
||||||
],
|
],
|
||||||
|
|||||||
@@ -108,7 +108,7 @@ class _MobileSettingsTabState extends ConsumerState<MobileSettingsTab> {
|
|||||||
),
|
),
|
||||||
SizedBox(height: 4),
|
SizedBox(height: 4),
|
||||||
Text(
|
Text(
|
||||||
'Version 1.0.4',
|
'Version 1.0.5',
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
fontSize: 13,
|
fontSize: 13,
|
||||||
color: AppColors.textSecondary,
|
color: AppColors.textSecondary,
|
||||||
|
|||||||
Reference in new issue
Block a user