From c2f2ad24dba3dd74a0bc9de1a3ae8cd2a37f17bf Mon Sep 17 00:00:00 2001 From: MikeWallaceDev Date: Tue, 1 Mar 2022 10:48:34 -0500 Subject: [PATCH] refactor: Empty out infrastructure folder move router.dart to user/presentation move network_monitor.dart to core move deps_resolver.dart to user/presentation --- .../lib/{user/infrastructure => core}/network_monitor.dart | 0 frontend/app_flowy/lib/startup/startup.dart | 2 +- frontend/app_flowy/lib/startup/tasks/platform_service.dart | 2 +- .../user/{infrastructure => presentation}/deps_resolver.dart | 4 ++-- .../lib/user/{infrastructure => presentation}/router.dart | 0 frontend/app_flowy/lib/user/presentation/sign_in_screen.dart | 2 +- frontend/app_flowy/lib/user/presentation/sign_up_screen.dart | 2 +- .../app_flowy/lib/user/presentation/skip_log_in_screen.dart | 2 +- frontend/app_flowy/lib/user/presentation/splash_screen.dart | 2 +- 9 files changed, 8 insertions(+), 8 deletions(-) rename frontend/app_flowy/lib/{user/infrastructure => core}/network_monitor.dart (100%) rename frontend/app_flowy/lib/user/{infrastructure => presentation}/deps_resolver.dart (92%) rename frontend/app_flowy/lib/user/{infrastructure => presentation}/router.dart (100%) diff --git a/frontend/app_flowy/lib/user/infrastructure/network_monitor.dart b/frontend/app_flowy/lib/core/network_monitor.dart similarity index 100% rename from frontend/app_flowy/lib/user/infrastructure/network_monitor.dart rename to frontend/app_flowy/lib/core/network_monitor.dart diff --git a/frontend/app_flowy/lib/startup/startup.dart b/frontend/app_flowy/lib/startup/startup.dart index 7b19c78f2a..916b3edf87 100644 --- a/frontend/app_flowy/lib/startup/startup.dart +++ b/frontend/app_flowy/lib/startup/startup.dart @@ -6,7 +6,7 @@ import 'package:flutter/foundation.dart'; import 'package:flutter/material.dart'; import 'package:get_it/get_it.dart'; import 'package:app_flowy/startup/deps_resolver.dart'; -import 'package:app_flowy/user/infrastructure/deps_resolver.dart'; +import 'package:app_flowy/user/presentation/deps_resolver.dart'; import 'package:flowy_sdk/flowy_sdk.dart'; // [[diagram: flowy startup flow]] diff --git a/frontend/app_flowy/lib/startup/tasks/platform_service.dart b/frontend/app_flowy/lib/startup/tasks/platform_service.dart index 950ea3aaf7..55a59c186a 100644 --- a/frontend/app_flowy/lib/startup/tasks/platform_service.dart +++ b/frontend/app_flowy/lib/startup/tasks/platform_service.dart @@ -1,4 +1,4 @@ -import 'package:app_flowy/user/infrastructure/network_monitor.dart'; +import 'package:app_flowy/core/network_monitor.dart'; import '../startup.dart'; class InitPlatformServiceTask extends LaunchTask { diff --git a/frontend/app_flowy/lib/user/infrastructure/deps_resolver.dart b/frontend/app_flowy/lib/user/presentation/deps_resolver.dart similarity index 92% rename from frontend/app_flowy/lib/user/infrastructure/deps_resolver.dart rename to frontend/app_flowy/lib/user/presentation/deps_resolver.dart index b2d83a6f3d..429a4874ba 100644 --- a/frontend/app_flowy/lib/user/infrastructure/deps_resolver.dart +++ b/frontend/app_flowy/lib/user/presentation/deps_resolver.dart @@ -2,12 +2,12 @@ import 'package:app_flowy/user/application/auth_service.dart'; import 'package:app_flowy/user/application/sign_in_bloc.dart'; import 'package:app_flowy/user/application/sign_up_bloc.dart'; import 'package:app_flowy/user/application/splash_bloc.dart'; -import 'package:app_flowy/user/infrastructure/router.dart'; +import 'package:app_flowy/user/presentation/router.dart'; import 'package:app_flowy/workspace/application/edit_pannel/edit_pannel_bloc.dart'; import 'package:app_flowy/workspace/application/home/home_bloc.dart'; import 'package:get_it/get_it.dart'; -import 'network_monitor.dart'; +import '../../core/network_monitor.dart'; class UserDepsResolver { static Future resolve(GetIt getIt) async { diff --git a/frontend/app_flowy/lib/user/infrastructure/router.dart b/frontend/app_flowy/lib/user/presentation/router.dart similarity index 100% rename from frontend/app_flowy/lib/user/infrastructure/router.dart rename to frontend/app_flowy/lib/user/presentation/router.dart diff --git a/frontend/app_flowy/lib/user/presentation/sign_in_screen.dart b/frontend/app_flowy/lib/user/presentation/sign_in_screen.dart index 07ca83f64a..f7afa0b4d3 100644 --- a/frontend/app_flowy/lib/user/presentation/sign_in_screen.dart +++ b/frontend/app_flowy/lib/user/presentation/sign_in_screen.dart @@ -1,6 +1,6 @@ import 'package:app_flowy/startup/startup.dart'; import 'package:app_flowy/user/application/sign_in_bloc.dart'; -import 'package:app_flowy/user/infrastructure/router.dart'; +import 'package:app_flowy/user/presentation/router.dart'; import 'package:app_flowy/user/presentation/widgets/background.dart'; import 'package:easy_localization/easy_localization.dart'; import 'package:flowy_infra/size.dart'; diff --git a/frontend/app_flowy/lib/user/presentation/sign_up_screen.dart b/frontend/app_flowy/lib/user/presentation/sign_up_screen.dart index 00c47a6326..931ccff516 100644 --- a/frontend/app_flowy/lib/user/presentation/sign_up_screen.dart +++ b/frontend/app_flowy/lib/user/presentation/sign_up_screen.dart @@ -1,6 +1,6 @@ import 'package:app_flowy/startup/startup.dart'; import 'package:app_flowy/user/application/sign_up_bloc.dart'; -import 'package:app_flowy/user/infrastructure/router.dart'; +import 'package:app_flowy/user/presentation/router.dart'; import 'package:app_flowy/user/presentation/widgets/background.dart'; import 'package:easy_localization/easy_localization.dart'; import 'package:flowy_infra/theme.dart'; diff --git a/frontend/app_flowy/lib/user/presentation/skip_log_in_screen.dart b/frontend/app_flowy/lib/user/presentation/skip_log_in_screen.dart index ab608a5bf8..bad8000643 100644 --- a/frontend/app_flowy/lib/user/presentation/skip_log_in_screen.dart +++ b/frontend/app_flowy/lib/user/presentation/skip_log_in_screen.dart @@ -1,6 +1,6 @@ import 'package:app_flowy/user/application/auth_service.dart'; import 'package:app_flowy/user/application/user_listener.dart'; -import 'package:app_flowy/user/infrastructure/router.dart'; +import 'package:app_flowy/user/presentation/router.dart'; import 'package:app_flowy/user/presentation/widgets/background.dart'; import 'package:easy_localization/easy_localization.dart'; import 'package:flowy_infra/size.dart'; diff --git a/frontend/app_flowy/lib/user/presentation/splash_screen.dart b/frontend/app_flowy/lib/user/presentation/splash_screen.dart index bbe04e4b18..5fe302abd0 100644 --- a/frontend/app_flowy/lib/user/presentation/splash_screen.dart +++ b/frontend/app_flowy/lib/user/presentation/splash_screen.dart @@ -1,7 +1,7 @@ import 'package:app_flowy/startup/startup.dart'; import 'package:app_flowy/user/application/splash_bloc.dart'; import 'package:app_flowy/user/domain/auth_state.dart'; -import 'package:app_flowy/user/infrastructure/router.dart'; +import 'package:app_flowy/user/presentation/router.dart'; import 'package:flowy_sdk/log.dart'; import 'package:flowy_sdk/dispatch/dispatch.dart'; import 'package:flowy_sdk/protobuf/flowy-folder-data-model/errors.pb.dart';