mirror of
https://github.com/AppFlowy-IO/AppFlowy.git
synced 2024-08-30 18:12:39 +00:00
chore: add remove out of bound guard
This commit is contained in:
parent
96fcedf771
commit
2b725f8f71
@ -37,6 +37,9 @@ class _BoardSelectOptionCellState extends State<BoardSelectOptionCell> {
|
||||
return BlocProvider.value(
|
||||
value: _cellBloc,
|
||||
child: BlocBuilder<BoardSelectOptionCellBloc, BoardSelectOptionCellState>(
|
||||
// buildWhen: (previous, current) {
|
||||
// return previous.selectedOptions != current.selectedOptions;
|
||||
// },
|
||||
builder: (context, state) {
|
||||
if (state.selectedOptions
|
||||
.where((element) => element.id == widget.groupId)
|
||||
|
@ -121,6 +121,10 @@ class AFBoardColumnDataController extends ChangeNotifier with EquatableMixin {
|
||||
columnData._items.add(newItem);
|
||||
Log.debug('[$AFBoardColumnDataController] $columnData add $newItem');
|
||||
} else {
|
||||
if (index >= columnData._items.length) {
|
||||
return;
|
||||
}
|
||||
|
||||
final removedItem = columnData._items.removeAt(index);
|
||||
columnData._items.insert(index, newItem);
|
||||
Log.debug(
|
||||
|
@ -140,7 +140,7 @@ class _ReorderDragTargetState<T extends DragTargetData>
|
||||
widget.insertAnimationController,
|
||||
widget.deleteAnimationController,
|
||||
) ??
|
||||
LongPressDraggable<DragTargetData>(
|
||||
Draggable<DragTargetData>(
|
||||
maxSimultaneousDrags: 1,
|
||||
data: widget.dragTargetData,
|
||||
ignoringFeedbackSemantics: false,
|
||||
|
Loading…
Reference in New Issue
Block a user