Separator is now its own LazyColumn item instead of being rendered
inline inside the first checked item's composable. This fixes:
Bug A: Separator disappearing during drag (was hidden as workaround
for height inflation). Now always visible with primary color highlight.
Bug B: Cross-boundary move blocked (isChecked != toItem.isChecked
returned early). Now auto-toggles isChecked when crossing boundary
— like Google Tasks.
Bug C: Drag flicker at separator boundary (draggingItemIndex updated
even when onMove was a no-op → oscillation). Index remapping via
visualToDataIndex()/dataToVisualIndex() ensures correct data indices.
Architecture changes:
- DragDropListState: separatorVisualIndex, index remapping functions,
isAdjacentSkippingSeparator() skips separator in swap detection
- NoteEditorScreen: Extracted DraggableChecklistItem composable,
3 LazyColumn blocks (unchecked items, separator, checked items),
removed hardcoded AnimatedVisibility(visible=true) wrapper
- NoteEditorViewModel: moveChecklistItem() allows cross-boundary
moves with automatic isChecked toggle
- CheckedItemsSeparator: isDragActive parameter for visual feedback
Files changed:
- DragDropListState.kt (+56 lines)
- NoteEditorScreen.kt (refactored, net +84 lines)
- NoteEditorViewModel.kt (simplified cross-boundary logic)
- CheckedItemsSeparator.kt (drag-awareness parameter)