浏览代码

chore: fix edit bugs

appflowy 2 年之前
父节点
当前提交
349f599a43

+ 1 - 1
frontend/app_flowy/lib/plugins/board/presentation/card/board_text_cell.dart

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

+ 5 - 1
frontend/app_flowy/lib/plugins/board/presentation/card/card.dart

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