Просмотр исходного кода

chore: remove unavailable action of GridSettingAction and RowAction

appflowy 3 лет назад
Родитель
Сommit
b286276108

+ 1 - 0
frontend/app_flowy/lib/workspace/presentation/plugins/grid/src/widgets/row/row_action_sheet.dart

@@ -24,6 +24,7 @@ class GridRowActionSheet extends StatelessWidget {
       child: BlocBuilder<RowActionSheetBloc, RowActionSheetState>(
       child: BlocBuilder<RowActionSheetBloc, RowActionSheetState>(
         builder: (context, state) {
         builder: (context, state) {
           final cells = _RowAction.values
           final cells = _RowAction.values
+              .where((value) => value.enable())
               .map(
               .map(
                 (action) => _RowActionCell(
                 (action) => _RowActionCell(
                   action: action,
                   action: action,

+ 1 - 1
frontend/app_flowy/lib/workspace/presentation/plugins/grid/src/widgets/toolbar/grid_setting.dart

@@ -85,7 +85,7 @@ class GridSettingList extends StatelessWidget {
   }
   }
 
 
   Widget _renderList() {
   Widget _renderList() {
-    final cells = GridSettingAction.values.map((action) {
+    final cells = GridSettingAction.values.where((value) => value.enable()).map((action) {
       return _SettingItem(action: action);
       return _SettingItem(action: action);
     }).toList();
     }).toList();