diff --git a/frontend/appflowy_flutter/integration_test/desktop/settings/notifications_settings_test.dart b/frontend/appflowy_flutter/integration_test/desktop/settings/notifications_settings_test.dart index 46550aa81a..958910dd80 100644 --- a/frontend/appflowy_flutter/integration_test/desktop/settings/notifications_settings_test.dart +++ b/frontend/appflowy_flutter/integration_test/desktop/settings/notifications_settings_test.dart @@ -8,8 +8,8 @@ import '../../shared/util.dart'; void main() { IntegrationTestWidgetsFlutterBinding.ensureInitialized(); - group('board add row test', () { - testWidgets('Add card from header', (tester) async { + group('notification test', () { + testWidgets('enable notification', (tester) async { await tester.initializeAppFlowy(); await tester.tapAnonymousSignInButton(); @@ -17,7 +17,7 @@ void main() { await tester.openSettingsPage(SettingsPage.notifications); await tester.pumpAndSettle(); - final switchFinder = find.byType(Switch); + final switchFinder = find.byType(Switch).first; // Defaults to enabled Switch switchWidget = tester.widget(switchFinder); diff --git a/frontend/appflowy_flutter/lib/mobile/presentation/home/section_folder/mobile_home_section_folder.dart b/frontend/appflowy_flutter/lib/mobile/presentation/home/section_folder/mobile_home_section_folder.dart index 96640522cb..7a14a4d48d 100644 --- a/frontend/appflowy_flutter/lib/mobile/presentation/home/section_folder/mobile_home_section_folder.dart +++ b/frontend/appflowy_flutter/lib/mobile/presentation/home/section_folder/mobile_home_section_folder.dart @@ -1,11 +1,9 @@ import 'package:appflowy/generated/locale_keys.g.dart'; import 'package:appflowy/mobile/application/mobile_router.dart'; -import 'package:appflowy/mobile/presentation/bottom_sheet/default_mobile_action_pane.dart'; import 'package:appflowy/mobile/presentation/home/section_folder/mobile_home_section_folder_header.dart'; import 'package:appflowy/mobile/presentation/page_item/mobile_view_item.dart'; import 'package:appflowy/workspace/application/menu/sidebar_sections_bloc.dart'; import 'package:appflowy/workspace/application/sidebar/folder/folder_bloc.dart'; -import 'package:appflowy/workspace/application/view/view_bloc.dart'; import 'package:appflowy/workspace/presentation/home/home_sizes.dart'; import 'package:appflowy_backend/protobuf/flowy-folder/view.pb.dart'; import 'package:easy_localization/easy_localization.dart'; @@ -71,16 +69,6 @@ class MobileSectionFolder extends StatelessWidget { leftPadding: HomeSpaceViewSizes.leftPadding, isFeedback: false, onSelected: context.pushView, - endActionPane: (context) { - final view = context.read().state.view; - return buildEndActionPane(context, [ - MobilePaneActionType.delete, - view.isFavorite - ? MobilePaneActionType.removeFromFavorites - : MobilePaneActionType.addToFavorites, - MobilePaneActionType.more, - ]); - }, ), ), ], diff --git a/frontend/appflowy_flutter/lib/mobile/presentation/home/shared/mobile_view_card.dart b/frontend/appflowy_flutter/lib/mobile/presentation/home/shared/mobile_view_card.dart index 2b22a185f6..b93123db6a 100644 --- a/frontend/appflowy_flutter/lib/mobile/presentation/home/shared/mobile_view_card.dart +++ b/frontend/appflowy_flutter/lib/mobile/presentation/home/shared/mobile_view_card.dart @@ -154,6 +154,9 @@ class MobileViewCard extends StatelessWidget { Widget _buildTitle(BuildContext context, RecentViewState state) { final name = state.name; final icon = state.icon; + final fontFamily = Platform.isAndroid || Platform.isLinux + ? GoogleFonts.notoColorEmoji().fontFamily + : null; return RichText( maxLines: 3, overflow: TextOverflow.ellipsis, @@ -164,10 +167,10 @@ class MobileViewCard extends StatelessWidget { style: Theme.of(context).textTheme.bodyMedium!.copyWith( fontSize: 17.0, fontWeight: FontWeight.w600, - fontFamily: GoogleFonts.notoColorEmoji().fontFamily, + fontFamily: fontFamily, ), ), - const TextSpan(text: ' '), + if (icon.isNotEmpty) const WidgetSpan(child: HSpace(2.0)), TextSpan( text: name, style: Theme.of(context).textTheme.bodyMedium!.copyWith( diff --git a/frontend/appflowy_flutter/lib/workspace/application/recent/cached_recent_service.dart b/frontend/appflowy_flutter/lib/workspace/application/recent/cached_recent_service.dart index 47491e8773..f4245c3100 100644 --- a/frontend/appflowy_flutter/lib/workspace/application/recent/cached_recent_service.dart +++ b/frontend/appflowy_flutter/lib/workspace/application/recent/cached_recent_service.dart @@ -48,13 +48,22 @@ class CachedRecentService { Future> updateRecentViews( List viewIds, bool addInRecent, - ) async => - FolderEventUpdateRecentViews( - UpdateRecentViewPayloadPB( - viewIds: viewIds, - addInRecent: addInRecent, - ), - ).send(); + ) async { + final List duplicatedViewIds = []; + for (final viewId in viewIds) { + for (final view in _recentViews) { + if (view.item.id == viewId) { + duplicatedViewIds.add(viewId); + } + } + } + return FolderEventUpdateRecentViews( + UpdateRecentViewPayloadPB( + viewIds: addInRecent ? viewIds : duplicatedViewIds, + addInRecent: addInRecent, + ), + ).send(); + } Future> _readRecentViews() => FolderEventReadRecentViews().send(); 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 82779ecdae..10065b3dc7 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 @@ -138,7 +138,7 @@ class FlowyText extends StatelessWidget { var fontFamily = this.fontFamily; var fallbackFontFamily = this.fallbackFontFamily; - if (isEmoji) { + if (isEmoji && (Platform.isLinux || Platform.isAndroid)) { fontFamily = _loadEmojiFontFamilyIfNeeded(); if (fontFamily != null && fallbackFontFamily == null) { fallbackFontFamily = [fontFamily];