Skip to content

Commit

Permalink
chore: cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
squidrye committed Nov 15, 2023
1 parent c31c5b9 commit 24b6bf9
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 14 deletions.
Empty file.
4 changes: 0 additions & 4 deletions frontend/appflowy_flutter/integration_test/runner.dart
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,7 @@ import 'sidebar/sidebar_test_runner.dart' as sidebar_test_runner;
import 'tabs/tabs_test.dart' as tabs_test;
import 'empty_test.dart' as first_test;
import 'hotkeys_test.dart' as hotkeys_test;
import 'import_files_test.dart' as import_files_test;
import 'settings/settings_runner.dart' as settings_test_runner;
import 'share_markdown_test.dart' as share_markdown_test;
import 'sidebar/sidebar_test_runner.dart' as sidebar_test_runner;
import 'switch_folder_test.dart' as switch_folder_test;
import 'panes/panes_test.dart' as panes_test;
import 'panes/panes_overlay_test.dart' as panes_overlay_test;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@ import 'dart:math';
import 'package:bloc/bloc.dart';
import 'package:freezed_annotation/freezed_annotation.dart';

part 'pane_node_cubit.freezed.dart';
part 'pane_node_bloc.freezed.dart';

class PaneNodeCubit extends Bloc<PaneNodeEvent, PaneNodeState> {
PaneNodeCubit(int length, double size)
class PaneNodeBloc extends Bloc<PaneNodeEvent, PaneNodeState> {
PaneNodeBloc(int length, double size)
: super(PaneNodeState.initial(length: length, size: size)) {
on<PaneNodeEvent>(
(event, emit) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -100,14 +100,14 @@ class PanesBloc extends Bloc<PanesEvent, PanesState> {
movePane: (e) {
final direction = [
FlowyDraggableHoverPosition.top,
FlowyDraggableHoverPosition.left
FlowyDraggableHoverPosition.left,
].contains(e.position)
? Direction.back
: Direction.front;

final axis = [
FlowyDraggableHoverPosition.left,
FlowyDraggableHoverPosition.right
FlowyDraggableHoverPosition.right,
].contains(e.position)
? Axis.vertical
: Axis.horizontal;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import 'package:appflowy/workspace/application/panes/pane_node_cubit.dart';
import 'package:appflowy/workspace/application/panes/pane_node_bloc/pane_node_bloc.dart';
import 'package:appflowy/workspace/application/panes/panes.dart';
import 'package:appflowy/workspace/application/panes/panes_bloc/panes_bloc.dart';

Expand Down Expand Up @@ -59,13 +59,13 @@ class FlowyPaneGroup extends StatelessWidget {

return BlocProvider(
key: ValueKey(node.paneId + node.tabsController.tabId),
create: (context) => PaneNodeCubit(
create: (context) => PaneNodeBloc(
node.children.length,
node.axis == Axis.horizontal
? paneLayout.childPaneHeight
: paneLayout.childPaneWidth,
),
child: BlocBuilder<PaneNodeCubit, PaneNodeState>(
child: BlocBuilder<PaneNodeBloc, PaneNodeState>(
builder: (context, state) {
return SizedBox(
child: LayoutBuilder(
Expand Down Expand Up @@ -118,7 +118,7 @@ class FlowyPaneGroup extends StatelessWidget {
top: paneLayout.childPaneTPosition,
child: GestureDetector(
onHorizontalDragUpdate: (details) {
context.read<PaneNodeCubit>().add(
context.read<PaneNodeBloc>().add(
ResizeUpdate(
targetIndex: indexNode.$1,
offset: details.delta.dx,
Expand All @@ -127,7 +127,7 @@ class FlowyPaneGroup extends StatelessWidget {
);
},
onVerticalDragUpdate: (details) {
context.read<PaneNodeCubit>().add(
context.read<PaneNodeBloc>().add(
ResizeUpdate(
targetIndex: indexNode.$1,
offset: details.delta.dy,
Expand Down

0 comments on commit 24b6bf9

Please sign in to comment.