Skip to content

Commit db22415

Browse files
dab246hoangdat
authored andcommitted
TF-4064 Fix drag but con not drop on mobile
1 parent e813336 commit db22415

File tree

1 file changed

+20
-24
lines changed

1 file changed

+20
-24
lines changed

lib/features/composer/presentation/widgets/recipient_composer_widget.dart

Lines changed: 20 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -299,30 +299,26 @@ class _RecipientComposerWidgetState extends State<RecipientComposerWidget> {
299299
},
300300
);
301301

302-
if (PlatformInfo.isWeb || widget.isTestingForWeb) {
303-
return DragTarget<DraggableEmailAddress>(
304-
builder: (context, candidateData, rejectedData) {
305-
return tagEditor;
306-
},
307-
onAcceptWithDetails: (draggableEmailAddress) =>
308-
_handleAcceptDraggableEmailAddressAction(
309-
draggableEmailAddress.data,
310-
stateSetter,
311-
),
312-
onLeave: (draggableEmailAddress) {
313-
if (_isDragging) {
314-
stateSetter(() => _isDragging = false);
315-
}
316-
},
317-
onMove: (details) {
318-
if (!_isDragging) {
319-
stateSetter(() => _isDragging = true);
320-
}
321-
},
322-
);
323-
} else {
324-
return tagEditor;
325-
}
302+
return DragTarget<DraggableEmailAddress>(
303+
builder: (context, candidateData, rejectedData) {
304+
return tagEditor;
305+
},
306+
onAcceptWithDetails: (draggableEmailAddress) =>
307+
_handleAcceptDraggableEmailAddressAction(
308+
draggableEmailAddress.data,
309+
stateSetter,
310+
),
311+
onLeave: (draggableEmailAddress) {
312+
if (_isDragging) {
313+
stateSetter(() => _isDragging = false);
314+
}
315+
},
316+
onMove: (details) {
317+
if (!_isDragging) {
318+
stateSetter(() => _isDragging = true);
319+
}
320+
},
321+
);
326322
},
327323
)
328324
)

0 commit comments

Comments
 (0)