mirror of
https://github.com/immich-app/immich.git
synced 2024-12-28 22:51:59 +00:00
chore(mobile): handle sync album on duplicated (#12173)
* chore(mobile): handle sync album on duplicated * remove check for duplicate in manual sync * linting
This commit is contained in:
parent
4bf82fb4c4
commit
d685bc1f34
3 changed files with 3 additions and 16 deletions
|
@ -8,7 +8,6 @@ import 'package:hooks_riverpod/hooks_riverpod.dart';
|
|||
import 'package:immich_mobile/entities/asset.entity.dart';
|
||||
import 'package:immich_mobile/entities/etag.entity.dart';
|
||||
import 'package:immich_mobile/entities/exif_info.entity.dart';
|
||||
import 'package:immich_mobile/entities/store.entity.dart';
|
||||
import 'package:immich_mobile/entities/user.entity.dart';
|
||||
import 'package:immich_mobile/models/backup/backup_candidate.model.dart';
|
||||
import 'package:immich_mobile/providers/api.provider.dart';
|
||||
|
@ -309,18 +308,6 @@ class AssetService {
|
|||
useTimeFilter: false,
|
||||
);
|
||||
|
||||
final duplicates = await _apiService.assetsApi.checkExistingAssets(
|
||||
CheckExistingAssetsDto(
|
||||
deviceAssetIds: candidates.map((c) => c.asset.id).toList(),
|
||||
deviceId: Store.get(StoreKey.deviceId),
|
||||
),
|
||||
);
|
||||
|
||||
if (duplicates != null) {
|
||||
candidates
|
||||
.removeWhere((c) => !duplicates.existingIds.contains(c.asset.id));
|
||||
}
|
||||
|
||||
await refreshRemoteAssets();
|
||||
final remoteAssets = await _db.assets
|
||||
.where()
|
||||
|
|
|
@ -484,7 +484,7 @@ class BackupService {
|
|||
),
|
||||
);
|
||||
|
||||
if (shouldSyncAlbums && !isDuplicate) {
|
||||
if (shouldSyncAlbums) {
|
||||
await _albumService.syncUploadAlbums(
|
||||
candidate.albumNames,
|
||||
[responseBody['id'] as String],
|
||||
|
|
|
@ -1737,10 +1737,10 @@ packages:
|
|||
dependency: transitive
|
||||
description:
|
||||
name: vm_service
|
||||
sha256: f652077d0bdf60abe4c1f6377448e8655008eef28f128bc023f7b5e8dfeb48fc
|
||||
sha256: "5c5f338a667b4c644744b661f309fb8080bb94b18a7e91ef1dbd343bed00ed6d"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "14.2.4"
|
||||
version: "14.2.5"
|
||||
wakelock_plus:
|
||||
dependency: "direct main"
|
||||
description:
|
||||
|
|
Loading…
Reference in a new issue