Commit graph

12 commits

Author SHA1 Message Date
Peter Ombodi
3eb2bf0342 optimize, refactor code
remove redundant code and checking
getTrashedAssetsForAlbum for iOS
tests for hash trashed assets
2025-10-06 11:41:34 +03:00
Peter Ombodi
bd9e4871ec Merge remote-tracking branch 'origin/main' into feature/sync_assets_trashed_state
# Conflicts:
#	mobile/android/app/src/main/kotlin/app/alextran/immich/sync/Messages.g.kt
#	mobile/ios/Runner/Sync/Messages.g.swift
#	mobile/lib/domain/services/hash.service.dart
#	mobile/lib/domain/services/local_sync.service.dart
#	mobile/lib/platform/native_sync_api.g.dart
#	mobile/lib/providers/infrastructure/sync.provider.dart
#	mobile/pigeon/native_sync_api.dart
#	mobile/test/domain/services/hash_service_test.dart
2025-09-18 14:07:13 +03:00
Peter Ombodi
f7e5288173 rework trashed assets handling
- add new table trashed_local_asset
- mirror trashed assets data in trashed_local_asset.
- compute checksums for assets trashed out-of-app.
- restore assets present in trashed_local_asset and non-trashed in remote_asset.
- simplify moving-to-trash logic based on remote_asset events.
2025-09-18 13:55:56 +03:00
shenlong
532ec10d5f
refactor: hashing service (#21997)
* download only backup selected assets

* android impl

* fix tests

* limit concurrent hashing to 16

* extension cleanup

* optimized hashing

* hash only selected albums

* remove concurrency limit

* address review comments

* log more info on failure

* add native cancellation

* small batch size on ios, large on android

* fix: get correct resources

* cleanup getResource

* ios better hash cancellation

* handle graceful cancellation android

* do not trigger multiple hashing ops

* ios: fix circular reference, improve cancellation

* kotlin: more cancellation checks

* no need to create result

* cancel previous task

* avoid race condition

* ensure cancellation gets called

* fix cancellation not happening

---------

Co-authored-by: shenlong-tanwen <139912620+shalong-tanwen@users.noreply.github.com>
Co-authored-by: mertalev <101130780+mertalev@users.noreply.github.com>
Co-authored-by: Alex <alex.tran1502@gmail.com>
2025-09-17 23:42:37 -05:00
Peter Ombodi
1682766ccb rename TrashService to TrashSyncService to avoid duplicated names
revert changes in original trash.provider.dart
2025-08-08 14:24:36 +03:00
Peter Ombodi
31bfadb585 refactor code (use separate TrashService) 2025-08-06 11:54:18 +03:00
Peter Ombodi
cf920ea438 feature(mobile, beta, Android): handle remote asset trash/restore events and rescan media
- Handle move to trash and restore from trash for remote assets on Android
- Trigger MediaScannerConnection to rescan affected media files
2025-07-31 18:34:36 +03:00
shenlong
e52b9d15b5
chore: bump dart sdk to 3.8 (#20355)
* chore: bump dart sdk to 3.8

* chore: make build

* make pigeon

* chore: format files

---------

Co-authored-by: shenlong-tanwen <139912620+shalong-tanwen@users.noreply.github.com>
2025-07-28 14:04:03 -05:00
shenlong
65dce58aa4
refactor(mobile): do not skip iCloud albums during local sync (#19231)
do not skip cloud albums during local sync

Co-authored-by: shenlong-tanwen <139912620+shalong-tanwen@users.noreply.github.com>
Co-authored-by: Alex <alex.tran1502@gmail.com>
2025-06-25 16:46:31 +00:00
Alex
bce4f93c90
refactor(mobile): (1) user.interface.dart (#19322)
* refactor(mobile): user.interface.dart

* generate files

* refactor(mobile): (2) user_api.interface.dart (#19323)

* refactor(mobile): (2) user_api.interface.dart

* generate files

* refactor(mobile): (3) sync_stream.interface.dart (#19325)
2025-06-19 23:25:18 +00:00
shenlong
ce6631f7e0
feat(mobile): hash assets in isolate (#18924) 2025-06-06 11:23:05 +05:30
shenlong
dbdb64f6c5
feat: delta sync (#18428)
* feat: delta sync

* fix: ignore iCloud assets

* feat: dev logs

* add full sync button

* remove photo_manager dep for sync

* misc logs and fix

* add time taken to DLog

* fix: build release iOS

* ios sync go brrr

* rename local sync service

* update isar fork

* rename to platform assets / albums

* fix ci check

---------

Co-authored-by: shenlong-tanwen <139912620+shalong-tanwen@users.noreply.github.com>
Co-authored-by: Alex <alex.tran1502@gmail.com>
2025-05-29 10:42:00 -05:00
Renamed from mobile/lib/providers/infrastructure/sync_stream.provider.dart (Browse further)