Class DirectoryViewModel
The public room directory of the user's server or another one: search it and join a room.
Inheritance
DirectoryViewModel
Assembly: Uniform.Chat.Avalonia.dll
public sealed class DirectoryViewModel : ViewModelBase, INotifyPropertyChanged, INotifyPropertyChanging
Constructors
|
Edit this page
View Source
Create the directory of server; join joins a chosen room, or opens it when joined already, and returns whether it did; isJoined tells whether the user is in a room, by ID.
Declaration
public DirectoryViewModel(ClientConnection connection, IUiDispatcher ui, string server, Func<MatrixLink, Task<bool>> join, Func<string, bool> isJoined)
Parameters
Properties
|
Edit this page
View Source
Declaration
[ObservableProperty]
[ExcludeFromCodeCoverage]
public bool IsBusy { get; set; }
Property Value
Declaration
[ExcludeFromCodeCoverage]
public IAsyncRelayCommand<PublicRoomItem> JoinCommand { get; }
Property Value
|
Edit this page
View Source
Declaration
[ObservableProperty]
[ExcludeFromCodeCoverage]
public string Message { get; set; }
Property Value
|
Edit this page
View Source
Declaration
public ObservableCollection<PublicRoomItem> Rooms { get; }
Property Value
Declaration
[ExcludeFromCodeCoverage]
public IAsyncRelayCommand SearchCommand { get; }
Property Value
|
Edit this page
View Source
Declaration
[ObservableProperty]
[ExcludeFromCodeCoverage]
public string SearchTerm { get; set; }
Property Value
|
Edit this page
View Source
Declaration
[ObservableProperty]
[ExcludeFromCodeCoverage]
public string Server { get; set; }
Property Value
Methods
|
Edit this page
View Source
Search the directory; a later search replaces an earlier one still running.
Declaration
[RelayCommand]
public Task SearchAsync()
Returns
Implements