Skip to content

Commit

Permalink
Remove unused areas dialog and implement join, leave area
Browse files Browse the repository at this point in the history
  • Loading branch information
CodeDoctorDE committed Jan 30, 2024
1 parent 9716bd8 commit ffc796e
Show file tree
Hide file tree
Showing 9 changed files with 104 additions and 245 deletions.
29 changes: 0 additions & 29 deletions app/lib/actions/areas.dart

This file was deleted.

3 changes: 3 additions & 0 deletions app/lib/bloc/document_state.dart
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@ abstract class DocumentState extends Equatable {
NetworkingService? get networkingService =>
currentIndexCubit?.state.networkingService;
Embedding? get embedding => currentIndexCubit?.state.embedding;
Area? get currentArea => null;

NoteData? saveData([NoteData? current]) => data;
List<int>? saveBytes([NoteData? current]) => saveData()?.save();
}
Expand Down Expand Up @@ -82,6 +84,7 @@ abstract class DocumentLoaded extends DocumentState {

List<String> get invisibleLayers => [];

@override
Area? get currentArea => null;

AssetLocation get location => currentIndexCubit.state.location;
Expand Down
156 changes: 0 additions & 156 deletions app/lib/dialogs/area/dialog.dart

This file was deleted.

7 changes: 4 additions & 3 deletions app/lib/dialogs/import/pages.dart
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,8 @@ class PageDialogCallback {
final bool spreadToPages, createAreas;
final double quality;

const PageDialogCallback(this.pages, this.quality, this.spreadToPages, this.createAreas);
const PageDialogCallback(
this.pages, this.quality, this.spreadToPages, this.createAreas);
}

class PagesDialog extends StatefulWidget {
Expand Down Expand Up @@ -128,8 +129,8 @@ class _PagesDialogState extends State<PagesDialog> {
),
ElevatedButton(
child: Text(AppLocalizations.of(context).ok),
onPressed: () => Navigator.of(context).pop(
PageDialogCallback(_selected, _quality, _spreadToPages, _createAreas)),
onPressed: () => Navigator.of(context).pop(PageDialogCallback(
_selected, _quality, _spreadToPages, _createAreas)),
),
],
),
Expand Down
7 changes: 0 additions & 7 deletions app/lib/views/main.dart
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ import 'package:flutter_gen/gen_l10n/app_localizations.dart';
import 'package:phosphor_flutter/phosphor_flutter.dart';
import 'package:shared_preferences/shared_preferences.dart';

import '../actions/areas.dart';
import '../actions/background.dart';
import '../actions/change_tool.dart';
import '../actions/change_path.dart';
Expand Down Expand Up @@ -96,7 +95,6 @@ class _ProjectPageState extends State<ProjectPage> {
PdfExportIntent: PdfExportAction(),
ExportIntent: ExportAction(),
SettingsIntent: SettingsAction(),
AreasIntent: AreasAction(),
ColorPaletteIntent: ColorPaletteAction(),
BackgroundIntent: BackgroundAction(),
ChangePathIntent: ChangePathAction(),
Expand Down Expand Up @@ -347,11 +345,6 @@ class _ProjectPageState extends State<ProjectPage> {
LogicalKeySet(LogicalKeyboardKey.control,
LogicalKeyboardKey.keyB):
BackgroundIntent(context),
LogicalKeySet(
LogicalKeyboardKey.control,
LogicalKeyboardKey.shift,
LogicalKeyboardKey.keyA):
AreasIntent(context),
LogicalKeySet(LogicalKeyboardKey.escape):
ExitIntent(context),
LogicalKeySet(LogicalKeyboardKey.f11):
Expand Down
Loading

0 comments on commit ffc796e

Please sign in to comment.