From 81ecbd8ae22d4843234c9eb13b8c1cc8c2cb1b7c Mon Sep 17 00:00:00 2001 From: appflowy Date: Mon, 26 Sep 2022 15:25:33 +0800 Subject: [PATCH] fix: open latest view --- .../presentation/home/home_screen.dart | 23 ------------------- 1 file changed, 23 deletions(-) diff --git a/frontend/app_flowy/lib/workspace/presentation/home/home_screen.dart b/frontend/app_flowy/lib/workspace/presentation/home/home_screen.dart index 4b9a485082..2839e8eeb2 100644 --- a/frontend/app_flowy/lib/workspace/presentation/home/home_screen.dart +++ b/frontend/app_flowy/lib/workspace/presentation/home/home_screen.dart @@ -34,19 +34,6 @@ class HomeScreen extends StatefulWidget { } class _HomeScreenState extends State { - ViewPB? initialView; - - @override - void initState() { - super.initState(); - } - - @override - void didUpdateWidget(covariant HomeScreen oldWidget) { - initialView = null; - super.didUpdateWidget(oldWidget); - } - @override Widget build(BuildContext context) { return MultiBlocProvider( @@ -129,15 +116,6 @@ class _HomeScreenState extends State { required BuildContext context, required HomeState state}) { final workspaceSetting = state.workspaceSetting; - if (initialView == null && workspaceSetting.hasLatestView()) { - initialView = workspaceSetting.latestView; - final plugin = makePlugin( - pluginType: initialView!.pluginType, - data: initialView, - ); - getIt().setPlugin(plugin); - } - final homeMenu = HomeMenu( user: widget.user, workspaceSetting: workspaceSetting, @@ -150,7 +128,6 @@ class _HomeScreenState extends State { // All opened widgets that display on the home screen are in the form // of plugins. There is a list of built-in plugins defined in the // [PluginType] enum, including board, grid and trash. - if (getIt().plugin.ty == PluginType.blank) { // Open the last opened view. if (workspaceSetting.hasLatestView()) {