chore: revert auto expand feature (#5232)

This commit is contained in:
Lucas.Xu 2024-04-30 22:04:12 +08:00 committed by GitHub
parent 4d860cc404
commit 10a1571910
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -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/tabs/tabs_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/rename_view_dialog.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);
// 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) =>
context.read<TabsBloc>().openTab(view),