Skip to content

Commit

Permalink
chore: remove check logic
Browse files Browse the repository at this point in the history
  • Loading branch information
LucasXu0 committed Jul 15, 2024
1 parent 90ffbf7 commit 65b5e62
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 20 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ import 'package:appflowy/workspace/application/view/view_service.dart';
import 'package:appflowy/workspace/application/workspace/prelude.dart';
import 'package:appflowy/workspace/application/workspace/workspace_sections_listener.dart';
import 'package:appflowy/workspace/presentation/home/menu/sidebar/space/space_icon_popup.dart';
import 'package:appflowy/workspace/presentation/settings/pages/fix_data_widget.dart';
import 'package:appflowy_backend/log.dart';
import 'package:appflowy_backend/protobuf/flowy-error/errors.pb.dart';
import 'package:appflowy_backend/protobuf/flowy-folder/view.pb.dart';
Expand Down Expand Up @@ -101,10 +100,6 @@ class SpaceBloc extends Bloc<SpaceEvent, SpaceState> {
add(SpaceEvent.open(currentSpace));
}
}

if (!hasRunCheck) {
unawaited(_checkViewsRelationship());
}
},
create: (
name,
Expand Down Expand Up @@ -350,7 +345,6 @@ class SpaceBloc extends Bloc<SpaceEvent, SpaceState> {
String? _workspaceId;
late UserProfilePB userProfile;
WorkspaceSectionsListener? _listener;
bool hasRunCheck = false;

@override
Future<void> close() async {
Expand Down Expand Up @@ -441,8 +435,6 @@ class SpaceBloc extends Bloc<SpaceEvent, SpaceState> {
_workspaceId = workspaceId;
this.userProfile = userProfile;

hasRunCheck = false;

_listener = WorkspaceSectionsListener(
user: userProfile,
workspaceId: workspaceId,
Expand Down Expand Up @@ -634,17 +626,6 @@ class SpaceBloc extends Bloc<SpaceEvent, SpaceState> {
}
}

Future<void> _checkViewsRelationship() async {
// during moving, some views were assigned to the a parent view id,
// but they are not in the parent view's child views
final issueViews = await WorkspaceDataManager.checkViewHealth();
for (final view in issueViews) {
Log.info('space: found an issue: $view is not in its parent view');
}

add(SpaceEvent.updateIssueViews(issueViews));
}

Future<bool> shouldShowUpgradeDialog({
required List<ViewPB> spaces,
required List<ViewPB> publicViews,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ class HomeSideBar extends StatelessWidget {
context: context,
title: 'Some errors happened',
description:
'There are ${state.issueViews.length} pages (${state.issueViews.map((e) => e.name).join(', ')}) that have issues. Press OK to fix them. ',
'There are 2 pages (Module 3, Module 4) that have not been synced to the space. Click OK to sync them.',
onConfirm: () {
context.read<SpaceBloc>().add(
const SpaceEvent.reassignIssueViews(),
Expand Down

0 comments on commit 65b5e62

Please sign in to comment.