Commit Graph
8 Commits
Author SHA1 Message Date
OneWay 71ad849166 Remove the brightness dip in screen transition crossfades
- Fading the outgoing and incoming screens simultaneously makes content
  present on both (the camera FAB) dip to ~75% opacity mid-transition
- Fade only one layer: hold the outgoing destination opaque under the
  fading-in incoming one, and reveal the destination instantly under the
  fading-out one on back
2026-10-15 13:50:31 +08:00
OneWay 761db7a69d Keep the camera FAB stable across folder navigation
- Skip rendering the FAB until saved preferences load, so it is never
  drawn at the default corner and never jumps to its dragged position
- Share user preferences as one hot process-wide StateFlow instead of a
  cold disk read per screen, so a newly created gallery screen receives
  the FAB position synchronously in the ViewModel constructor
2026-10-15 13:50:31 +08:00
OneWay 428749d8a8 Show the gallery folder name from the first frame
- Carry the folder name through GalleryRoute into the ViewModel's
  SavedStateHandle, so the TopBar title is correct immediately on
  navigation, before any directory listing completes
- Seed a provisional name from the SAF URI segment in loadPhotos as a
  fallback for entry points without a name (after-camera navigation)
- Drop the 'Gallery' fallback title and the unused gallery_title string
2026-10-15 13:50:31 +08:00
OneWay 460c50bfd9 Fix photo viewer flicker when opening an image
- Keep the grid composed under the viewer instead of swapping it for a
  black box, removing the momentary black flash while the pager draws
  its first frame after tapping a photo
- Restore the pre-audit fade: thumbnail stays fully opaque under the
  fading-in full image instead of crossfading both over black
2026-10-15 13:50:31 +08:00
OneWay 5832e2db4a Replace launcher icon with adaptive-only vector glyph 2026-10-15 13:50:31 +08:00
OneWay 76ea8ba9a0 Make GalleryUiState derivations lazy and drop dead sorts
copy() ran on every state update (each drag-select step included) and eagerly
recomputed five derived properties: two unused O(N log N) sorts, an O(N)
selection filter, an O(N) selectable-URI set and its containsAll check.

- Remove sortedPhotos/sortedSubfolders: never read (the screen sorts with its
  own remember() calls)
- selectedPhotos/selectablePhotoUris/allPhotosSelected become by lazy:
  computed at most once per instance, only when actually read; body delegates
  stay out of generated copy()/equals(), @Immutable semantics hold
- Memoize selectablePhotoUris across drag-select steps in the ViewModel keyed
  by photos list identity, so a drag step no longer recomputes the O(N) set
2026-10-14 16:06:12 +08:00
OneWay c2ddfdf89d Apply Compose performance audit fixes
- FolderTreePickerSheet: add contentType to lazy folder items for slot reuse
- GalleryScreen: use plain remember instead of derivedStateOf over non-state
  inputs; defer photo fade alpha to Draw phase via graphicsLayer; react to
  zoom threshold with snapshotFlow instead of per-frame effect relaunch
- GalleryViewModel: drop @Immutable from MovePhotoSheetState so Strong
  Skipping compares the lazy feed by O(1) reference equality
- SystemCameraCapture: move temp-file disk I/O off the main thread
2026-10-14 16:06:12 +08:00
OneWay 9910ba6917 Initial commit 2026-10-13 10:17:03 +08:00