From 7746b28e1a5ac00df1c70c1a32247a266738acf5 Mon Sep 17 00:00:00 2001 From: CodeDoctorDE Date: Fri, 13 Oct 2023 09:19:21 +0200 Subject: [PATCH] Change name of document when creating create file in files view --- app/lib/views/files.dart | 8 ++++++-- app/macos/Flutter/GeneratedPluginRegistrant.swift | 2 +- app/pubspec.lock | 12 ++++++------ app/pubspec.yaml | 6 +++--- fastlane/metadata/android/en-US/changelogs/74.txt | 1 + 5 files changed, 17 insertions(+), 12 deletions(-) diff --git a/app/lib/views/files.dart b/app/lib/views/files.dart index a6f285a5af83..b3441059f791 100644 --- a/app/lib/views/files.dart +++ b/app/lib/views/files.dart @@ -294,12 +294,16 @@ class _FilesViewState extends State { )); if (asset == null) return; final path = _locationController.text; - var newPath = '$path/$name'; + var newPath = + '$path/${_fileSystem.convertNameToFile(name!)}'; if (!newPath.endsWith('.bfly')) { newPath += '.bfly'; } await _fileSystem.updateDocument( - newPath, asset.createDocument()); + newPath, + asset.createDocument( + name: name, + )); _reloadFileSystem(); } }, diff --git a/app/macos/Flutter/GeneratedPluginRegistrant.swift b/app/macos/Flutter/GeneratedPluginRegistrant.swift index 67b0dd802535..d867c4028827 100644 --- a/app/macos/Flutter/GeneratedPluginRegistrant.swift +++ b/app/macos/Flutter/GeneratedPluginRegistrant.swift @@ -21,7 +21,7 @@ func RegisterGeneratedPlugins(registry: FlutterPluginRegistry) { ConnectivityPlugin.register(with: registry.registrar(forPlugin: "ConnectivityPlugin")) DynamicColorPlugin.register(with: registry.registrar(forPlugin: "DynamicColorPlugin")) FlutterSecureStoragePlugin.register(with: registry.registrar(forPlugin: "FlutterSecureStoragePlugin")) - FPPPackageInfoPlusPlugin.register(with: registry.registrar(forPlugin: "FPPPackageInfoPlusPlugin")) + FLTPackageInfoPlusPlugin.register(with: registry.registrar(forPlugin: "FLTPackageInfoPlusPlugin")) PathProviderPlugin.register(with: registry.registrar(forPlugin: "PathProviderPlugin")) PrintingPlugin.register(with: registry.registrar(forPlugin: "PrintingPlugin")) ScreenRetrieverPlugin.register(with: registry.registrar(forPlugin: "ScreenRetrieverPlugin")) diff --git a/app/pubspec.lock b/app/pubspec.lock index 25a23bbf598b..9e0a719c8b4b 100644 --- a/app/pubspec.lock +++ b/app/pubspec.lock @@ -563,10 +563,10 @@ packages: dependency: "direct main" description: name: go_router - sha256: "1bd28265168045adb2df3da178bdbd44d37dddca0e7cfc867f8665d4f6b31f0c" + sha256: "2ccd74480706e0a70a0e0dfa9543dede41bc11d0fe3b146a6ad7b7686f6b4407" url: "https://pub.dev" source: hosted - version: "11.1.3" + version: "11.1.4" graphs: dependency: transitive description: @@ -765,10 +765,10 @@ packages: dependency: "direct main" description: name: package_info_plus - sha256: "0351aaba3b267c4962ed73058a5f62a84de7e39670a20e2916a6baff2ffcfbe5" + sha256: "6ff267fcd9d48cb61c8df74a82680e8b82e940231bb5f68356672fde0397334a" url: "https://pub.dev" source: hosted - version: "5.0.0" + version: "4.1.0" package_info_plus_platform_interface: dependency: transitive description: @@ -1007,10 +1007,10 @@ packages: dependency: "direct main" description: name: share_plus - sha256: f86c5acc512b20e074137075824fc29e29b2cf395dcbfcc371e96e3e6290cce1 + sha256: "6cec740fa0943a826951223e76218df002804adb588235a8910dc3d6b0654e11" url: "https://pub.dev" source: hosted - version: "8.0.0" + version: "7.1.0" share_plus_platform_interface: dependency: transitive description: diff --git a/app/pubspec.yaml b/app/pubspec.yaml index 31a789d1d755..01108de833ab 100644 --- a/app/pubspec.yaml +++ b/app/pubspec.yaml @@ -37,10 +37,10 @@ dependencies: url: https://github.com/CodeDoctorDE/phosphor-flutter ref: f370dd2c25d3ea51ffb8f1c7c183bc9f33889c82 replay_bloc: ^0.2.4 - share_plus: ^8.0.0 - package_info_plus: ^5.0.0 + share_plus: ^7.1.0 + package_info_plus: ^4.1.0 idb_shim: ^2.3.1 - go_router: ^11.1.3 + go_router: ^11.1.4 xml: ^6.4.2 collection: ^1.18.0 bloc_concurrency: ^0.2.2 diff --git a/fastlane/metadata/android/en-US/changelogs/74.txt b/fastlane/metadata/android/en-US/changelogs/74.txt index 3d21c0596f7f..2203b8f66911 100644 --- a/fastlane/metadata/android/en-US/changelogs/74.txt +++ b/fastlane/metadata/android/en-US/changelogs/74.txt @@ -4,6 +4,7 @@ * Change dropdown in text and paragraph style view to disable if no elements are to be added * Change the zoom slider to operate in realtime in style view * Change reload button icon in remote button +* Change name of document when creating create file in files view * Rename document directory to data directory * Fix adding template instead of document when clicking create file in files view * Fix unnessesary baking of canvas on every change ([#503](https://github.com/LinwoodDev/Butterfly/issues/503))