From cf9c57c9e03881302cd91bcdfd9d28a49d3ec153 Mon Sep 17 00:00:00 2001 From: Oliver Date: Fri, 17 Sep 2021 22:02:58 +1000 Subject: [PATCH 1/2] Fix android requirements --- android/build.gradle | 2 +- android/gradle/wrapper/gradle-wrapper.properties | 2 +- pubspec.lock | 2 +- pubspec.yaml | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/android/build.gradle b/android/build.gradle index 13b686e5..c5962208 100644 --- a/android/build.gradle +++ b/android/build.gradle @@ -8,7 +8,7 @@ buildscript { } dependencies { - classpath 'com.android.tools.build:gradle:4.1.0' + classpath 'com.android.tools.build:gradle:4.2.0' classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" } } diff --git a/android/gradle/wrapper/gradle-wrapper.properties b/android/gradle/wrapper/gradle-wrapper.properties index ca2bbd5d..8b795a6c 100644 --- a/android/gradle/wrapper/gradle-wrapper.properties +++ b/android/gradle/wrapper/gradle-wrapper.properties @@ -3,4 +3,4 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-6.9-all.zip \ No newline at end of file +distributionUrl=https\://services.gradle.org/distributions/gradle-6.7.1-all.zip \ No newline at end of file diff --git a/pubspec.lock b/pubspec.lock index ec8f908f..8c201dda 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -28,7 +28,7 @@ packages: name: audioplayers url: "https://pub.dartlang.org" source: hosted - version: "0.19.0" + version: "0.20.1" back_button_interceptor: dependency: transitive description: diff --git a/pubspec.yaml b/pubspec.yaml index 2abbe3f0..205eb991 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -39,7 +39,7 @@ dependencies: sembast: ^3.1.0+2 # NoSQL data storage one_context: ^1.1.0 # Dialogs without requiring context infinite_scroll_pagination: ^3.1.0 # Let the server do all the work! - audioplayers: ^0.19.0 # Play audio files + audioplayers: ^0.20.1 # Play audio files dropdown_search: 0.6.3 # Dropdown autocomplete form fields path: From a8ca4418685cbbfc562df14d5a02fa6a1c8e061f Mon Sep 17 00:00:00 2001 From: Oliver Date: Fri, 17 Sep 2021 22:19:57 +1000 Subject: [PATCH 2/2] Fix for utf character encoding - content length was being set based on the non-encoded string - naughty naughty --- lib/api.dart | 7 +++++-- lib/l10n | 2 +- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/lib/api.dart b/lib/api.dart index 22b9b288..a0bf3d1b 100644 --- a/lib/api.dart +++ b/lib/api.dart @@ -785,8 +785,11 @@ class InvenTreeAPI { Future completeRequest(HttpClientRequest request, {String? data, int? statusCode}) async { if (data != null && data.isNotEmpty) { - request.headers.set(HttpHeaders.contentLengthHeader, data.length.toString()); - request.add(utf8.encode(data)); + + var encoded_data = utf8.encode(data); + + request.headers.set(HttpHeaders.contentLengthHeader, encoded_data.length.toString()); + request.add(encoded_data); } APIResponse response = new APIResponse( diff --git a/lib/l10n b/lib/l10n index 1dbd8c1e..c7e8c692 160000 --- a/lib/l10n +++ b/lib/l10n @@ -1 +1 @@ -Subproject commit 1dbd8c1ec48b642f63170333a769ad9df83c6baa +Subproject commit c7e8c69216e17972432178db6fb2d8b3136e7a06