diff --git a/frontend/appflowy_flutter/lib/env/cloud_env.dart b/frontend/appflowy_flutter/lib/env/cloud_env.dart index 12042d066dbeb..8f4d195eb7b14 100644 --- a/frontend/appflowy_flutter/lib/env/cloud_env.dart +++ b/frontend/appflowy_flutter/lib/env/cloud_env.dart @@ -159,7 +159,7 @@ Future _setAppFlowyCloudUrl(String? url) async { Future useBaseWebDomain(String? url) async { await getIt().set( KVKeys.kAppFlowyBaseShareDomain, - url ?? ShareConstants.baseWebDomain, + url ?? ShareConstants.defaultBaseWebDomain, ); } diff --git a/frontend/appflowy_flutter/lib/env/env.dart b/frontend/appflowy_flutter/lib/env/env.dart index 182139ed41bfe..18434f9aa6f68 100644 --- a/frontend/appflowy_flutter/lib/env/env.dart +++ b/frontend/appflowy_flutter/lib/env/env.dart @@ -48,7 +48,7 @@ abstract class Env { @EnviedField( obfuscate: false, varName: 'BASE_WEB_DOMAIN', - defaultValue: ShareConstants.baseWebDomain, + defaultValue: ShareConstants.defaultBaseWebDomain, ) static const String baseWebDomain = _Env.baseWebDomain; } diff --git a/frontend/appflowy_flutter/lib/plugins/shared/share/constants.dart b/frontend/appflowy_flutter/lib/plugins/shared/share/constants.dart index 4027f41474acb..90d2a21928816 100644 --- a/frontend/appflowy_flutter/lib/plugins/shared/share/constants.dart +++ b/frontend/appflowy_flutter/lib/plugins/shared/share/constants.dart @@ -2,9 +2,8 @@ import 'package:appflowy/env/cloud_env.dart'; import 'package:appflowy/startup/startup.dart'; class ShareConstants { - static const String baseWebDomain = 'appflowy.com'; static const String testBaseWebDomain = 'test.appflowy.com'; - static const String defaultBaseWebDomain = 'https://www.appflowy.com'; + static const String defaultBaseWebDomain = 'https://appflowy.com'; static String buildPublishUrl({ required String nameSpace, diff --git a/frontend/appflowy_flutter/lib/shared/patterns/common_patterns.dart b/frontend/appflowy_flutter/lib/shared/patterns/common_patterns.dart index 3edefb98557dc..4b07db8c78882 100644 --- a/frontend/appflowy_flutter/lib/shared/patterns/common_patterns.dart +++ b/frontend/appflowy_flutter/lib/shared/patterns/common_patterns.dart @@ -37,7 +37,7 @@ const _macOSVolumesPattern = '^/Volumes/[^/]+'; final macOSVolumesRegex = RegExp(_macOSVolumesPattern); const appflowySharePageLinkPattern = - r'^https://www\.appflowy\.com/app/([^/]+)/([^?]+)(?:\?blockId=(.+))?$'; + r'^https://appflowy\.com/app/([^/]+)/([^?]+)(?:\?blockId=(.+))?$'; final appflowySharePageLinkRegex = RegExp(appflowySharePageLinkPattern); const _numberedListPattern = r'^(\d+)\.'; diff --git a/frontend/appflowy_flutter/lib/workspace/application/command_palette/command_palette_bloc.dart b/frontend/appflowy_flutter/lib/workspace/application/command_palette/command_palette_bloc.dart index 21d6a501c5d35..18fba610185d2 100644 --- a/frontend/appflowy_flutter/lib/workspace/application/command_palette/command_palette_bloc.dart +++ b/frontend/appflowy_flutter/lib/workspace/application/command_palette/command_palette_bloc.dart @@ -129,31 +129,6 @@ class CommandPaletteBloc ); } - List _filterDuplicates(List results) { - final currentItems = [...state.results]; - final res = [...results]; - - for (final item in results) { - if (item.data.trim().isEmpty) { - continue; - } - - final duplicateIndex = currentItems.indexWhere((a) => a.id == item.id); - if (duplicateIndex == -1) { - continue; - } - - final duplicate = currentItems[duplicateIndex]; - if (item.score < duplicate.score) { - res.remove(item); - } else { - currentItems.remove(duplicate); - } - } - - return res..addAll(currentItems); - } - void _performSearch(String value) => add(CommandPaletteEvent.performSearch(search: value));