diff --git a/frontend/appflowy_flutter/lib/workspace/application/tabs/tabs_bloc.dart b/frontend/appflowy_flutter/lib/workspace/application/tabs/tabs_bloc.dart index c36a557c42ae4..1ba04629c49a9 100644 --- a/frontend/appflowy_flutter/lib/workspace/application/tabs/tabs_bloc.dart +++ b/frontend/appflowy_flutter/lib/workspace/application/tabs/tabs_bloc.dart @@ -1,5 +1,3 @@ -import 'package:flutter/foundation.dart'; - import 'package:appflowy/plugins/util.dart'; import 'package:appflowy/startup/plugin/plugin.dart'; import 'package:appflowy/startup/startup.dart'; @@ -8,11 +6,12 @@ import 'package:appflowy/workspace/presentation/home/home_stack.dart'; import 'package:appflowy/workspace/presentation/home/menu/menu_shared_state.dart'; import 'package:appflowy_backend/protobuf/flowy-folder/view.pb.dart'; import 'package:bloc/bloc.dart'; +import 'package:flutter/foundation.dart'; import 'package:freezed_annotation/freezed_annotation.dart'; +part 'tabs_bloc.freezed.dart'; part 'tabs_event.dart'; part 'tabs_state.dart'; -part 'tabs_bloc.freezed.dart'; class TabsBloc extends Bloc { TabsBloc() : super(TabsState()) { diff --git a/frontend/appflowy_flutter/lib/workspace/presentation/home/menu/sidebar/sidebar.dart b/frontend/appflowy_flutter/lib/workspace/presentation/home/menu/sidebar/sidebar.dart index 4aaff8b74d0ed..a992ea6c20fdc 100644 --- a/frontend/appflowy_flutter/lib/workspace/presentation/home/menu/sidebar/sidebar.dart +++ b/frontend/appflowy_flutter/lib/workspace/presentation/home/menu/sidebar/sidebar.dart @@ -1,6 +1,9 @@ import 'dart:async'; +import 'package:appflowy/startup/plugin/plugin.dart'; import 'package:appflowy/startup/startup.dart'; +import 'package:appflowy/workspace/application/favorite/favorite_bloc.dart'; +import 'package:appflowy/workspace/application/favorite/prelude.dart'; import 'package:appflowy/workspace/application/menu/sidebar_sections_bloc.dart'; import 'package:appflowy/workspace/application/notifications/notification_action.dart'; import 'package:appflowy/workspace/application/notifications/notification_action_bloc.dart'; @@ -103,6 +106,11 @@ class HomeSideBar extends StatelessWidget { ), BlocListener( listener: (context, state) { + context.read().add( + TabsEvent.openPlugin( + plugin: makePlugin(pluginType: PluginType.blank), + ), + ); context.read().add( SidebarSectionsEvent.initial( userProfile, @@ -110,6 +118,9 @@ class HomeSideBar extends StatelessWidget { workspaceSetting.workspaceId, ), ); + context.read().add( + const FavoriteEvent.fetchFavorites(), + ); }, ), ],