- tweak: exception representation

This commit is contained in:
2026-01-22 21:13:39 +03:00
parent ff31412719
commit c2ab550329
17 changed files with 195 additions and 73 deletions

View File

@@ -18,7 +18,6 @@ namespace Nebula.Launcher.ViewModels;
public sealed partial class ServerCompoundEntryViewModel :
ViewModelBase, IFavoriteEntryModelView, IFilterConsumer, IListEntryModelView, IEntryNameHolder
{
private ServerEntryModelView? _currentEntry;
[ObservableProperty] private string _message = "Loading server entry...";
[ObservableProperty] private bool _isFavorite;
[ObservableProperty] private bool _loading = true;
@@ -29,22 +28,22 @@ public sealed partial class ServerCompoundEntryViewModel :
public ServerEntryModelView? CurrentEntry
{
get => _currentEntry;
get;
set
{
if (value == _currentEntry) return;
_currentEntry = value;
if (value == field) return;
if (_currentEntry != null)
field = value;
if (field != null)
{
_currentEntry.IsFavorite = IsFavorite;
_currentEntry.Name = Name;
_currentEntry.ProcessFilter(_currentFilter);
field.IsFavorite = IsFavorite;
field.Name = Name;
field.ProcessFilter(_currentFilter);
}
Loading = _currentEntry == null;
Loading = field == null;
OnPropertyChanged();
}
}