Skip to content

Commit e4c039e

Browse files
authored
Merge pull request #880 from LucasXu0/selection_menu_refactor
[Improvement] Refactor selection menu
2 parents 1d2dd15 + ad7e408 commit e4c039e

File tree

22 files changed

+824
-562
lines changed

22 files changed

+824
-562
lines changed

frontend/app_flowy/packages/appflowy_editor/assets/document.json

Lines changed: 0 additions & 58 deletions
This file was deleted.

frontend/app_flowy/packages/appflowy_editor/lib/src/editor_state.dart

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import 'dart:async';
22
import 'package:appflowy_editor/src/infra/log.dart';
3+
import 'package:appflowy_editor/src/render/selection_menu/selection_menu_widget.dart';
34
import 'package:appflowy_editor/src/service/service.dart';
45
import 'package:flutter/material.dart';
56

@@ -54,6 +55,9 @@ class EditorState {
5455
/// with this variable.
5556
LogConfiguration get logConfiguration => LogConfiguration();
5657

58+
/// Stores the selection menu items.
59+
List<SelectionMenuItem> selectionMenuItems = [];
60+
5761
final UndoManager undoManager = UndoManager();
5862
Selection? _cursorSelection;
5963

frontend/app_flowy/packages/appflowy_editor/lib/src/operation/transaction_builder.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ class TransactionBuilder {
2323
TransactionBuilder(this.state);
2424

2525
/// Commits the operations to the state
26-
commit() {
26+
Future<void> commit() async {
2727
final transaction = finish();
2828
state.apply(transaction);
2929
}

0 commit comments

Comments
 (0)