- fix: UpdateResolver preview think

This commit is contained in:
2025-09-08 21:26:12 +03:00
parent 56c373134f
commit a09ace0d39
8 changed files with 24 additions and 13 deletions

View File

@@ -24,5 +24,5 @@ public static class TypeConverters
});
public static FuncValueConverter<string, Avalonia.Media.Color> NameColorRepresentation { get; } =
new(ColorUtils.GetColorFromString);
new((str)=>ColorUtils.GetColorFromString(str ?? throw new ArgumentNullException(nameof(str),"Name of color is null!")));
}

View File

@@ -54,6 +54,4 @@ public static class LauncherConVar
public static readonly ConVar<string> CurrentLang = ConVarBuilder.Build<string>("launcher.language", CultureInfo.CurrentCulture.Name);
public static readonly ConVar<string> ILSpyUrl = ConVarBuilder.Build<string>("decompiler.url",
"https://github.com/icsharpcode/ILSpy/releases/download/v9.0/ILSpy_binaries_9.0.0.7889-x64.zip");
}

View File

@@ -72,10 +72,6 @@ public class LocaledText : MarkupExtension
public LocaledText(string key) => Key = key;
public LocaledText()
{
}
public override object ProvideValue(IServiceProvider serviceProvider)
{
return LocalisationService.GetString(Key, Options);

View File

@@ -416,7 +416,20 @@ public abstract class BaseFolderContentEntry : ViewModelBase, IContentEntry
private Dictionary<string, IContentEntry> _childs = [];
public string IconPath => "/Assets/svg/folder.svg";
public IContentHolder Holder { get; private set; }
private IContentHolder? _holder = null;
public IContentHolder Holder
{
get
{
if(_holder == null)
throw new InvalidOperationException(
GetType().Name + " was not initialised! Call Init(IContentHolder holder, string? name = null) before using it.");
return _holder;
}
}
public IContentEntry? Parent { get; set; }
public string? Name { get; private set; }
@@ -432,7 +445,7 @@ public abstract class BaseFolderContentEntry : ViewModelBase, IContentEntry
public void Init(IContentHolder holder, string? name = null)
{
Name = name;
Holder = holder;
_holder = holder;
}
public T AddChild<T>(T child) where T: IContentEntry