feat(android): album/photo attribute-actions and device gallery sync fixes
Album panel and photo sheet with attributes/actions for every album (server and device), local album rename/cover/delete, EXIF attribute settings, and a unified device-gallery sync check: - add repository "Атрибуты и действия" panel (swipe left) on server and device albums: cover, info, navigation, rename/delete; album settings screen; photo sheet (swipe up) with info, tags and actions; EXIF attribute settings backed by profile preferences - local albums use local metadata and actions: app-only display name and cover (new device_album_meta table), delete removes photos from the phone via the system delete consent - unified mode x state policy (GallerySyncPolicy/SyncCheck) runs on start and on album open: upload/offload in move, restore originals in copy/off - fix move->copy restore, offload of any linked-but-local original, provenance recovery that no longer overwrites the album mode, serialized reconcile and duplicate-upload suppression; prompt for "all files" access on start - album card caption: name (with linked server name when different) and storage icons (memory card / cloud) with item count Sync delta specs into android-client and archive the change add-mobile-album-photo-actions. Verified: unit/Robolectric suite green, :app:assembleDebug, :app:lint, and the DeviceSyncE2ETest instrumented suite on the emulator (7/7).
This commit is contained in:
+33
-1
@@ -100,6 +100,36 @@ While an album screen is active the client holds
|
||||
`GET /api/sse/albums/:id?token=` and backfills missed changes via
|
||||
`GET /api/albums/:id/photos?since=` after a reconnect.
|
||||
|
||||
## Attributes and actions
|
||||
|
||||
The mobile client mirrors the web workspace's attribute/action management.
|
||||
|
||||
- **Album panel.** Swiping right-to-left on any album screen (server or device)
|
||||
opens the «Атрибуты и действия» panel with the sections «Обложка», «Информация»,
|
||||
«Навигация» and «Действия» (rename, delete). Cover and navigation are limited to
|
||||
owner/admin. For a device album linked to a server album, the panel shows the
|
||||
linked server album's real attributes; an unlinked device album shows local
|
||||
values (cover, name, item count) without the navigation section.
|
||||
- **Photo sheet.** Swiping up in full-screen viewing (server or device) opens the
|
||||
«Атрибуты и действия» sheet with «Информация», «Метки» and «Действия» (download,
|
||||
move, copy, set as cover, delete) plus rename by tapping the file name. The sheet
|
||||
does not open while an image is zoomed, a panorama rotates, or video controls are
|
||||
in use. For device media linked to a server photo, the sheet shows that photo's
|
||||
server attributes and actions; otherwise it shows local properties.
|
||||
- **Attribute settings.** The «Информация» section reaches a screen listing the EXIF
|
||||
attributes with visibility checkboxes and label fields («отметить все»/«снять
|
||||
все»); the choice is stored in the profile's `photo_info` preferences, using the
|
||||
same shape as web, so the two clients stay in sync.
|
||||
|
||||
API operations backing these panels (all already served by the backend):
|
||||
|
||||
- `PATCH /api/albums/:id` (`title`, `description`, `cover_photo_id` / `clear_cover`),
|
||||
`DELETE /api/albums/:id`, `GET /api/albums/:id/members`,
|
||||
`GET|POST|DELETE /api/albums/:id/share`
|
||||
- `POST /api/photo-batch/copy`, `POST|DELETE /api/photos/:id/tags`, `GET /api/tags?q=`
|
||||
- `PATCH /api/auth/me/preferences`; account payload `GET /api/auth/me` and photo
|
||||
payloads expose `preferences`, `exif`, `tags`, `uploader` and `download_url`.
|
||||
|
||||
## Device albums and synchronization
|
||||
|
||||
The album list mixes the server's albums with the device's own albums (MediaStore
|
||||
@@ -152,7 +182,9 @@ Unit tests cover URL resolution, error mapping, token refresh, the offline
|
||||
cache/repository fallback, page merging, the object cache key, SSE event
|
||||
parsing/reconnect, HEIC detection, and the panorama camera math. Robolectric
|
||||
Compose tests cover the albums grid/offline banner, the viewer swipe navigation,
|
||||
and upload statuses.
|
||||
and upload statuses. Request-level tests cover the album/tag/preferences
|
||||
operations behind the attribute/action panels, and DTO tests cover the rich photo
|
||||
and account payloads (`exif`, `tags`, `uploader`, `preferences`).
|
||||
|
||||
Device-only checks (real server E2E, Wi-Fi-only gating, background continuation,
|
||||
HEIC conversion of a real asset) require a device or emulator.
|
||||
|
||||
Reference in New Issue
Block a user