mirror of
https://github.com/knah/VRCMelonAssistant.git
synced 2024-05-29 00:30:49 +12:00
Check if mod is outdated before installing
This commit is contained in:
parent
f8507924c4
commit
e1490bcb1c
|
@ -338,8 +338,11 @@ namespace ModAssistant.Pages
|
|||
else if (mod.ListItem.IsSelected)
|
||||
{
|
||||
MainWindow.Instance.MainText = $"{string.Format((string)FindResource("Mods:InstallingMod"), mod.name)}...";
|
||||
await Task.Run(async () => await InstallMod(mod, Path.Combine(installDirectory, @"IPA\Pending")));
|
||||
MainWindow.Instance.MainText = $"{string.Format((string)FindResource("Mods:InstalledMod"), mod.name)}.";
|
||||
if (mod.ListItem.IsOutdated)
|
||||
{
|
||||
await Task.Run(async () => await InstallMod(mod, Path.Combine(installDirectory, @"IPA\Pending")));
|
||||
MainWindow.Instance.MainText = $"{string.Format((string)FindResource("Mods:InstalledMod"), mod.name)}.";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -563,6 +566,15 @@ namespace ModAssistant.Pages
|
|||
}
|
||||
}
|
||||
|
||||
public bool IsOutdated
|
||||
{
|
||||
get
|
||||
{
|
||||
if (!IsInstalled) return true;
|
||||
return _installedVersion < ModVersion;
|
||||
}
|
||||
}
|
||||
|
||||
public bool CanDelete
|
||||
{
|
||||
get
|
||||
|
|
Loading…
Reference in a new issue