Добавьте файлы проекта.

This commit is contained in:
Курнат Андрей
2026-03-13 21:01:04 +03:00
commit b460f17029
111 changed files with 5803 additions and 0 deletions

View File

@@ -0,0 +1,44 @@
using Massenger.Client.Services;
using Massenger.Client.ViewModels;
namespace Massenger.Client.Pages;
[QueryProperty(nameof(ChatId), "chatId")]
public partial class ChatPage : ContentPage
{
private readonly ChatViewModel _viewModel;
private string? _chatId;
public string? ChatId
{
get => _chatId;
set
{
_chatId = value;
_ = LoadChatAsync(value);
}
}
public ChatPage()
{
InitializeComponent();
_viewModel = ServiceHelper.GetRequiredService<ChatViewModel>();
_viewModel.AttachRealtime();
BindingContext = _viewModel;
}
protected override void OnDisappearing()
{
base.OnDisappearing();
_viewModel.DetachRealtime();
}
private async Task LoadChatAsync(string? chatId)
{
if (Guid.TryParse(chatId, out var parsed))
{
await _viewModel.LoadAsync(parsed);
}
}
}