Skip to content

Commit

Permalink
make chat message input faaaar less janky
Browse files Browse the repository at this point in the history
  • Loading branch information
NielsPilgaard committed Feb 27, 2024
1 parent c94226f commit 611527c
Show file tree
Hide file tree
Showing 4 changed files with 26 additions and 366 deletions.
342 changes: 0 additions & 342 deletions src/web/Jordnaer/Features/Chat/ChatComponent.razor

This file was deleted.

4 changes: 2 additions & 2 deletions src/web/Jordnaer/Features/Chat/ChatMessageList.razor
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
@inject CurrentUser CurrentUser

<Virtualize Items="ActiveChat?.Messages" Context="message" OverscanCount="8" ItemSize="80">

@if (IsMessageFromSelf(message))
Expand Down Expand Up @@ -40,8 +42,6 @@

@code
{
[Parameter]
public required UserProfile CurrentUser { get; set; } = null!;
[Parameter]
public required ChatDto? ActiveChat { get; set; }

Expand Down
8 changes: 5 additions & 3 deletions src/web/Jordnaer/Features/Chat/ChatSelector.razor
Original file line number Diff line number Diff line change
@@ -1,7 +1,11 @@
@using Jordnaer.Extensions
@using Jordnaer.Shared

@if (CurrentUser is null)
@inject CurrentUser CurrentUser

@attribute [Authorize]

@if (CurrentUser.Id is null)
{
return;
}
Expand Down Expand Up @@ -36,8 +40,6 @@
</MudItem>

@code{
[Parameter]
public UserProfile? CurrentUser { get; set; }
[Parameter]
public required List<ChatDto> Chats { get; set; } =[];

Expand Down
Loading

0 comments on commit 611527c

Please sign in to comment.