diff --git a/app/lib/ui/flow/home/home_screen_view_model.dart b/app/lib/ui/flow/home/home_screen_view_model.dart index e35e614..25aced4 100644 --- a/app/lib/ui/flow/home/home_screen_view_model.dart +++ b/app/lib/ui/flow/home/home_screen_view_model.dart @@ -576,7 +576,7 @@ class HomeViewStateNotifier extends StateNotifier 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) { diff --git a/data/lib/repositories/media_process_repository.dart b/data/lib/repositories/media_process_repository.dart index bc3c69c..b2e00a9 100644 --- a/data/lib/repositories/media_process_repository.dart +++ b/data/lib/repositories/media_process_repository.dart @@ -188,11 +188,13 @@ 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) - .isNotEmpty) { + dgMedias.where((gdMedia) => gdMedia.id == localMedia.id).isNotEmpty) { localMedias.removeWhere((media) => media.id == localMedia.id); } } @@ -227,10 +229,14 @@ 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.path == localMedia.id) + .where((gdMedia) => gdMedia.id == localMedia.id) .isNotEmpty) { localMedias.removeWhere((media) => media.id == localMedia.id); }