mirror of
https://github.com/AppFlowy-IO/AppFlowy.git
synced 2024-08-30 18:12:39 +00:00
fix: always open the readme file (#2603)
This commit is contained in:
parent
74ff6772db
commit
51a7954af7
@ -1,6 +1,5 @@
|
||||
import 'package:appflowy/plugins/document/application/document_data_pb_extension.dart';
|
||||
import 'package:appflowy/plugins/document/application/editor_transaction_adapter.dart';
|
||||
import 'package:appflowy/plugins/document/presentation/editor_plugins/migration/editor_migration.dart';
|
||||
import 'package:appflowy/plugins/trash/application/trash_service.dart';
|
||||
import 'package:appflowy/user/application/user_service.dart';
|
||||
import 'package:appflowy/util/json_print.dart';
|
||||
@ -15,7 +14,6 @@ import 'package:appflowy_editor/appflowy_editor.dart'
|
||||
import 'package:appflowy_backend/protobuf/flowy-error/errors.pb.dart';
|
||||
import 'package:appflowy_backend/protobuf/flowy-folder2/view.pb.dart';
|
||||
import 'package:flutter/foundation.dart';
|
||||
import 'package:flutter/services.dart';
|
||||
import 'package:flutter_bloc/flutter_bloc.dart';
|
||||
import 'package:freezed_annotation/freezed_annotation.dart';
|
||||
import 'package:dartz/dartz.dart';
|
||||
@ -142,11 +140,7 @@ class DocumentBloc extends Bloc<DocumentEvent, DocumentState> {
|
||||
return;
|
||||
}
|
||||
|
||||
// test: read from asset
|
||||
final readme = await rootBundle.loadString('assets/template/readme.json');
|
||||
final readmeDocument = EditorMigration.migrateDocument(readme);
|
||||
|
||||
final editorState = EditorState(document: readmeDocument);
|
||||
final editorState = EditorState(document: document);
|
||||
this.editorState = editorState;
|
||||
|
||||
// subscribe to the document change from the editor
|
||||
|
Loading…
Reference in New Issue
Block a user