* 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
* feature(mobile, beta, Android): fix rescan
* fix imports
* fix checking conditions
* refactor naming
* fix line breaks
* refactor code
rollback changes in BackgroundServicePlugin
* refactor code (use separate TrashService)
* refactor code
* parallelize restoreFromTrash calls with Future.wait
format trash.provider.dart
* try to re-format trash.provider.dart
* re-format trash.provider.dart
* rename TrashService to TrashSyncService to avoid duplicated names
revert changes in original trash.provider.dart
* refactor code (minor nitpicks)
* process restoreFromTrash sequentially instead of Future.wait
* group local assets by checksum before moving to trash
delete LocalAssetEntity records when moved to trash
refactor code
* fix format
* use checksum for asset restoration
refactro code
* fix format
* sync trash only for backup-selected assets
* 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`
* resolve merge conflicts
* fix index creating on migration
* 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.
* resolve merge conflicts
use updated approach for calculating checksums
* use CurrentPlatform instead _platform
fix mocks
* revert redundant changes
* Include trashed items in getMediaChanges
Process trashed items delta during incremental sync
* fix merge conflicts
* fix format
* trashed_local_asset table mirror of local_asset table structure
trashed_local_asset<->local_asset transfer data on move to trash or restore
refactor code
* refactor and format code
* refactor TrashedAsset model
fix missed data transfering
* refactor code
remove unused model
* fix label
* fix merge conflicts
* optimize, refactor code
remove redundant code and checking
getTrashedAssetsForAlbum for iOS
tests for hash trashed assets
* format code
* fix migration
fix tests
* fix generated file
* reuse exist checksums on trash data update
handle restoration errors
fix import
* format code
* sync_stream.service depend on repos
refactor assets restoration
update dependencies in tests
* remove trashed asset model
remove trash_sync.service
refactor DriftTrashedLocalAssetRepository, LocalSyncService
* rework fetching trashed assets data on native side
optimize handling trashed assets in local sync service
refactor code
* update NativeSyncApi on iOS side
remove unused code
* optimize sync trashed assets call in full sync mode
refactor code
* fix format
* remove albumIds from getTrashedAssets params
fix upsert in trashed local asset repo
refactor code
* fix getTrashedAssets params
* fix(trash-sync): clean up NativeSyncApiImplBase and correct applyDelta
* refactor(trash-sync): optimize performance and fix minor issues
* refactor(trash-sync): add missed index
* feat(trash-sync): remove sinceLastCheckpoint param from getTrashedAssets
* fix(trash-sync): fix target table
* fix(trash-sync): remove unused extension
* fix(trash-sync): remove unused code
* fix(trash-sync): refactor code
* fix(trash-sync): reformat file
* fix(trash_sync): refactor code
* fix(trash_sync): improve moving to trash
* refactor(trash_sync): integrate MANAGE_MEDIA permission request into login flow and advanced settings
* refactor(trash_sync): add additional checking for experimental trash sync flag and MANAGE_MEDIA permission.
* refactor(trash_sync): resolve merge conflicts
* refactor(trash_sync): fix format
* resolve merge conflicts
add await for alert dialog
add missed request
* refactor(trash_sync): rework MANAGE_MEDIA info widget
show rationale text in permission request alert dialog
refactor setting getter
* fix(trash_sync): restore missing text values
* fix(trash_sync): format file
* fix(trash_sync): check backup enabled and remove remote asset existence check
* fix(trash_sync): remove checking backup enabled
test(trash_sync): cover sync-stream trash/restore paths and dedupe mocks
* test(trash_sync): cover trash/restore flows for local_sync_service
* chore(e2e): restore test-assets submodule pointer
---------
Co-authored-by: Peter Ombodi <peter.ombodi@gmail.com>
Co-authored-by: Alex <alex.tran1502@gmail.com>
* feat(mobile): Add Kid (Readonly) Mode toggle
This commit introduces a "Kid (Readonly) Mode" feature.
- Adds a `KidModeProvider` to manage the state of Kid Mode.
- Implements a `KidModeCheckbox` widget in the app bar dialog to toggle Kid Mode.
- When Kid Mode is enabled,
- Disables selecting the multigrid & the bottom bar
- Removes the top bar from view
Signed-off-by: Sudheer Puthana <Sud-Puth@users.noreply.github.com>
Reverts the changes to devtools_options.yaml file
Signed-off-by: Sudheer Puthana <Sud-Puth@users.noreply.github.com>
refactor: replace Kid Mode with Readonly Mode
This commit replaces the "Kid Mode" feature with a more generic "Readonly Mode".
- Renamed `KidModeProvider` to `ReadonlyModeProvider`.
- Readonly Mode state is now persisted in app settings.
- Added a new app setting `allowUserAvatarOverride` to toggle read-only mode.
- Updated translations.
- Added a message in the app bar dialog indicating when read-only mode is active.
Signed-off-by: Sudheer Puthana <Sud-Puth@users.noreply.github.com>
Address comments -
- Removes the `allowUserAvatarOverride` setting.
- Hides the bottom gallery bar when read-only mode is enabled.
- Adds an icon on the main app bar when read-only mode is enabled with a snackbar.
Signed-off-by: Sudheer Puthana <Sud-Puth@users.noreply.github.com>
Update to snackbar
- When toggling readonly mode from either the settings or the app bar, a snackbar notification will now appear.
- The readonly mode message in the profile drawer has been restyled.
- The upload button in the app bar is now hidden when readonly mode is enabled.
Signed-off-by: Sudheer Puthana <Sud-Puth@users.noreply.github.com>
Removes clearing of snackbar
Signed-off-by: Sudheer Puthana <Sud-Puth@users.noreply.github.com>
Address Comments
- Consolidated snackbar messages for enabling/disabling readonly mode.
- Ensured the "Select All" icon in asset group titles is hidden in readonly mode.
Signed-off-by: Sudheer Puthana <Sud-Puth@users.noreply.github.com>
Adds in the missing translation keys for readonly_mode
Signed-off-by: Sudheer Puthana <Sud-Puth@users.noreply.github.com>
Fix translation
Signed-off-by: Sudheer Puthana <Sud-Puth@users.noreply.github.com>
Fix check failure for BorderRadius
Signed-off-by: Sudheer Puthana <Sud-Puth@users.noreply.github.com>
Changes:
- Adjusted AppBar background color in readonly mode.
- Removes cross-out pencil icon button in favor of above.
- Hides the "Edit" icon next to date/time, disable description and onTap for people and location when readonly mode is enabled.
Signed-off-by: Sudheer Puthana <Sud-Puth@users.noreply.github.com>
Address comments from Alex
- Moved readonly mode check to `GalleryAppBar` to hide the entire `TopControlAppBar` when readonly mode is enabled.
- Changed `toggleReadonlyMode` in `ImmichAppBar` to directly toggle the state.
Signed-off-by: Sudheer Puthana <Sud-Puth@users.noreply.github.com>
migrate readonly mode to new beta timeline
remove readonly mode from legacy UI
only show readonly functionality when on beta timeline
simplify selection icon
update generated provider
chore: more formatting
* fix: bad merge
* chore: use Notifier for readonlyModeProvider
* fix: drag select now honors readonly mode
* fix: disable asset bottom sheet in readonly
* fix: disable editing user icon when in readonly
* chore: remove generated file
* fix: disable tabs instead entire tab bar
This solves the issues with the scrubber
* chore: remove unneeded import
* chore: lint
* remove unused condition in bottomsheet
---------
Co-authored-by: Brandon Wees <brandonwees@gmail.com>
Co-authored-by: Alex <alex.tran1502@gmail.com>
* Add class to apply SSL options
* Apply client certificate for native Android code
* Refactor self-signed check
* Allow self-signed certificates
* Fix Dart analysis
* Add HostnameVerifier
Android explicitly does NOT check the Common Name of a certificate,
only the Subject Alt Names. Chances are that someone who self-signs a
certificate doesn't go through the extra steps to add a SAN, and in
that case the connection would be prevented by the HostnameVerifier
even thought the TrustManager was fine with the certificate itself.
* Rename parameter like in Dart
* Fix NPE
* Catch all native errors in HttpSSLOptionsPlugin
* Workaround for too early onChanged() callback
* Fix formatting
---------
Co-authored-by: Alex <alex.tran1502@gmail.com>
* Features: Local file movement to trash and restoration back to the album added. (Android)
* Comments fixes
* settings button marked as [EXPERIMENTAL]
* _moveToTrashMatchedAssets refactored, moveToTrash renamed.
* fix: bad merge
* Permission check and request for local storage added.
* Permission request added on settings switcher
* Settings button logic changed
* Method channel file_trash moved to BackgroundServicePlugin
---------
Co-authored-by: Alex <alex.tran1502@gmail.com>