Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion lib/src/registry/data_operation_registry.dart
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,7 @@ class DataOperationRegistry {
final repo = c.read<DataRepository<User>>();
final existingUser = c.read<FetchedItem<dynamic>>().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);
},
Expand Down
18 changes: 10 additions & 8 deletions lib/src/services/auth_service.dart
Original file line number Diff line number Diff line change
Expand Up @@ -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),
),
),
),
Expand Down Expand Up @@ -347,10 +347,12 @@ class AuthService {
appRole: AppUserRole.guestUser,
dashboardRole: DashboardUserRole.none,
createdAt: DateTime.now(),
feedActionStatus: Map.fromEntries(
FeedActionType.values.map(
(type) =>
MapEntry(type, const UserFeedActionStatus(isCompleted: false)),
feedDecoratorStatus: Map.fromEntries(
FeedDecoratorType.values.map(
(type) => MapEntry(
type,
const UserFeedDecoratorStatus(isCompleted: false),
),
),
),
);
Expand Down Expand Up @@ -527,7 +529,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,
Expand Down
8 changes: 4 additions & 4 deletions lib/src/services/database_seeding_service.dart
Original file line number Diff line number Diff line change
Expand Up @@ -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)),
),
),
);
Expand Down Expand Up @@ -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,
Expand Down
Loading