Skip to content

Commit 20e0191

Browse files
committed
fix: make client-side mod flag explicit in component model
1 parent 8cfbd5f commit 20e0191

1 file changed

Lines changed: 13 additions & 2 deletions

File tree

MCServerLauncher.WPF/InstanceConsole/ViewModels/ComponentItemModel.cs

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,19 @@ public partial class ComponentItemModel : ObservableObject
1111
[ObservableProperty] private bool _isEnabled;
1212
[ObservableProperty] private long _fileSize;
1313
[ObservableProperty] private ComponentKind _kind;
14-
[ObservableProperty] private bool _isClientSideOnly;
14+
15+
private bool _isClientSideOnly;
16+
public bool IsClientSideOnly
17+
{
18+
get => _isClientSideOnly;
19+
set
20+
{
21+
if (SetProperty(ref _isClientSideOnly, value))
22+
{
23+
OnPropertyChanged(nameof(BadgeText));
24+
}
25+
}
26+
}
1527

1628
public string Description => string.IsNullOrEmpty(Version)
1729
? FileName
@@ -27,7 +39,6 @@ partial void OnFileNameChanged(string value)
2739
}
2840
partial void OnDisplayNameChanged(string value) => OnPropertyChanged(nameof(Title));
2941
partial void OnVersionChanged(string value) => OnPropertyChanged(nameof(Description));
30-
partial void OnIsClientSideOnlyChanged(bool value) => OnPropertyChanged(nameof(BadgeText));
3142
}
3243

3344
public enum ComponentKind

0 commit comments

Comments
 (0)