diff --git a/android/fastlane/metadata/android/de-DE/changelogs/49.txt b/android/fastlane/metadata/android/de-DE/changelogs/49.txt new file mode 100644 index 00000000..0bb872c7 --- /dev/null +++ b/android/fastlane/metadata/android/de-DE/changelogs/49.txt @@ -0,0 +1 @@ +Beheben eines Fehlers, durch welchen die App bei Paperless Versionen vor 1.14.0 nicht mehr startete \ No newline at end of file diff --git a/android/fastlane/metadata/android/en-US/changelogs/49.txt b/android/fastlane/metadata/android/en-US/changelogs/49.txt new file mode 100644 index 00000000..f49e2b44 --- /dev/null +++ b/android/fastlane/metadata/android/en-US/changelogs/49.txt @@ -0,0 +1 @@ +Fix bug where app would not login with paperless versions before 1.14.0 \ No newline at end of file diff --git a/packages/paperless_api/lib/src/models/user_model.dart b/packages/paperless_api/lib/src/models/user_model.dart index 3436ed32..05eea5b9 100644 --- a/packages/paperless_api/lib/src/models/user_model.dart +++ b/packages/paperless_api/lib/src/models/user_model.dart @@ -7,14 +7,11 @@ import 'package:paperless_api/config/hive/hive_type_ids.dart'; part 'user_model.g.dart'; sealed class UserModel { - @HiveField(0) - final int id; - @HiveField(1) - final String username; - const UserModel({ - required this.id, - required this.username, - }); + int get id; + + String get username; + + const UserModel(); String? get fullName; } @@ -22,11 +19,18 @@ sealed class UserModel { @JsonSerializable(fieldRename: FieldRename.snake) @HiveType(typeId: PaperlessApiHiveTypeIds.userModelv2) class UserModelV2 extends UserModel { + @override + @HiveField(0) + @JsonKey(name: 'user_id') + final int id; + @override + @HiveField(1) + final String username; @HiveField(2) final String? displayName; const UserModelV2({ - required super.id, - required super.username, + required this.id, + required this.username, this.displayName, }); Map toJson() => _$UserModelV2ToJson(this); @@ -40,6 +44,12 @@ class UserModelV2 extends UserModel { @JsonSerializable(fieldRename: FieldRename.snake) @HiveType(typeId: PaperlessApiHiveTypeIds.userModelv3) class UserModelV3 extends UserModel { + @override + @HiveField(0) + final int id; + @override + @HiveField(1) + final String username; @HiveField(2) final String? email; @HiveField(3) @@ -76,8 +86,8 @@ class UserModelV3 extends UserModel { } const UserModelV3({ - required super.id, - required super.username, + required this.id, + required this.username, this.email, this.firstName, this.lastName, diff --git a/pubspec.lock b/pubspec.lock index 1ae3b3d1..aea0457d 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -366,7 +366,7 @@ packages: description: path: "." ref: master - resolved-ref: "2e6c7396e13c2c6ecd0a704d2322b349a7a21584" + resolved-ref: "8eae877b37d4634f1b636e48ebffd9066b0cb47d" url: "https://github.com/sawankumarbundelkhandi/edge_detection" source: git version: "1.1.2" diff --git a/pubspec.yaml b/pubspec.yaml index 5aa4530d..884e2962 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -15,7 +15,7 @@ publish_to: "none" # Remove this line if you wish to publish to pub.dev # In iOS, build-name is used as CFBundleShortVersionString while build-number used as CFBundleVersion. # Read more about iOS versioning at # https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html -version: 3.0.1+48 +version: 3.0.2+49 environment: sdk: ">=3.0.0 <4.0.0" @@ -97,6 +97,7 @@ dependencies: transparent_image: ^2.0.1 flutter_animate: ^4.2.0+1 shared_preferences: ^2.2.1 + # camerawesome: ^2.0.0-dev.1 dependency_overrides: intl: ^0.18.1