mirror of
https://github.com/AppFlowy-IO/AppFlowy.git
synced 2024-08-30 18:12:39 +00:00
feat: update kanban demo (#2008)
This commit is contained in:
@ -159,8 +159,11 @@ class DatabaseController {
|
||||
);
|
||||
}
|
||||
|
||||
Future<Either<Unit, FlowyError>> moveRow(RowPB fromRow,
|
||||
{RowPB? toRow, String? groupId}) {
|
||||
Future<Either<Unit, FlowyError>> moveRow({
|
||||
required RowPB fromRow,
|
||||
required String groupId,
|
||||
RowPB? toRow,
|
||||
}) {
|
||||
return _databaseViewBackendSvc.moveRow(
|
||||
fromRowId: fromRow.id,
|
||||
toGroupId: groupId,
|
||||
|
@ -46,15 +46,13 @@ class DatabaseViewBackendService {
|
||||
|
||||
Future<Either<Unit, FlowyError>> moveRow({
|
||||
required String fromRowId,
|
||||
required String? toGroupId,
|
||||
required String? toRowId,
|
||||
required String toGroupId,
|
||||
String? toRowId,
|
||||
}) {
|
||||
var payload = MoveGroupRowPayloadPB.create()
|
||||
..viewId = viewId
|
||||
..fromRowId = fromRowId;
|
||||
if (toGroupId != null) {
|
||||
payload.toGroupId = toGroupId;
|
||||
}
|
||||
..fromRowId = fromRowId
|
||||
..toGroupId = toGroupId;
|
||||
|
||||
if (toRowId != null) {
|
||||
payload.toRowId = toRowId;
|
||||
|
@ -54,7 +54,7 @@ class BoardBloc extends Bloc<BoardEvent, BoardState> {
|
||||
final toRow = groupControllers[groupId]?.rowAtIndex(toIndex);
|
||||
if (fromRow != null) {
|
||||
_databaseController.moveRow(
|
||||
fromRow,
|
||||
fromRow: fromRow,
|
||||
toRow: toRow,
|
||||
groupId: groupId,
|
||||
);
|
||||
@ -70,7 +70,7 @@ class BoardBloc extends Bloc<BoardEvent, BoardState> {
|
||||
final toRow = groupControllers[toGroupId]?.rowAtIndex(toIndex);
|
||||
if (fromRow != null) {
|
||||
_databaseController.moveRow(
|
||||
fromRow,
|
||||
fromRow: fromRow,
|
||||
toRow: toRow,
|
||||
groupId: toGroupId,
|
||||
);
|
||||
|
Reference in New Issue
Block a user