Drag chats at once with a mouse and mark only the receiving zone
The list rows used a long-press drag, which a mouse rarely triggers; they now drag immediately with the chip at the pointer. The drop indicator outlines just the area that will receive the chat (the pane, or the right or bottom half) with a label saying what happens.
This commit is contained in:
@@ -126,7 +126,10 @@ class ChatCompactSidebar extends StatelessWidget {
|
||||
? Duration.zero
|
||||
: const Duration(milliseconds: 200),
|
||||
color: selected ? Colors.transparent : color.withValues(alpha: .07),
|
||||
child: LongPressDraggable<JsonMap>(
|
||||
child: Draggable<JsonMap>(
|
||||
// A mouse drags at once (a click still opens the chat); the chip
|
||||
// follows the pointer.
|
||||
dragAnchorStrategy: pointerDragAnchorStrategy,
|
||||
data: row,
|
||||
feedback: Material(
|
||||
elevation: 4,
|
||||
|
||||
@@ -81,7 +81,10 @@ class ChatSessionRow extends StatelessWidget {
|
||||
marker: marker,
|
||||
markerWidth: visible ? (selected ? 10 : 3) : 0,
|
||||
child: draggable
|
||||
? LongPressDraggable<JsonMap>(
|
||||
? Draggable<JsonMap>(
|
||||
// A mouse drags at once (a click still opens the chat); the chip
|
||||
// follows the pointer.
|
||||
dragAnchorStrategy: pointerDragAnchorStrategy,
|
||||
data: session,
|
||||
feedback: Material(
|
||||
elevation: 4,
|
||||
|
||||
Reference in New Issue
Block a user