mirror of
https://github.com/AppFlowy-IO/AppFlowy.git
synced 2024-08-30 18:12:39 +00:00
chore: revert auto expand feature (#5232)
This commit is contained in:
parent
4d860cc404
commit
10a1571910
@ -3,7 +3,6 @@ import 'package:appflowy/workspace/application/menu/sidebar_sections_bloc.dart';
|
|||||||
import 'package:appflowy/workspace/application/sidebar/folder/folder_bloc.dart';
|
import 'package:appflowy/workspace/application/sidebar/folder/folder_bloc.dart';
|
||||||
import 'package:appflowy/workspace/application/tabs/tabs_bloc.dart';
|
import 'package:appflowy/workspace/application/tabs/tabs_bloc.dart';
|
||||||
import 'package:appflowy/workspace/application/user/user_workspace_bloc.dart';
|
import 'package:appflowy/workspace/application/user/user_workspace_bloc.dart';
|
||||||
import 'package:appflowy/workspace/application/view/view_bloc.dart';
|
|
||||||
import 'package:appflowy/workspace/presentation/home/menu/sidebar/folder/_folder_header.dart';
|
import 'package:appflowy/workspace/presentation/home/menu/sidebar/folder/_folder_header.dart';
|
||||||
import 'package:appflowy/workspace/presentation/home/menu/sidebar/rename_view_dialog.dart';
|
import 'package:appflowy/workspace/presentation/home/menu/sidebar/rename_view_dialog.dart';
|
||||||
import 'package:appflowy/workspace/presentation/home/menu/view/view_item.dart';
|
import 'package:appflowy/workspace/presentation/home/menu/view/view_item.dart';
|
||||||
@ -91,17 +90,6 @@ class SectionFolder extends StatelessWidget {
|
|||||||
}
|
}
|
||||||
|
|
||||||
context.read<TabsBloc>().openPlugin(view);
|
context.read<TabsBloc>().openPlugin(view);
|
||||||
|
|
||||||
// Delay to expand the view to prevent the view from being
|
|
||||||
// expanded when the user is trying to open the view in a new tab
|
|
||||||
// This will improve the animation performance
|
|
||||||
Future.delayed(const Duration(milliseconds: 50), () {
|
|
||||||
if (viewContext.mounted) {
|
|
||||||
viewContext
|
|
||||||
.read<ViewBloc>()
|
|
||||||
.add(const ViewEvent.setIsExpanded(true));
|
|
||||||
}
|
|
||||||
});
|
|
||||||
},
|
},
|
||||||
onTertiarySelected: (view, viewContext) =>
|
onTertiarySelected: (view, viewContext) =>
|
||||||
context.read<TabsBloc>().openTab(view),
|
context.read<TabsBloc>().openTab(view),
|
||||||
|
Loading…
Reference in New Issue
Block a user