Skip to content
Merged
Show file tree
Hide file tree
Changes from 4 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
22 changes: 15 additions & 7 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,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)),
),
),
);
Expand Down Expand Up @@ -527,7 +527,15 @@ class AuthService {
textScaleFactor: AppTextScaleFactor.medium,
fontWeight: AppFontWeight.regular,
),
language: 'en',
language: Language(
id: '6633b7ac1892f06e6914d0b3',
code: 'en',
name: 'English',
nativeName: 'English',
createdAt: DateTime.now(),
updatedAt: DateTime.now(),
status: ContentStatus.active,
),
feedPreferences: const FeedDisplayPreferences(
headlineDensity: HeadlineDensity.standard,
headlineImageStyle: HeadlineImageStyle.smallThumbnail,
Expand Down
16 changes: 12 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,15 @@ class DatabaseSeedingService {
textScaleFactor: AppTextScaleFactor.medium,
fontWeight: AppFontWeight.regular,
),
language: 'en',
language: Language(
id: '6633b7ac1892f06e6914d0b3',
code: 'en',
name: 'English',
nativeName: 'English',
createdAt: DateTime.now(),
updatedAt: DateTime.now(),
status: ContentStatus.active,
),
feedPreferences: const FeedDisplayPreferences(
headlineDensity: HeadlineDensity.standard,
headlineImageStyle: HeadlineImageStyle.smallThumbnail,
Expand Down