mirror of
https://github.com/claunia/romrepomgr.git
synced 2025-12-16 19:24:51 +00:00
Migrate to CommunityToolkit.Mvvm
This commit is contained in:
@@ -26,7 +26,7 @@
|
||||
using System.IO;
|
||||
using System.Threading.Tasks;
|
||||
using Avalonia.Threading;
|
||||
using ReactiveUI;
|
||||
using CommunityToolkit.Mvvm.ComponentModel;
|
||||
using RomRepoMgr.Core;
|
||||
using RomRepoMgr.Database;
|
||||
using RomRepoMgr.Database.Models;
|
||||
@@ -35,11 +35,12 @@ using RomRepoMgr.Views;
|
||||
|
||||
namespace RomRepoMgr.ViewModels;
|
||||
|
||||
public sealed class RemoveDatViewModel : ViewModelBase
|
||||
public sealed partial class RemoveDatViewModel : ViewModelBase
|
||||
{
|
||||
readonly long _romSetId;
|
||||
readonly RemoveDat _view;
|
||||
string _statusMessage;
|
||||
[ObservableProperty]
|
||||
string _statusMessage;
|
||||
|
||||
// Mock
|
||||
public RemoveDatViewModel() {}
|
||||
@@ -50,12 +51,6 @@ public sealed class RemoveDatViewModel : ViewModelBase
|
||||
_romSetId = romSetId;
|
||||
}
|
||||
|
||||
public string StatusMessage
|
||||
{
|
||||
get => _statusMessage;
|
||||
set => this.RaiseAndSetIfChanged(ref _statusMessage, value);
|
||||
}
|
||||
|
||||
internal void OnOpened()
|
||||
{
|
||||
_ = Task.Run(() =>
|
||||
|
||||
Reference in New Issue
Block a user