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.
Dart blogconfluence-alternativecontent-managementcontent-servicesdocumentationflutternote-takingnotion-alternativeproject-managementtask-managementteam-collaborationwiki
fix: continue writing edge case (#7535)
Richard Shiue6ac9ad1cac5f
diff --git a/frontend/appflowy_flutter/lib/plugins/document/document_page.dart b/frontend/appflowy_flutter/lib/plugins/document/document_page.dartindex 4e15128788..46ef2ca7f2 100644--- a/frontend/appflowy_flutter/lib/plugins/document/document_page.dart+++ b/frontend/appflowy_flutter/lib/plugins/document/document_page.dart@@ -55,6 +55,8 @@ class _DocumentPageState extends State<DocumentPage>Selection? initialSelection;late final documentBloc = DocumentBloc(documentId: widget.view.id)..add(const DocumentEvent.initial());+ late final viewBloc = ViewBloc(view: widget.view)+ ..add(const ViewEvent.initial());@overridevoid initState() {@@ -66,6 +68,7 @@ class _DocumentPageState extends State<DocumentPage>void dispose() {WidgetsBinding.instance.removeObserver(this);documentBloc.close();+ viewBloc.close();super.dispose();}@@ -88,14 +91,9 @@ class _DocumentPageState extends State<DocumentPage>BlocProvider.value(value: documentBloc),BlocProvider.value(value: ViewLockStatusBloc(view: widget.view)- ..add(- ViewLockStatusEvent.initial(),- ),- ),- BlocProvider(- create: (_) =>- ViewBloc(view: widget.view)..add(const ViewEvent.initial()),+ ..add(ViewLockStatusEvent.initial()),),+ BlocProvider.value(value: viewBloc),],child: BlocConsumer<ViewLockStatusBloc, ViewLockStatusState>(listenWhen: (prev, curr) => curr.isLocked != prev.isLocked,