From 5e006aae71bfabe3d4399b01c5ab3c277907fbd3 Mon Sep 17 00:00:00 2001 From: CodeDoctorDE Date: Thu, 15 Sep 2022 17:07:06 +0200 Subject: [PATCH 1/2] Fix sync mode, fix move --- app/FLUTTER_VERSION | 2 +- app/lib/cubits/settings.dart | 1 + app/lib/handlers/hand.dart | 16 +++++--- app/pubspec.lock | 41 ++++++++----------- app/pubspec.yaml | 14 +++---- .../metadata/android/en-US/changelogs/44.txt | 1 + 6 files changed, 37 insertions(+), 38 deletions(-) diff --git a/app/FLUTTER_VERSION b/app/FLUTTER_VERSION index 712bd5a680e5..5436ea06e3e4 100644 --- a/app/FLUTTER_VERSION +++ b/app/FLUTTER_VERSION @@ -1 +1 @@ -3.3.1 \ No newline at end of file +3.3.2 \ No newline at end of file diff --git a/app/lib/cubits/settings.dart b/app/lib/cubits/settings.dart index 78f748d63061..e89bfd630fb0 100644 --- a/app/lib/cubits/settings.dart +++ b/app/lib/cubits/settings.dart @@ -213,6 +213,7 @@ class ButterflySettings with _$ButterflySettings { 'remotes', remotes.map((e) => json.encode(e.toJson())).toList()); await prefs.setString('default_remote', defaultRemote); await prefs.setBool('native_window_title_bar', nativeWindowTitleBar); + await prefs.setString('sync_mode', syncMode.name); } RemoteStorage? getRemote(String identifier) { diff --git a/app/lib/handlers/hand.dart b/app/lib/handlers/hand.dart index a2ec9b0de94e..39709b0d9ab3 100644 --- a/app/lib/handlers/hand.dart +++ b/app/lib/handlers/hand.dart @@ -51,12 +51,12 @@ class HandHandler extends Handler { } } - void submitMove(BuildContext context) { - if (movingElement == null) return; - currentMovePosition = null; - final bloc = context.read(); - bloc.add(ElementsCreated([movingElement!.element])); + void submitMove(BuildContext context, [PadElement? element]) { + if (movingElement == null && element == null) return; + final current = (element ?? movingElement?.element)!; movingElement = null; + final bloc = context.read(); + bloc.add(ElementsCreated([current])); bloc.refresh(); } @@ -69,7 +69,11 @@ class HandHandler extends Handler { final transform = context.read().state; _firstPointer = null; if (movingElement != null) { - submitMove(context); + submitMove( + context, + movingElement + ?.move(transform.localToGlobal(event.localPosition)) + ?.element); return; } final bloc = context.read(); diff --git a/app/pubspec.lock b/app/pubspec.lock index d6664305bfac..f91f7cd6ad0f 100644 --- a/app/pubspec.lock +++ b/app/pubspec.lock @@ -22,15 +22,8 @@ packages: url: "https://pub.dartlang.org" source: hosted version: "4.7.0" - animations: - dependency: "direct main" - description: - name: animations - url: "https://pub.dartlang.org" - source: hosted - version: "2.0.4" archive: - dependency: "direct main" + dependency: transitive description: name: archive url: "https://pub.dartlang.org" @@ -84,7 +77,7 @@ packages: name: build url: "https://pub.dartlang.org" source: hosted - version: "2.3.0" + version: "2.3.1" build_config: dependency: transitive description: @@ -105,21 +98,21 @@ packages: name: build_resolvers url: "https://pub.dartlang.org" source: hosted - version: "2.0.9" + version: "2.0.10" build_runner: dependency: "direct dev" description: name: build_runner url: "https://pub.dartlang.org" source: hosted - version: "2.2.0" + version: "2.2.1" build_runner_core: dependency: transitive description: name: build_runner_core url: "https://pub.dartlang.org" source: hosted - version: "7.2.3" + version: "7.2.4" built_collection: dependency: transitive description: @@ -210,7 +203,7 @@ packages: name: code_builder url: "https://pub.dartlang.org" source: hosted - version: "4.2.0" + version: "4.3.0" collection: dependency: "direct main" description: @@ -224,7 +217,7 @@ packages: name: connectivity_plus url: "https://pub.dartlang.org" source: hosted - version: "2.3.6+1" + version: "2.3.7" connectivity_plus_linux: dependency: transitive description: @@ -273,7 +266,7 @@ packages: name: cross_file url: "https://pub.dartlang.org" source: hosted - version: "0.3.3+1" + version: "0.3.3+2" crypto: dependency: transitive description: @@ -294,7 +287,7 @@ packages: name: dart_style url: "https://pub.dartlang.org" source: hosted - version: "2.2.3" + version: "2.2.4" dbus: dependency: transitive description: @@ -343,7 +336,7 @@ packages: name: file_picker url: "https://pub.dartlang.org" source: hosted - version: "5.0.1" + version: "5.1.0" fixnum: dependency: transitive description: @@ -463,7 +456,7 @@ packages: name: flutter_svg url: "https://pub.dartlang.org" source: hosted - version: "1.1.4" + version: "1.1.5" flutter_test: dependency: "direct dev" description: flutter @@ -604,7 +597,7 @@ packages: name: json_serializable url: "https://pub.dartlang.org" source: hosted - version: "6.3.1" + version: "6.3.2" lint: dependency: transitive description: @@ -835,7 +828,7 @@ packages: name: printing url: "https://pub.dartlang.org" source: hosted - version: "5.9.2" + version: "5.9.3" process: dependency: transitive description: @@ -1029,14 +1022,14 @@ packages: name: source_gen url: "https://pub.dartlang.org" source: hosted - version: "1.2.2" + version: "1.2.3" source_helper: dependency: transitive description: name: source_helper url: "https://pub.dartlang.org" source: hosted - version: "1.3.2" + version: "1.3.3" source_span: dependency: transitive description: @@ -1134,7 +1127,7 @@ packages: name: url_launcher_android url: "https://pub.dartlang.org" source: hosted - version: "6.0.18" + version: "6.0.19" url_launcher_ios: dependency: transitive description: @@ -1218,7 +1211,7 @@ packages: name: win32 url: "https://pub.dartlang.org" source: hosted - version: "2.7.0" + version: "3.0.0" window_manager: dependency: "direct main" description: diff --git a/app/pubspec.yaml b/app/pubspec.yaml index 46c189ecb986..d02985d32881 100644 --- a/app/pubspec.yaml +++ b/app/pubspec.yaml @@ -21,14 +21,14 @@ dependencies: sdk: flutter flutter_localizations: sdk: flutter - flutter_svg: ^1.1.4 + flutter_svg: ^1.1.5 flutter_bloc: ^8.1.1 image: ^3.2.0 intl: ^0.17.0 path_provider: ^2.0.11 shared_preferences: ^2.0.15 url_launcher: ^6.1.5 - file_picker: ^5.0.1 + file_picker: ^5.1.0 phosphor_flutter: ^1.4.0 replay_bloc: ^0.2.2 share_plus: ^4.0.10+1 @@ -41,11 +41,11 @@ dependencies: camera: ^0.10.0+1 camera_windows: ^0.2.1+1 window_manager: ^0.2.6 - flex_color_scheme: ^5.1.0 + flex_color_scheme: ^6.0.0 freezed_annotation: ^2.1.0 json_annotation: ^4.6.0 path: ^1.8.1 - printing: ^5.9.2 + printing: ^5.9.3 js: ^0.6.4 pdf: ^3.8.2 http: ^0.13.5 @@ -55,7 +55,7 @@ dependencies: yaru: ^0.3.3 rxdart: ^0.27.5 ffi: ^2.0.1 - connectivity_plus: ^2.3.6+1 + connectivity_plus: ^2.3.7 dev_dependencies: flutter_native_splash: ^2.2.7 flutter_launcher_icons: ^0.10.0 @@ -66,8 +66,8 @@ dev_dependencies: sdk: flutter analyzer: ^4.6.0 freezed: ^2.1.0+1 - build_runner: ^2.2.0 - json_serializable: ^6.3.1 + build_runner: ^2.2.1 + json_serializable: ^6.3.2 espresso: ^0.2.0+4 # For information on the generic Dart part of this file, see the diff --git a/fastlane/metadata/android/en-US/changelogs/44.txt b/fastlane/metadata/android/en-US/changelogs/44.txt index 4c1c4230ab63..9a1bd46b26c3 100644 --- a/fastlane/metadata/android/en-US/changelogs/44.txt +++ b/fastlane/metadata/android/en-US/changelogs/44.txt @@ -1,3 +1,4 @@ * Fix position and size issues when moving elements * Fix gesture issues on area and shape painter and area change problem +* Fix sync mode won't be saved * Reset pointer on app hide, see #280 \ No newline at end of file From cb4081492e94d9966fe2101d65120f31bab4fbf7 Mon Sep 17 00:00:00 2001 From: CodeDoctorDE Date: Thu, 15 Sep 2022 17:12:35 +0200 Subject: [PATCH 2/2] Fix data settings --- app/lib/settings/data.dart | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/lib/settings/data.dart b/app/lib/settings/data.dart index ed8ed6475a2c..15f1b2fd33c1 100644 --- a/app/lib/settings/data.dart +++ b/app/lib/settings/data.dart @@ -46,7 +46,7 @@ class _DataSettingsPageState extends State { child: Column( crossAxisAlignment: CrossAxisAlignment.stretch, children: [ - if (!kIsWeb || !Platform.isAndroid) + if (!kIsWeb && !Platform.isAndroid) ListTile( title: Text(AppLocalizations.of(context)! .documentDirectory),