From adde995390ce5072b77cc0ba943b9f6d9805bf4f Mon Sep 17 00:00:00 2001 From: fulleni Date: Mon, 11 Aug 2025 11:46:46 +0100 Subject: [PATCH 1/4] fix(database): correct user fixture properties - Change feedActionStatus to feedDecoratorStatus and update related types - Update language property to use languagesFixturesData instead of string --- lib/src/services/database_seeding_service.dart | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/src/services/database_seeding_service.dart b/lib/src/services/database_seeding_service.dart index d1bd025..77c74e8 100644 --- a/lib/src/services/database_seeding_service.dart +++ b/lib/src/services/database_seeding_service.dart @@ -216,10 +216,10 @@ class DatabaseSeedingService { appRole: AppUserRole.standardUser, dashboardRole: DashboardUserRole.admin, createdAt: DateTime.now(), - feedActionStatus: Map.fromEntries( - FeedActionType.values.map( + feedDecoratorStatus: Map.fromEntries( + FeedDecoratorType.values.map( (type) => - MapEntry(type, const UserFeedActionStatus(isCompleted: false)), + MapEntry(type, const UserFeedDecoratorStatus(isCompleted: false)), ), ), ); @@ -258,7 +258,7 @@ class DatabaseSeedingService { textScaleFactor: AppTextScaleFactor.medium, fontWeight: AppFontWeight.regular, ), - language: 'en', + language: languagesFixturesData.firstWhere((l) => l.code == 'en'), feedPreferences: const FeedDisplayPreferences( headlineDensity: HeadlineDensity.standard, headlineImageStyle: HeadlineImageStyle.smallThumbnail, From 79357be05675f54c3969ce501c2693dfb84b867d Mon Sep 17 00:00:00 2001 From: fulleni Date: Mon, 11 Aug 2025 11:47:01 +0100 Subject: [PATCH 2/4] fix(registry): correct user copy operation in update function - Replace feedActionStatus with feedDecoratorStatus when updating user --- lib/src/registry/data_operation_registry.dart | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/src/registry/data_operation_registry.dart b/lib/src/registry/data_operation_registry.dart index afbb2d3..caf2371 100644 --- a/lib/src/registry/data_operation_registry.dart +++ b/lib/src/registry/data_operation_registry.dart @@ -199,7 +199,7 @@ class DataOperationRegistry { final repo = c.read>(); final existingUser = c.read>().data as User; final updatedUser = existingUser.copyWith( - feedActionStatus: (item as User).feedActionStatus, + feedDecoratorStatus: (item as User).feedDecoratorStatus, ); return repo.update(id: id, item: updatedUser, userId: uid); }, From 07fdd58d798fc3c76b38391d8e37e17b353a0730 Mon Sep 17 00:00:00 2001 From: fulleni Date: Mon, 11 Aug 2025 11:47:30 +0100 Subject: [PATCH 3/4] fix(auth): update user data map entries for feed decorators - Replace feedActionStatus with feedDecoratorStatus - Change UserFeedActionStatus to UserFeedDecoratorStatus - Update language field to use language fixture --- lib/src/services/auth_service.dart | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/lib/src/services/auth_service.dart b/lib/src/services/auth_service.dart index b8034fa..0f4e972 100644 --- a/lib/src/services/auth_service.dart +++ b/lib/src/services/auth_service.dart @@ -287,11 +287,11 @@ class AuthService { appRole: AppUserRole.standardUser, dashboardRole: DashboardUserRole.none, createdAt: DateTime.now(), - feedActionStatus: Map.fromEntries( - FeedActionType.values.map( + feedDecoratorStatus: Map.fromEntries( + FeedDecoratorType.values.map( (type) => MapEntry( type, - const UserFeedActionStatus(isCompleted: false), + const UserFeedDecoratorStatus(isCompleted: false), ), ), ), @@ -347,10 +347,10 @@ class AuthService { appRole: AppUserRole.guestUser, dashboardRole: DashboardUserRole.none, createdAt: DateTime.now(), - feedActionStatus: Map.fromEntries( - FeedActionType.values.map( + feedDecoratorStatus: Map.fromEntries( + FeedDecoratorType.values.map( (type) => - MapEntry(type, const UserFeedActionStatus(isCompleted: false)), + MapEntry(type, const UserFeedDecoratorStatus(isCompleted: false)), ), ), ); @@ -527,7 +527,7 @@ class AuthService { textScaleFactor: AppTextScaleFactor.medium, fontWeight: AppFontWeight.regular, ), - language: 'en', + language: languagesFixturesData.firstWhere((l) => l.code == 'en'), feedPreferences: const FeedDisplayPreferences( headlineDensity: HeadlineDensity.standard, headlineImageStyle: HeadlineImageStyle.smallThumbnail, From ffacc223244b17d645f3d079e49ba28df49e71c5 Mon Sep 17 00:00:00 2001 From: fulleni Date: Mon, 11 Aug 2025 12:05:28 +0100 Subject: [PATCH 4/4] style: format --- lib/src/services/auth_service.dart | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/lib/src/services/auth_service.dart b/lib/src/services/auth_service.dart index 0f4e972..2f3a033 100644 --- a/lib/src/services/auth_service.dart +++ b/lib/src/services/auth_service.dart @@ -349,8 +349,10 @@ class AuthService { createdAt: DateTime.now(), feedDecoratorStatus: Map.fromEntries( FeedDecoratorType.values.map( - (type) => - MapEntry(type, const UserFeedDecoratorStatus(isCompleted: false)), + (type) => MapEntry( + type, + const UserFeedDecoratorStatus(isCompleted: false), + ), ), ), );