Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions Stardrop/Models/Data/ClientData.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,8 @@ public class ClientData
public Dictionary<string, bool> ColumnActiveStates { get; set; } = new Dictionary<string, bool>();
public Dictionary<string, int> ColumnOrder { get; set; } = new Dictionary<string, int>();
public LastSessionData LastSessionData { get; set; }

// Mapping of mod unique id to the ignored suggested version string
public Dictionary<string, string> IgnoredUpdates { get; set; } = new Dictionary<string, string>();
}
}
14 changes: 14 additions & 0 deletions Stardrop/Models/Mod.cs
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,12 @@ public string ParsedStatus
{
get
{
// If the suggested version is the same as an ignored version, treat as no update
if (!String.IsNullOrEmpty(SuggestedVersion) && !String.IsNullOrEmpty(IgnoredVersion) && IgnoredVersion.Equals(SuggestedVersion, StringComparison.OrdinalIgnoreCase))
{
return String.Empty;
}

if (!String.IsNullOrEmpty(SuggestedVersion) && IsModOutdated(SuggestedVersion))
{
if (_status == WikiCompatibilityStatus.Unofficial)
Expand All @@ -96,6 +102,12 @@ public string InstallStatus
{
get
{
// If the suggested version is the same as an ignored version, treat as no update
if (!String.IsNullOrEmpty(SuggestedVersion) && !String.IsNullOrEmpty(IgnoredVersion) && IgnoredVersion.Equals(SuggestedVersion, StringComparison.OrdinalIgnoreCase))
{
return String.Empty;
}

if (!String.IsNullOrEmpty(SuggestedVersion) && IsModOutdated(SuggestedVersion))
{
var nexusModId = GetNexusId();
Expand All @@ -117,6 +129,8 @@ public string InstallStatus

private string _note { get; set; }
public string Note { get { return _note; } set { _note = value; NotifyPropertyChanged("Note"); } }
private string? _ignoredVersion { get; set; }
public string? IgnoredVersion { get { return _ignoredVersion; } set { _ignoredVersion = value; NotifyPropertyChanged(nameof(IgnoredVersion)); NotifyPropertyChanged(nameof(ParsedStatus)); NotifyPropertyChanged(nameof(InstallStatus)); } }

public event PropertyChangedEventHandler? PropertyChanged;

Expand Down
5 changes: 5 additions & 0 deletions Stardrop/ViewModels/MainWindowViewModel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -476,6 +476,11 @@ public void DiscoverMods(string modsFilePath)
mod.LastUpdateTimestamp = localDataCache.ModInstallData.First(m => m.UniqueId.Equals(mod.UniqueId, StringComparison.OrdinalIgnoreCase)).LastUpdateTimestamp;
}

if (localDataCache is not null && localDataCache.IgnoredUpdates is not null && localDataCache.IgnoredUpdates.TryGetValue(mod.UniqueId, out string? value))
{
mod.IgnoredVersion = value;
}

// Check if any config file exists
var configPath = Path.Combine(fileInfo.DirectoryName, "config.json");
if (File.Exists(configPath) && new FileInfo(configPath) is FileInfo configInfo && configInfo is not null)
Expand Down
Loading