Browse Source

chore: fix edit bugs

appflowy 2 years ago
parent
commit
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>(
         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) {

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

@@ -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);
       },
       },
     );
     );