Add drag-to-reorder pages and fix page navigation from page list

Drag-to-reorder:
- Added sh.calvin.reorderable library for LazyVerticalGrid drag support
- Long-press and drag page thumbnails to reorder
- Page numbers updated in DB on drop
- Visual feedback: slight scale + transparency while dragging

Page navigation fix:
- Clicking a page in "view all pages" now correctly opens that page
  (key(pid) forces EditorScreen recreation with the selected page)

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-03-24 17:20:28 -07:00
parent 984f19af06
commit 368351f9c6
7 changed files with 91 additions and 23 deletions

View File

@@ -10,6 +10,7 @@ coroutines = "1.10.2"
core-ktx = "1.18.0"
activity-compose = "1.13.0"
junit = "4.13.2"
reorderable = "3.0.0"
[libraries]
androidx-core-ktx = { group = "androidx.core", name = "core-ktx", version.ref = "core-ktx" }
@@ -35,6 +36,7 @@ coroutines-android = { group = "org.jetbrains.kotlinx", name = "kotlinx-coroutin
coroutines-test = { group = "org.jetbrains.kotlinx", name = "kotlinx-coroutines-test", version.ref = "coroutines" }
junit = { group = "junit", name = "junit", version.ref = "junit" }
reorderable = { group = "sh.calvin.reorderable", name = "reorderable", version.ref = "reorderable" }
[plugins]
android-application = { id = "com.android.application", version.ref = "agp" }