Skip to content

Commit

Permalink
Add swipe t delete too DownloadCard
Browse files Browse the repository at this point in the history
  • Loading branch information
GravityDarkLab committed Jan 29, 2024
1 parent 7557415 commit a905e2c
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions lib/views/course_view/courses_overview.dart
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ class CourseOverviewState extends ConsumerState<CourseOverview> {
Widget build(BuildContext context) {
if (isLoading) {
// Show a loading spinner when data is being fetched
return Center(child: CircularProgressIndicator());
return const Center(child: CircularProgressIndicator());
}
final userCourses = ref.watch(userViewModelProvider).userCourses ?? [];
final publicCourses = ref.watch(userViewModelProvider).publicCourses ?? [];
Expand Down Expand Up @@ -165,7 +165,7 @@ class CourseOverviewState extends ConsumerState<CourseOverview> {

Future<void> _refreshData() async {
setState(
() => isLoading = true); // Set loading to true at the start of refresh
() => isLoading = true,); // Set loading to true at the start of refresh

final userViewModelNotifier = ref.read(userViewModelProvider.notifier);
await userViewModelNotifier.fetchUserCourses();
Expand All @@ -174,6 +174,6 @@ class CourseOverviewState extends ConsumerState<CourseOverview> {
await ref.read(videoViewModelProvider.notifier).fetchLiveThumbnails();

setState(() =>
isLoading = false); // Set loading to false once refresh is complete
isLoading = false,); // Set loading to false once refresh is complete
}
}

0 comments on commit a905e2c

Please sign in to comment.