presence/Presence.Desktop/ViewModels/PresenceViewModel.cs

24 lines
550 B
C#
Raw Permalink Normal View History

2024-12-23 15:12:32 +00:00
using System.Reactive;
2024-12-04 19:33:12 +00:00
using ReactiveUI;
namespace Presence.Desktop.ViewModels;
public class PresenceViewModel: ViewModelBase, IRoutableViewModel
{
public string? UrlPathSegment { get; }
public IScreen HostScreen { get; }
2024-12-23 15:12:32 +00:00
public ReactiveCommand<Unit, Unit> GoBackCommand { get; }
public PresenceViewModel(IScreen hostScreen)
{
HostScreen = hostScreen;
GoBackCommand = ReactiveCommand.Create(() =>
{
HostScreen.Router.Navigate.Execute(new StartViewModel(HostScreen));
});
}
2024-12-04 19:33:12 +00:00
}