File tree Expand file tree Collapse file tree 2 files changed +12
-0
lines changed
frontend/appflowy_flutter/lib/workspace/application Expand file tree Collapse file tree 2 files changed +12
-0
lines changed Original file line number Diff line number Diff line change 11import 'package:appflowy/user/application/user_listener.dart' ;
2+ import 'package:appflowy/workspace/application/view/view_ext.dart' ;
23import 'package:appflowy_backend/log.dart' ;
34import 'package:appflowy_backend/protobuf/flowy-folder/view.pb.dart' ;
45import 'package:appflowy_backend/protobuf/flowy-folder/workspace.pb.dart'
@@ -48,10 +49,17 @@ class HomeBloc extends Bloc<HomeEvent, HomeState> {
4849 emit (state.copyWith (isLoading: e.isLoading));
4950 },
5051 didReceiveWorkspaceSetting: (_DidReceiveWorkspaceSetting value) {
52+ // the latest view is shared across all the members of the workspace.
53+
5154 final latestView = value.setting.hasLatestView ()
5255 ? value.setting.latestView
5356 : state.latestView;
5457
58+ if (latestView != null && latestView.isSpace) {
59+ // If the latest view is a space, we don't need to open it.
60+ return ;
61+ }
62+
5563 emit (
5664 state.copyWith (
5765 workspaceSetting: value.setting,
Original file line number Diff line number Diff line change @@ -65,6 +65,10 @@ class TabsBloc extends Bloc<TabsEvent, TabsState> {
6565 state.currentPageManager.hideSecondaryPlugin ();
6666 emit (state.openPlugin (plugin: plugin, setLatest: setLatest));
6767 if (setLatest) {
68+ // the space view should be filtered out.
69+ if (view != null && view.isSpace) {
70+ return ;
71+ }
6872 _setLatestOpenView (view);
6973 }
7074 },
You can’t perform that action at this time.
0 commit comments