Skip to content

Commit

Permalink
fix: replace the old web base url with the new one
Browse files Browse the repository at this point in the history
  • Loading branch information
LucasXu0 committed Jan 8, 2025
1 parent 1160d3d commit a0d0794
Show file tree
Hide file tree
Showing 5 changed files with 4 additions and 30 deletions.
2 changes: 1 addition & 1 deletion frontend/appflowy_flutter/lib/env/cloud_env.dart
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ Future<void> _setAppFlowyCloudUrl(String? url) async {
Future<void> useBaseWebDomain(String? url) async {
await getIt<KeyValueStorage>().set(
KVKeys.kAppFlowyBaseShareDomain,
url ?? ShareConstants.baseWebDomain,
url ?? ShareConstants.defaultBaseWebDomain,
);
}

Expand Down
2 changes: 1 addition & 1 deletion frontend/appflowy_flutter/lib/env/env.dart
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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+)\.';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -129,31 +129,6 @@ class CommandPaletteBloc
);
}

List<SearchResultPB> _filterDuplicates(List<SearchResultPB> 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));

Expand Down

0 comments on commit a0d0794

Please sign in to comment.