Skip to content

Commit

Permalink
Did improvement
Browse files Browse the repository at this point in the history
  • Loading branch information
cp-pratik-k committed Dec 9, 2024
1 parent e22e5db commit 6c750d1
Showing 1 changed file with 11 additions and 5 deletions.
16 changes: 11 additions & 5 deletions data/lib/repositories/media_process_repository.dart
Original file line number Diff line number Diff line change
Expand Up @@ -188,11 +188,13 @@ class MediaProcessRepo extends ChangeNotifier {

for (AppMedia localMedia in localMedias.toList()) {
if (_uploadQueue
.where((element) => element.media_id == localMedia.id && element.status.isRunning)
.where(
(element) =>
element.media_id == localMedia.id &&
element.status.isRunning,
)
.isNotEmpty ||
dgMedias
.where((gdMedia) => gdMedia.id == localMedia.id)
.isNotEmpty) {
dgMedias.where((gdMedia) => gdMedia.id == localMedia.id).isNotEmpty) {
localMedias.removeWhere((media) => media.id == localMedia.id);
}
}
Expand Down Expand Up @@ -227,7 +229,11 @@ class MediaProcessRepo extends ChangeNotifier {

for (AppMedia localMedia in localMedias.toList()) {
if (_uploadQueue
.where((element) => element.media_id == localMedia.id)
.where(
(element) =>
element.media_id == localMedia.id &&
element.status.isRunning,
)
.isNotEmpty ||
dropboxMedias
.where((gdMedia) => gdMedia.id == localMedia.id)
Expand Down

0 comments on commit 6c750d1

Please sign in to comment.