Skip to content

Bring projects, wikis, and teams together with AI. AppFlowy is the AI collaborative workspace where you achieve more without losing control of your data. The leading open source Notion alternative.

fix: mobile board card title not updating (#4110)

Richard Shiuea7ce21e941c7
diff --git a/frontend/appflowy_flutter/lib/mobile/presentation/database/card/card_content/mobile_card_content.dart b/frontend/appflowy_flutter/lib/mobile/presentation/database/card/card_content/mobile_card_content.dart
index eedfcf1322..6d901e6153 100644
--- a/frontend/appflowy_flutter/lib/mobile/presentation/database/card/card_content/mobile_card_content.dart
+++ b/frontend/appflowy_flutter/lib/mobile/presentation/database/card/card_content/mobile_card_content.dart
@@ -4,11 +4,9 @@ import 'package:appflowy/plugins/database_view/application/cell/cell_service.dar
import 'package:appflowy/plugins/database_view/widgets/card/card.dart';
import 'package:appflowy/plugins/database_view/widgets/card/card_cell_builder.dart';
import 'package:appflowy/plugins/database_view/widgets/card/cells/card_cell.dart';
-import 'package:appflowy/plugins/database_view/widgets/row/cells/text_cell/text_cell_bloc.dart';
import 'package:easy_localization/easy_localization.dart';
import 'package:flowy_infra_ui/flowy_infra_ui.dart';
import 'package:flutter/material.dart';
-import 'package:flutter_bloc/flutter_bloc.dart';
class MobileCardContent<CustomCardData> extends StatelessWidget {
const MobileCardContent({
@@ -72,33 +70,28 @@ class MobileCardContent<CustomCardData> extends StatelessWidget {
DatabaseCellContext cellContext,
) {
final renderHook = RowCardRenderHook<String>();
- renderHook.addTextCellHook((cellData, cardData, __) {
- return BlocBuilder<TextCellBloc, TextCellState>(
- builder: (context, state) {
- final cardDataIsEmpty = cardData == null;
- final text = cardDataIsEmpty
- ? LocaleKeys.grid_row_titlePlaceholder.tr()
- : cellData;
- final color = cardDataIsEmpty
- ? Theme.of(context).hintColor
- : Theme.of(context).colorScheme.onBackground;
+ renderHook.addTextCellHook((cellData, cardData, context) {
+ final text = cellData.isEmpty
+ ? LocaleKeys.grid_row_titlePlaceholder.tr()
+ : cellData;
+ final color = cellData.isEmpty
+ ? Theme.of(context).hintColor
+ : Theme.of(context).colorScheme.onBackground;
- return Row(
- children: [
- if (!cellContext.rowMeta.isDocumentEmpty) ...[
- const FlowySvg(FlowySvgs.notes_s),
- const HSpace(4),
- ],
- Expanded(
- child: FlowyText.regular(
- text,
- color: color,
- overflow: TextOverflow.ellipsis,
- ),
- ),
- ],
- );
- },
+ return Row(
+ children: [
+ if (!cellContext.rowMeta.isDocumentEmpty) ...[
+ const FlowySvg(FlowySvgs.notes_s),
+ const HSpace(4),
+ ],
+ Expanded(
+ child: FlowyText.medium(
+ text,
+ color: color,
+ overflow: TextOverflow.ellipsis,
+ ),
+ ),
+ ],
);
});