presence/Presence.Desktop/ViewModels/PresenceViewModel.cs
2024-12-23 18:12:32 +03:00

24 lines
550 B
C#

using System.Reactive;
using ReactiveUI;
namespace Presence.Desktop.ViewModels;
public class PresenceViewModel: ViewModelBase, IRoutableViewModel
{
public string? UrlPathSegment { get; }
public IScreen HostScreen { get; }
public ReactiveCommand<Unit, Unit> GoBackCommand { get; }
public PresenceViewModel(IScreen hostScreen)
{
HostScreen = hostScreen;
GoBackCommand = ReactiveCommand.Create(() =>
{
HostScreen.Router.Navigate.Execute(new StartViewModel(HostScreen));
});
}
}