Skip to content

Commit

Permalink
Improve auto-backup-flow
Browse files Browse the repository at this point in the history
  • Loading branch information
cp-pratik-k committed Dec 9, 2024
1 parent ccb96dc commit e22e5db
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion app/lib/ui/flow/home/home_screen_view_model.dart
Original file line number Diff line number Diff line change
Expand Up @@ -576,7 +576,7 @@ class HomeViewStateNotifier extends StateNotifier<HomeViewState>
if (media.dropboxMediaRefId != null &&
ids.contains(media.dropboxMediaRefId) &&
media.isCommonStored) {
return media.removeLocalRef();
return media.removeDropboxRef();
} else if (media.dropboxMediaRefId != null &&
ids.contains(media.dropboxMediaRefId) &&
media.isDropboxStored) {
Expand Down
6 changes: 3 additions & 3 deletions data/lib/repositories/media_process_repository.dart
Original file line number Diff line number Diff line change
Expand Up @@ -188,10 +188,10 @@ 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 ||
dgMedias
.where((gdMedia) => gdMedia.path == localMedia.id)
.where((gdMedia) => gdMedia.id == localMedia.id)
.isNotEmpty) {
localMedias.removeWhere((media) => media.id == localMedia.id);
}
Expand Down Expand Up @@ -230,7 +230,7 @@ class MediaProcessRepo extends ChangeNotifier {
.where((element) => element.media_id == localMedia.id)
.isNotEmpty ||
dropboxMedias
.where((gdMedia) => gdMedia.path == localMedia.id)
.where((gdMedia) => gdMedia.id == localMedia.id)
.isNotEmpty) {
localMedias.removeWhere((media) => media.id == localMedia.id);
}
Expand Down

0 comments on commit e22e5db

Please sign in to comment.