Skip to content

Commit

Permalink
throw times in, just temp
Browse files Browse the repository at this point in the history
  • Loading branch information
kfrancis committed May 18, 2023
1 parent f3a237c commit 60cba84
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions src/NuSocial/ViewModels/MainViewModel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ namespace NuSocial.ViewModels;
public partial class MainViewModel : BaseViewModel, ITransientDependency
{
[ObservableProperty]
private ObservableCollection<Post> _posts;
private ObservableCollection<Post> _posts = new();

private List<Post> _postsWaiting = new();

Expand All @@ -29,7 +29,6 @@ public override Task OnFirstAppear()
{
UpdateUser();
});
Posts = new ObservableCollection<Post>();
WeakReferenceMessenger.Default.Register<NostrPostMessage>(this, (r, m) =>
{
ReceivePost(m.Value);
Expand All @@ -51,7 +50,7 @@ public override Task OnParameterSet()
}

[RelayCommand(CanExecute = nameof(IsNotBusy))]
private Task BoostPostAsync()
private Task BoostPostAsync(Post post)
{
return SetBusyAsync(() =>
{
Expand Down Expand Up @@ -79,7 +78,7 @@ private Task ReactToPostAsync()

private void ReceivePost(string? value)
{
_postsWaiting.Add(new Post() { Content = value ?? string.Empty });
_postsWaiting.Add(new Post() { Content = value ?? string.Empty, CreatedAt = DateTime.Now });
OnPropertyChanged(nameof(UnreadLabel));
}

Expand Down

0 comments on commit 60cba84

Please sign in to comment.