fix
This commit is contained in:
@@ -1,12 +1,17 @@
|
|||||||
|
using System.ComponentModel;
|
||||||
|
|
||||||
namespace ModpackUpdater.Apps.Manager.Ui.Models.UpdatesCollectorViewMode;
|
namespace ModpackUpdater.Apps.Manager.Ui.Models.UpdatesCollectorViewMode;
|
||||||
|
|
||||||
public record ModUpdateInfo(KeyValuePair<string, string>[] AvailableVersions, InstallAction Origin)
|
public record ModUpdateInfo(KeyValuePair<string, string>[] AvailableVersions, InstallAction Origin) : INotifyPropertyChanged
|
||||||
{
|
{
|
||||||
|
public event PropertyChangedEventHandler? PropertyChanged;
|
||||||
|
|
||||||
public int NewVersion { get; set; }
|
public int NewVersion { get; set; }
|
||||||
public bool Visible { get; set; } = true;
|
public bool Visible { get; set; } = true;
|
||||||
|
|
||||||
public IEnumerable<string> DisplayVersions { get; } = AvailableVersions.Select(n =>
|
public IEnumerable<string> DisplayVersions { get; } = AvailableVersions.Select(n =>
|
||||||
{
|
{
|
||||||
if (string.IsNullOrWhiteSpace(n.Value) || n.Value == n.Key)
|
if (string.IsNullOrWhiteSpace(n.Value) || n.Value.Equals(n.Key, StringComparison.InvariantCulture))
|
||||||
return n.Key;
|
return n.Key;
|
||||||
return $"{n.Value} ({n.Value})";
|
return $"{n.Value} ({n.Value})";
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user