Skip to content

Commit

Permalink
fix issue with video thumbnails for downloads
Browse files Browse the repository at this point in the history
  • Loading branch information
lamarios committed Oct 5, 2024
1 parent a9bd1a1 commit a4ae9d0
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion lib/downloads/states/download_manager.dart
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ class DownloadManagerCubit extends Cubit<DownloadManagerState> {
}

setVideos() async {
var vids = db.getAllDownloads();
var vids = List<DownloadedVideo>.from(db.getAllDownloads());
// checking if we have any video that are not fail, not completed and not currently downloading
for (int i = 0; i < vids.length; i++) {
var v = vids[i];
Expand Down
4 changes: 2 additions & 2 deletions lib/videos/views/components/video_in_list.dart
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ class VideoListItem extends StatelessWidget {
context.read<VideoInListCubit>().updateProgress(),
child: InkWell(
onTap: () => openVideo(context),
onLongPress: (video!.isUpcoming ?? false) ||
onLongPress: (video?.isUpcoming ?? false) ||
!allowModalSheet ||
state.video == null ||
state.video!.filtered
Expand Down Expand Up @@ -370,7 +370,7 @@ class VideoListItem extends StatelessWidget {
],
),
),
if (!(video!.isUpcoming ?? false) &&
if (!(video?.isUpcoming ?? false) &&
allowModalSheet &&
!small &&
video != null)
Expand Down

0 comments on commit a4ae9d0

Please sign in to comment.