Skip to content

Commit

Permalink
fix: refresh data from family
Browse files Browse the repository at this point in the history
  • Loading branch information
Yesterday17 committed Aug 10, 2024
1 parent d943a1c commit 40d54bf
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 1 deletion.
3 changes: 3 additions & 0 deletions lib/ui/dialogs/playlist_dialog.dart
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import 'package:annix/providers.dart';
import 'package:annix/services/anniv/anniv_model.dart';
import 'package:annix/ui/page/playlist.dart';
import 'package:annix/ui/widgets/cover.dart';
import 'package:flutter/material.dart';
import 'package:hooks_riverpod/hooks_riverpod.dart';
Expand Down Expand Up @@ -55,6 +56,8 @@ Future<void> showPlaylistDialog(
if (context.mounted) {
Navigator.of(context, rootNavigator: true).pop();
}
// refresh playlist family
ref.invalidate(playlistFamily);
},
);
},
Expand Down
1 change: 1 addition & 0 deletions lib/ui/page/annil/annil_card.dart
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ class AnnilCard extends ConsumerWidget {
showLoadingDialog(context);
await provider.updateAlbums(annil);
await delegate.popRoute();
ref.invalidate(annilCacheFamily);
}

@override
Expand Down
3 changes: 2 additions & 1 deletion lib/ui/page/playlist.dart
Original file line number Diff line number Diff line change
Expand Up @@ -292,7 +292,8 @@ class _PlaylistPageState extends ConsumerState<PlaylistPage> {
Navigator.of(context, rootNavigator: true).pop();
}

// TODO: update current playlist
// refresh
ref.invalidate(playlistFamily);
},
),
ListTile(
Expand Down

0 comments on commit 40d54bf

Please sign in to comment.