chore: fix edit bugs

This commit is contained in:
appflowy 2022-08-31 20:57:34 +08:00
parent a9f5f8d508
commit 349f599a43
2 changed files with 6 additions and 2 deletions

View File

@ -78,7 +78,7 @@ class _BoardTextCellState extends State<BoardTextCell> {
child: BlocBuilder<BoardTextCellBloc, BoardTextCellState>( child: BlocBuilder<BoardTextCellBloc, BoardTextCellState>(
builder: (context, state) { builder: (context, state) {
Widget child; Widget child;
if (state.content.isEmpty) { if (state.content.isEmpty && state.enableEdit == false) {
child = const SizedBox(); child = const SizedBox();
} else { } else {
if (state.enableEdit) { if (state.enableEdit) {

View File

@ -98,13 +98,17 @@ class _BoardCardState extends State<BoardCard> {
widget.isEditing, widget.isEditing,
cellNotifier, cellNotifier,
); );
rowNotifier.insertCell(cellId, cellNotifier);
if (index == 0) {
rowNotifier.insertCell(cellId, cellNotifier);
}
child = Padding( child = Padding(
key: cellId.key(), key: cellId.key(),
padding: const EdgeInsets.only(left: 4, right: 4), padding: const EdgeInsets.only(left: 4, right: 4),
child: child, child: child,
); );
children.add(child); children.add(child);
}, },
); );