From 2126e6e449629b679024fdec6dbb8615d4d4caa5 Mon Sep 17 00:00:00 2001 From: Mathias Mogensen <42929161+Xazin@users.noreply.github.com> Date: Tue, 9 Apr 2024 13:26:40 +0200 Subject: [PATCH] fix: do not fetch reminders on resize window (#5100) --- .../presentation/home/desktop_home_screen.dart | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/frontend/appflowy_flutter/lib/workspace/presentation/home/desktop_home_screen.dart b/frontend/appflowy_flutter/lib/workspace/presentation/home/desktop_home_screen.dart index 1add004e82..5172ba004d 100644 --- a/frontend/appflowy_flutter/lib/workspace/presentation/home/desktop_home_screen.dart +++ b/frontend/appflowy_flutter/lib/workspace/presentation/home/desktop_home_screen.dart @@ -1,3 +1,6 @@ +import 'package:flutter/gestures.dart'; +import 'package:flutter/material.dart'; + import 'package:appflowy/plugins/blank/blank.dart'; import 'package:appflowy/startup/plugin/plugin.dart'; import 'package:appflowy/startup/startup.dart'; @@ -22,13 +25,12 @@ import 'package:appflowy_backend/protobuf/flowy-folder/protobuf.dart'; import 'package:appflowy_backend/protobuf/flowy-user/protobuf.dart' show UserProfilePB; import 'package:flowy_infra_ui/style_widget/container.dart'; -import 'package:flutter/gestures.dart'; -import 'package:flutter/material.dart'; import 'package:flutter_bloc/flutter_bloc.dart'; import 'package:sized_context/sized_context.dart'; import 'package:styled_widget/styled_widget.dart'; import '../widgets/edit_panel/edit_panel.dart'; + import 'home_layout.dart'; import 'home_stack.dart'; @@ -67,15 +69,11 @@ class DesktopHomeScreen extends StatelessWidget { return MultiBlocProvider( key: ValueKey(userProfile.id), providers: [ - BlocProvider.value( - value: getIt()..add(const ReminderEvent.started()), - ), + BlocProvider.value(value: getIt()), BlocProvider.value(value: getIt()), BlocProvider( - create: (context) { - return HomeBloc(workspaceSetting) - ..add(const HomeEvent.initial()); - }, + create: (_) => + HomeBloc(workspaceSetting)..add(const HomeEvent.initial()), ), BlocProvider( create: (_) {