Skip to content

Commit b47d995

Browse files
committed
refactor(auth): replace feedActionStatus with feedDecoratorStatus
- Update user creation to use feedDecoratorStatus instead of feedActionStatus - Modify both createUser and createGuestUser methods - Replace FeedActionType with FeedDecoratorType in the map - Update UserFeedActionStatus to UserFeedDecoratorStatus
1 parent 9c25c6b commit b47d995

File tree

1 file changed

+18
-12
lines changed

1 file changed

+18
-12
lines changed

lib/src/auth_inmemory.dart

Lines changed: 18 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -151,12 +151,15 @@ class AuthInmemory implements AuthClient {
151151
? DashboardUserRole.admin
152152
: DashboardUserRole.none,
153153
createdAt: DateTime.now(),
154-
feedActionStatus: Map.fromEntries(
155-
FeedActionType.values.map(
156-
(type) =>
157-
MapEntry(type, const UserFeedActionStatus(isCompleted: false)),
158-
),
159-
),
154+
feedDecoratorStatus:
155+
Map<FeedDecoratorType, UserFeedDecoratorStatus>.fromEntries(
156+
FeedDecoratorType.values.map(
157+
(type) => MapEntry(
158+
type,
159+
const UserFeedDecoratorStatus(isCompleted: false),
160+
),
161+
),
162+
),
160163
);
161164
_currentUser = user;
162165
_currentToken = _uuid.v4();
@@ -182,12 +185,15 @@ class AuthInmemory implements AuthClient {
182185
appRole: AppUserRole.guestUser,
183186
dashboardRole: DashboardUserRole.none,
184187
createdAt: DateTime.now(),
185-
feedActionStatus: Map.fromEntries(
186-
FeedActionType.values.map(
187-
(type) =>
188-
MapEntry(type, const UserFeedActionStatus(isCompleted: false)),
189-
),
190-
),
188+
feedDecoratorStatus:
189+
Map<FeedDecoratorType, UserFeedDecoratorStatus>.fromEntries(
190+
FeedDecoratorType.values.map(
191+
(type) => MapEntry(
192+
type,
193+
const UserFeedDecoratorStatus(isCompleted: false),
194+
),
195+
),
196+
),
191197
);
192198
_currentUser = user;
193199
_currentToken = _uuid.v4();

0 commit comments

Comments
 (0)