Skip to content

Bring projects, wikis, and teams together with AI. AppFlowy is the AI collaborative workspace where you achieve more without losing control of your data. The leading open source Notion alternative.

chore: rename some classes

appflowy22742c904b4a
diff --git a/frontend/app_flowy/lib/main.dart b/frontend/app_flowy/lib/main.dart
index a2d7f66605..8b1da85f75 100644
--- a/frontend/app_flowy/lib/main.dart
+++ b/frontend/app_flowy/lib/main.dart
@@ -14,5 +14,5 @@ void main() async {
WidgetsFlutterBinding.ensureInitialized();
await EasyLocalization.ensureInitialized();
- await FlowySystem.run(FlowyApp());
+ await FlowyRunner.run(FlowyApp());
}
diff --git a/frontend/app_flowy/lib/startup/startup.dart b/frontend/app_flowy/lib/startup/startup.dart
index 995060bb0c..798af38c49 100644
--- a/frontend/app_flowy/lib/startup/startup.dart
+++ b/frontend/app_flowy/lib/startup/startup.dart
@@ -31,7 +31,7 @@ abstract class EntryPoint {
Widget create();
}
-class FlowySystem {
+class FlowyRunner {
static Future<void> run(EntryPoint f) async {
// Specify the env
final env = integrationEnv();
@@ -41,8 +41,8 @@ class FlowySystem {
getIt<AppLauncher>().addTask(InitRustSDKTask());
if (!env.isTest()) {
- getIt<AppLauncher>().addTask(ApplicationWidgetTask());
- getIt<AppLauncher>().addTask(InitPlatformService());
+ getIt<AppLauncher>().addTask(InitAppWidgetTask());
+ getIt<AppLauncher>().addTask(InitPlatformServiceTask());
}
// execute the tasks
diff --git a/frontend/app_flowy/lib/startup/tasks/app_widget.dart b/frontend/app_flowy/lib/startup/tasks/app_widget.dart
index 2c85a15335..a50e871795 100644
--- a/frontend/app_flowy/lib/startup/tasks/app_widget.dart
+++ b/frontend/app_flowy/lib/startup/tasks/app_widget.dart
@@ -10,7 +10,7 @@ import 'package:window_size/window_size.dart';
import 'package:bloc/bloc.dart';
import 'package:flowy_sdk/log.dart';
-class ApplicationWidgetTask extends LaunchTask {
+class InitAppWidgetTask extends LaunchTask {
@override
LaunchTaskType get type => LaunchTaskType.appLauncher;
diff --git a/frontend/app_flowy/lib/startup/tasks/platform_service.dart b/frontend/app_flowy/lib/startup/tasks/platform_service.dart
index a2e8d1e98d..950ea3aaf7 100644
--- a/frontend/app_flowy/lib/startup/tasks/platform_service.dart
+++ b/frontend/app_flowy/lib/startup/tasks/platform_service.dart
@@ -1,12 +1,12 @@
import 'package:app_flowy/user/infrastructure/network_monitor.dart';
import '../startup.dart';
-class InitPlatformService extends LaunchTask {
+class InitPlatformServiceTask extends LaunchTask {
@override
LaunchTaskType get type => LaunchTaskType.dataProcessing;
@override
Future<void> initialize(LaunchContext context) async {
- getIt<NetworkMonitor>().start();
+ getIt<NetworkListener>().start();
}
}
diff --git a/frontend/app_flowy/lib/user/infrastructure/deps_resolver.dart b/frontend/app_flowy/lib/user/infrastructure/deps_resolver.dart
index 1d3bedb833..9f6e6aadc6 100644
--- a/frontend/app_flowy/lib/user/infrastructure/deps_resolver.dart
+++ b/frontend/app_flowy/lib/user/infrastructure/deps_resolver.dart
@@ -24,6 +24,6 @@ class UserDepsResolver {
getIt.registerFactory<HomeBloc>(() => HomeBloc());
getIt.registerFactory<EditPannelBloc>(() => EditPannelBloc());
getIt.registerFactory<SplashBloc>(() => SplashBloc());
- getIt.registerLazySingleton<NetworkMonitor>(() => NetworkMonitor());
+ getIt.registerLazySingleton<NetworkListener>(() => NetworkListener());
}
}
diff --git a/frontend/app_flowy/lib/user/infrastructure/network_monitor.dart b/frontend/app_flowy/lib/user/infrastructure/network_monitor.dart
index a21dc56005..ba7806873d 100644
--- a/frontend/app_flowy/lib/user/infrastructure/network_monitor.dart
+++ b/frontend/app_flowy/lib/user/infrastructure/network_monitor.dart
@@ -6,11 +6,11 @@ import 'package:flowy_sdk/dispatch/dispatch.dart';
import 'package:flowy_sdk/protobuf/flowy-net/network_state.pb.dart';
import 'package:flutter/services.dart';
-class NetworkMonitor {
+class NetworkListener {
final Connectivity _connectivity = Connectivity();
late StreamSubscription<ConnectivityResult> _connectivitySubscription;
- NetworkMonitor() {
+ NetworkListener() {
_connectivitySubscription = _connectivity.onConnectivityChanged.listen(_updateConnectionStatus);
}
diff --git a/frontend/app_flowy/test/util/test_env.dart b/frontend/app_flowy/test/util/test_env.dart
index 9f4c27d2bc..e2dd3c8f7d 100644
--- a/frontend/app_flowy/test/util/test_env.dart
+++ b/frontend/app_flowy/test/util/test_env.dart
@@ -10,7 +10,7 @@ class FlowyTest {
TestWidgetsFlutterBinding.ensureInitialized();
// await EasyLocalization.ensureInitialized();
- await FlowySystem.run(FlowyTestApp());
+ await FlowyRunner.run(FlowyTestApp());
return FlowyTest();
}
diff --git a/frontend/app_flowy/test/workspace_bloc_test.dart b/frontend/app_flowy/test/workspace_bloc_test.dart
index eb21634faa..f4dba63a11 100644
--- a/frontend/app_flowy/test/workspace_bloc_test.dart
+++ b/frontend/app_flowy/test/workspace_bloc_test.dart
@@ -15,7 +15,7 @@ void main() {
group('WelcomeBloc', () {
blocTest<WelcomeBloc, WelcomeState>(
- "create workspace",
+ "welcome screen init",
build: () => getIt<WelcomeBloc>(param1: userInfo),
act: (bloc) {
bloc.add(const WelcomeEvent.initial());