Skip to content

Commit bd0c74e

Browse files
committed
chore: resolving PR comments
1 parent 9a590bf commit bd0c74e

File tree

3 files changed

+4
-5
lines changed

3 files changed

+4
-5
lines changed

UI/MVUX/src/MVUX/Presentation/FeedSample/FeedModel.cs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,7 @@ public partial record FeedModel
1515
{
1616
await Task.Delay(2000, ct); // Simulate network delay
1717

18-
return _people[Random.Shared.Next(people.Length)];
18+
return _people[Random.Shared.Next(_people.Length)];
1919
});
20-
}
2120

2221
}

UI/MVUX/src/MVUX/Presentation/IMessengerSample/MessagingModel.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ public MessagingModel(IPeopleService peopleService, IMessenger messenger)
1818
.Async(this, PeopleService.GetPeople)
1919
.Selection(SelectedPerson);
2020

21-
public IState<Person> NewPerson => State<Person>.Value(this, Person.EmptyPerson);
21+
public IState<Person> NewPerson => State<Person>.Empty(this);
2222

2323
public IState<Person> SelectedPerson => State<Person>.Empty(this);
2424

@@ -29,7 +29,7 @@ public async ValueTask AddPerson(CancellationToken ct = default)
2929

3030
await PeopleService.AddPerson(newPerson, ct);
3131

32-
await NewPerson.Update(old => Person.EmptyPerson(), ct);
32+
await NewPerson.Update(old => Person.Empty, ct);
3333
}
3434

3535
public async ValueTask RemovePerson(Person person, CancellationToken ct = default)

UI/MVUX/src/MVUX/Presentation/IMessengerSample/PeopleService.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ public async ValueTask RemovePerson(int personId, CancellationToken ct = default
5151

5252
if (_people.RemoveWhere(person => person.Id == personId) > 0)
5353
{
54-
Messenger.Send(new EntityMessage<Person>(EntityChange.Deleted, Person.EmptyPerson() with { Id = personId }));
54+
Messenger.Send(new EntityMessage<Person>(EntityChange.Deleted, Person.Empty with { Id = personId }));
5555
}
5656
}
5757

0 commit comments

Comments
 (0)