From d73e388d019da3ff09d484d521b19d8ad4b0d749 Mon Sep 17 00:00:00 2001 From: "Lucas.Xu" Date: Wed, 5 Jun 2024 21:36:44 +0800 Subject: [PATCH] chore: disable sync indicator (#5479) --- .../mobile/presentation/base/mobile_view_page.dart | 8 -------- .../lib/plugins/database/tab_bar/tab_bar_view.dart | 11 ----------- .../database_document/database_document_page.dart | 4 ---- .../lib/plugins/document/document.dart | 6 ------ .../lib/plugins/document/document_page.dart | 4 ---- .../flowy_infra_ui/lib/style_widget/text.dart | 6 ++++-- 6 files changed, 4 insertions(+), 35 deletions(-) diff --git a/frontend/appflowy_flutter/lib/mobile/presentation/base/mobile_view_page.dart b/frontend/appflowy_flutter/lib/mobile/presentation/base/mobile_view_page.dart index 591f708546..9e21a002b1 100644 --- a/frontend/appflowy_flutter/lib/mobile/presentation/base/mobile_view_page.dart +++ b/frontend/appflowy_flutter/lib/mobile/presentation/base/mobile_view_page.dart @@ -6,7 +6,6 @@ import 'package:appflowy/mobile/presentation/base/view_page/app_bar_buttons.dart import 'package:appflowy/mobile/presentation/widgets/flowy_mobile_state_container.dart'; import 'package:appflowy/plugins/base/emoji/emoji_text.dart'; import 'package:appflowy/plugins/document/presentation/document_collaborators.dart'; -import 'package:appflowy/plugins/shared/sync_indicator.dart'; import 'package:appflowy/shared/feature_flags.dart'; import 'package:appflowy/startup/plugin/plugin.dart'; import 'package:appflowy/startup/startup.dart'; @@ -195,13 +194,6 @@ class _MobileViewPageState extends State { padding: const EdgeInsets.symmetric(vertical: 8), view: view, ), - const HSpace(16.0), - DocumentSyncIndicator(view: view), - const HSpace(12.0), - ]); - } else { - actions.addAll([ - DatabaseSyncIndicator(view: view), const HSpace(12.0), ]); } diff --git a/frontend/appflowy_flutter/lib/plugins/database/tab_bar/tab_bar_view.dart b/frontend/appflowy_flutter/lib/plugins/database/tab_bar/tab_bar_view.dart index aec6d954b4..690bac3fab 100644 --- a/frontend/appflowy_flutter/lib/plugins/database/tab_bar/tab_bar_view.dart +++ b/frontend/appflowy_flutter/lib/plugins/database/tab_bar/tab_bar_view.dart @@ -1,9 +1,7 @@ import 'package:appflowy/plugins/database/application/database_controller.dart'; import 'package:appflowy/plugins/database/application/tab_bar_bloc.dart'; import 'package:appflowy/plugins/database/widgets/share_button.dart'; -import 'package:appflowy/plugins/shared/sync_indicator.dart'; import 'package:appflowy/plugins/util.dart'; -import 'package:appflowy/shared/feature_flags.dart'; import 'package:appflowy/startup/plugin/plugin.dart'; import 'package:appflowy/workspace/application/view/view_bloc.dart'; import 'package:appflowy/workspace/application/view_info/view_info_bloc.dart'; @@ -272,15 +270,6 @@ class DatabasePluginWidgetBuilder extends PluginWidgetBuilder { value: bloc, child: Row( children: [ - ...FeatureFlag.syncDatabase.isOn - ? [ - DatabaseSyncIndicator( - key: ValueKey('sync_state_${view.id}'), - view: view, - ), - const HSpace(16), - ] - : [], DatabaseShareButton(key: ValueKey(view.id), view: view), const HSpace(10), ViewFavoriteButton(view: view), diff --git a/frontend/appflowy_flutter/lib/plugins/database_document/database_document_page.dart b/frontend/appflowy_flutter/lib/plugins/database_document/database_document_page.dart index 9f600e4a4e..c08b32d9ec 100644 --- a/frontend/appflowy_flutter/lib/plugins/database_document/database_document_page.dart +++ b/frontend/appflowy_flutter/lib/plugins/database_document/database_document_page.dart @@ -118,10 +118,6 @@ class _DatabaseDocumentPageState extends State { return Column( children: [ - // Only show the indicator in integration test mode - // if (FlowyRunner.currentMode.isIntegrationTest) - // const DocumentSyncIndicator(), - if (state.isDeleted) _buildBanner(context), Expanded(child: appflowyEditorPage), ], diff --git a/frontend/appflowy_flutter/lib/plugins/document/document.dart b/frontend/appflowy_flutter/lib/plugins/document/document.dart index b13ce1221c..ef11ef3403 100644 --- a/frontend/appflowy_flutter/lib/plugins/document/document.dart +++ b/frontend/appflowy_flutter/lib/plugins/document/document.dart @@ -6,7 +6,6 @@ import 'package:appflowy/plugins/document/application/document_appearance_cubit. import 'package:appflowy/plugins/document/document_page.dart'; import 'package:appflowy/plugins/document/presentation/document_collaborators.dart'; import 'package:appflowy/plugins/document/presentation/share/share_button.dart'; -import 'package:appflowy/plugins/shared/sync_indicator.dart'; import 'package:appflowy/plugins/util.dart'; import 'package:appflowy/shared/feature_flags.dart'; import 'package:appflowy/startup/plugin/plugin.dart'; @@ -153,11 +152,6 @@ class DocumentPluginWidgetBuilder extends PluginWidgetBuilder view: view, ), const HSpace(16), - DocumentSyncIndicator( - key: ValueKey('sync_state_${view.id}'), - view: view, - ), - const HSpace(16), ] : [const HSpace(8)], DocumentShareButton( diff --git a/frontend/appflowy_flutter/lib/plugins/document/document_page.dart b/frontend/appflowy_flutter/lib/plugins/document/document_page.dart index 231ff37bc9..097a23e5c9 100644 --- a/frontend/appflowy_flutter/lib/plugins/document/document_page.dart +++ b/frontend/appflowy_flutter/lib/plugins/document/document_page.dart @@ -139,10 +139,6 @@ class _DocumentPageState extends State return Column( children: [ - // Only show the indicator in integration test mode - // if (FlowyRunner.currentMode.isIntegrationTest) - // const DocumentSyncIndicator(), - if (state.isDeleted) _buildBanner(context), Expanded(child: child), ], diff --git a/frontend/appflowy_flutter/packages/flowy_infra_ui/lib/style_widget/text.dart b/frontend/appflowy_flutter/packages/flowy_infra_ui/lib/style_widget/text.dart index fafee3f623..71ac8e4854 100644 --- a/frontend/appflowy_flutter/packages/flowy_infra_ui/lib/style_widget/text.dart +++ b/frontend/appflowy_flutter/packages/flowy_infra_ui/lib/style_widget/text.dart @@ -143,6 +143,9 @@ class FlowyText extends StatelessWidget { if (fontFamily != null && fallbackFontFamily == null) { fallbackFontFamily = [fontFamily]; } + } + + if (isEmoji && (_useNotoColorEmoji || Platform.isWindows)) { fontSize = fontSize * 0.8; } @@ -199,6 +202,5 @@ class FlowyText extends StatelessWidget { return null; } - bool get _useNotoColorEmoji => - Platform.isLinux || Platform.isAndroid || Platform.isWindows; + bool get _useNotoColorEmoji => Platform.isLinux || Platform.isAndroid; }