Commit graph

155 commits

Author SHA1 Message Date
Peter Ombodi
b15056deb9 fix format 2025-09-19 18:30:41 +03:00
Peter Ombodi
a1fd3ef54a fix merge conflicts 2025-09-19 18:15:27 +03:00
Peter Ombodi
c00526d03a Merge remote-tracking branch 'origin/main' into feature/sync_assets_trashed_state
# Conflicts:
#	mobile/drift_schemas/main/drift_schema_v11.json
#	mobile/lib/infrastructure/repositories/db.repository.dart
#	mobile/lib/infrastructure/repositories/db.repository.steps.dart
#	mobile/test/drift/main/generated/schema_v11.dart
2025-09-19 18:02:16 +03:00
Peter Ombodi
55fe480cc1 Include trashed items in getMediaChanges
Process trashed items delta during incremental sync
2025-09-19 17:55:20 +03:00
Jason Rasmussen
86df09a0e4
fix(mobile): smaller search page size (#22210) 2025-09-19 10:11:11 -04:00
shenlong
e1e24f3d60
fix: sqlite parameters limit (#22119)
* fix isNotIns

* fix isIns

---------

Co-authored-by: shenlong-tanwen <139912620+shalong-tanwen@users.noreply.github.com>
2025-09-19 09:47:56 -04: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
Mert
9ae42106cc
fix(mobile): stack row blocking gestures and not showing up (#21854) 2025-09-18 06:16:14 +00: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
Mert
b79a2eb6b9
chore(mobile): const platform checks (#21878)
* use `defaultTargetPlatform`

* extension

* formatting
2025-09-15 11:13:39 -04:00
shenlong
dcee34095b
fix: reset sqlite on beta migration (#20735)
reset sync stream on migration

Co-authored-by: shenlong-tanwen <139912620+shalong-tanwen@users.noreply.github.com>
2025-09-14 16:30:25 -05:00
Alex
0166e99d90
chore: remove main timeline query watch throttle (#21942) 2025-09-14 02:09:07 -05:00
shenlong
7893ac25fb
fix: always use en locale for parsing timeline datetime (#21796)
Co-authored-by: shenlong-tanwen <139912620+shalong-tanwen@users.noreply.github.com>
2025-09-11 14:20:39 -05:00
Peter Ombodi
3d56a5ca9c Merge remote-tracking branch 'public/main' into feature/sync_assets_trashed_state
# Conflicts:
#	mobile/lib/infrastructure/repositories/local_asset.repository.dart
2025-09-11 12:37:56 +03:00
shenlong
67a8cab286
feat: resurrect advanced info (#21633)
* feat: resurrect advanced info

* display null values as well

* add exif details

---------

Co-authored-by: shenlong-tanwen <139912620+shalong-tanwen@users.noreply.github.com>
2025-09-10 08:38:53 -05:00
Peter Ombodi
c1e9e48713 fix index creating on migration 2025-09-10 11:36:39 +03:00
Peter Ombodi
910ec79409 resolve merge conflicts 2025-09-09 19:13:36 +03:00
Peter Ombodi
a2f726e8e7 Merge remote-tracking branch 'public/main' into feature/sync_assets_trashed_state
# Conflicts:
#	mobile/drift_schemas/main/drift_schema_v10.json
#	mobile/lib/infrastructure/repositories/db.repository.dart
#	mobile/lib/infrastructure/repositories/db.repository.drift.dart
#	mobile/lib/infrastructure/repositories/db.repository.steps.dart
#	mobile/test/drift/main/generated/schema_v10.dart
2025-09-09 19:06:33 +03:00
Peter Ombodi
020dfa7818 feat(db): add local_trashed_asset table and integrate with restoration flow
- Add new `local_trashed_asset` table to store metadata of trashed assets
- Save trashed asset info into `local_trashed_asset` before deletion
- Use `local_trashed_asset` as source for asset restoration
- Implement file restoration by `mediaId`
2025-09-09 18:54:37 +03:00
Alex
59accbf32a
fix: prevent isolate deadlock (#21692) 2025-09-08 19:18:13 +00:00
shenlong
059a0e8aa8
feat: sync AuthUserV1 (#21565)
* feat: sync AuthUserV1

* migration

* chore: fix analyze

* fix user updatedAt check

* fix: auth user sync query

* generate sql

* bump schema version and update migration

---------

Co-authored-by: shenlong-tanwen <139912620+shalong-tanwen@users.noreply.github.com>
Co-authored-by: Jason Rasmussen <jason@rasm.me>
Co-authored-by: Alex Tran <alex.tran1502@gmail.com>
2025-09-08 14:00:10 -05:00
Peter Ombodi
57540f6259 Merge remote-tracking branch 'public/main' into feature/sync_assets_trashed_state
# Conflicts:
#	mobile/test/domain/services/sync_stream_service_test.dart
2025-09-08 17:58:30 +03:00
shenlong
fd4c2acde8
feat: handle SyncResetV1 (#20732)
* feat: handle SyncResetV1

* auto retry on reset and handle SyncCompleteV1

* fix tests

---------

Co-authored-by: shenlong-tanwen <139912620+shalong-tanwen@users.noreply.github.com>
Co-authored-by: Alex <alex.tran1502@gmail.com>
2025-09-08 09:48:26 -05:00
Peter Ombodi
8888657b64 sync trash only for backup-selected assets 2025-09-08 17:38:42 +03:00
Peter Ombodi
c9da959ec2 fix format 2025-09-08 10:57:54 +03:00
Peter Ombodi
f7573ae317 Merge remote-tracking branch 'origin/main' into feature/sync_assets_trashed_state 2025-09-05 17:47:17 +03:00
Peter Ombodi
d8fb41e795 group local assets by checksum before moving to trash
delete LocalAssetEntity records when moved to trash
refactor code
2025-09-05 17:41:30 +03:00
Alex
bcfb5bee1f
feat: album info sync (#21103)
* wip

* album creation

* fix: album api repository no invalidating after logging out

* add linkedRemoteAlbumId column and migration

* link/unlink remote album

* logic to find and add new assets to album

* pr feedback

* add toggle option to backup option page

* refactor: provider > service

* rename

* Handle page pop manually

* UI feedback for user creation and sync linked album

* uncomment migration

* remove unused method
2025-09-04 18:44:10 +00:00
Alex
2ef8d55cc8
Merge branch 'main' into feature/sync_assets_trashed_state 2025-09-02 21:24:46 -05:00
shenlong
674faf2e57
fix: local sync task never runs on iOS (#21491)
* fix: local sync task never runs on iOS

* chore: rename ios register method

* refactor from using dart callback to dart entrypoint + more logs

* check if file exists before hashing

* reschedule local sync task

* chore: rename background worker logger

* refactor: move file exists check inside repo

---------

Co-authored-by: shenlong-tanwen <139912620+shalong-tanwen@users.noreply.github.com>
2025-09-03 02:05:58 +05:30
Mert
303307e1ac
fix(mobile): memory lane query (#21422) 2025-08-29 19:33:58 -05:00
Peter Ombodi
bec675a420 Merge remote-tracking branch 'origin/main' into feature/sync_assets_trashed_state 2025-08-28 12:44:46 +03:00
Mert
a5841a8bf4
fix(mobile): memory lane rebuild (#21350)
* avoid unnecessary timeline rebuild

* add key

* handle disabled memories

* avoid rebuild if no memories
2025-08-27 21:16:41 -05:00
Yaros
204299d500
fix(mobile): user storage quota not showing (#21263) 2025-08-26 15:34:19 -05:00
Mert
e67265cef2
fix(mobile): caching thumbnails to disk (#21275) 2025-08-26 11:49:12 -04:00
Alex
3138048b96
fix: cannot load thumbnail from unknown content length (#21192)
* fix: cannot load thumbnail from unknown content length

* pr feedback

* pr feedback
2025-08-23 15:25:12 -05:00
shenlong
2be1a58c5b
fix: prefer local video if available (#21119)
Co-authored-by: shenlong-tanwen <139912620+shalong-tanwen@users.noreply.github.com>
Co-authored-by: Alex <alex.tran1502@gmail.com>
2025-08-23 11:18:57 -05:00
Alex
13c8a6e61d
fix: parse correct metadata to userDto for SQlite store implmentation (#21154) 2025-08-23 11:02:24 -05:00
Alex
01edf6533b
fix: shared album asset count query (#21157) 2025-08-23 10:46:40 -05:00
shenlong
6f4f79d8cc
feat: migrate store to sqlite (#21078)
* add store entity and migration

* make store service take both isar and drift repos

* migrate and switch store on beta timeline state change

* chore: make drift variables final

* dispose old store before switching repos

* use store to update values for beta timeline

* change log service to use the proper store

* migrate store when beta already enabled

* use isar repository to check beta timeline in store service

* remove unused update method from store repo

* dispose after create

* change watchAll signature in store repo

* fix test

* rename init isar to initDB

* request user to close and reopen on beta migration

* fix tests

* handle empty version in migration

* wait for cache to be populated after migration

---------

Co-authored-by: shenlong-tanwen <139912620+shalong-tanwen@users.noreply.github.com>
Co-authored-by: Alex <alex.tran1502@gmail.com>
2025-08-21 14:58:50 -05:00
shenlong
ed3997d844
fix: skip albums selected or excluded from backups from deletions (#21116)
* skip albums selected or excluded from backups from deletions

* filter empty local albums from library page

---------

Co-authored-by: shenlong-tanwen <139912620+shalong-tanwen@users.noreply.github.com>
2025-08-21 13:44:07 -05:00
Mert
fb59fa343d
feat(mobile): optimized thumbnail widget (#21073)
* thumbnail widget

* use animation ticker, improvements

* use static thumbnail resolution for now

* fix android sample size

* free memory sooner

* formatting

* tweaks

* wait for disposal

* remove debug prints

* take two on animation

* fix

* remote constructor

* missed one

* unused imports

* unnecessary import

* formatting
2025-08-21 18:06:02 +00:00
Alex
ab2849781a
feat: show remainder assets info (#21114)
* feat: show remainder assets info

* pr feedback
2025-08-21 17:18:31 +00:00
Mert
99d6673503
feat(mobile): platform image providers (#20927)
* platform image providers

* use key

* fix cache manager

* more logs, cancel on dispose instead

* split into separate files

* fix saving to cache

* cancel multi-stage provider

* refactored `getInitialImage`

* only wait for disposal for full images

* cached image works

* formatting

* lower asset viewer ram usage

---------

Co-authored-by: Alex <alex.tran1502@gmail.com>
2025-08-20 19:36:44 +00:00
Aaron Tulino
a8b4a5e856
fix(mobile): sort local album by most recently modified (#21038)
Sort with SQL instead

Co-authored-by: Alex <alex.tran1502@gmail.com>
2025-08-19 02:13:40 +00:00
Aaron Tulino
257b0c74af
fix(mobile): show most recent image in album as thumbnail (#21037)
Show most recent image in album as thumbnail
Fixes #21004
2025-08-18 18:02:18 -05:00
Alex
1a4eab9655
fix: locked photos shown in beta timeline favorite page (#20937) 2025-08-14 23:03:33 +00:00
Brandon Wees
1926c90780
feat(mobile): shared album activities (#20714)
* feat(mobile): shared album activities

* add like buttons and fix behavior of unliking

* fix: conditionally show activity button and fix title truncations

* fix(mobile): newest/oldest album sort (#20743)

* fix(mobile): newest/oldest album sort

* chore: use sqlite to determine album asset timestamps

* Fix missing future

Co-authored-by: Alex <alex.tran1502@gmail.com>

* fix: async handling of sort

* chore: tests

* chore: code review changes

* fix: use created at for newest asset

* fix: use localDateTime for sorting

* chore: cleanup

* chore: use final

* feat: loading indicator

---------

Co-authored-by: Alex <alex.tran1502@gmail.com>

---------

Co-authored-by: Alex <alex.tran1502@gmail.com>
2025-08-14 22:50:56 +00:00
Brandon Wees
0d60199514
fix(mobile): newest/oldest album sort (#20743)
* fix(mobile): newest/oldest album sort

* chore: use sqlite to determine album asset timestamps

* Fix missing future

Co-authored-by: Alex <alex.tran1502@gmail.com>

* fix: async handling of sort

* chore: tests

* chore: code review changes

* fix: use created at for newest asset

* fix: use localDateTime for sorting

* chore: cleanup

* chore: use final

* feat: loading indicator

---------

Co-authored-by: Alex <alex.tran1502@gmail.com>
2025-08-12 14:46:50 -05:00