mirror of
https://github.com/R0m1k3/xtremflow.git
synced 2026-10-11 17:30:00 +02:00
fix(desktop): fix playlist selection not updating provider and navigation issue
This commit is contained in:
1 parent
a256ca87b6
commit
69c23a9c35
1 file changed
+4
-2
@@ -16,7 +16,6 @@ final playlistsProvider = FutureProvider<List<PlaylistConfig>>((ref) async {
|
||||
class PlaylistSelectionScreen extends ConsumerWidget {
|
||||
const PlaylistSelectionScreen({super.key});
|
||||
|
||||
@override
|
||||
@override
|
||||
Widget build(BuildContext context, WidgetRef ref) {
|
||||
final currentUser = ref.watch(authProvider).currentUser;
|
||||
@@ -149,7 +148,10 @@ class PlaylistSelectionScreen extends ConsumerWidget {
|
||||
return _PlaylistCard(
|
||||
playlist: playlist,
|
||||
onTap: () {
|
||||
context.go('/dashboard', extra: playlist);
|
||||
// Update current selected playlist provider first
|
||||
ref.read(selectedPlaylistProvider.notifier).state = playlist;
|
||||
// Then navigate to dashboard
|
||||
context.go('/dashboard');
|
||||
},
|
||||
);
|
||||
},
|
||||
|
||||
Reference in new issue
Block a user