mirror of
https://github.com/xcp-ng/xenadmin.git
synced 2025-01-20 15:29:26 +01:00
CP-21174: Multiple dismissed XenCenterVersion alerts
- Limit the size of the list where we keep the dismissed XenCenter version alerts Signed-off-by: Mihaela Stoica <mihaela.stoica@citrix.com>
This commit is contained in:
parent
c5dfd7fccf
commit
ca5cf5037e
@ -101,11 +101,15 @@ namespace XenAdmin.Alerts
|
||||
}
|
||||
}
|
||||
|
||||
static int DISMISSED_XC_VERSIONS_LIMIT = 5;
|
||||
|
||||
public override void Dismiss()
|
||||
{
|
||||
List<string> current = new List<string>(Properties.Settings.Default.LatestXenCenterSeen.Split(','));
|
||||
if (current.Contains(NewVersion.VersionAndLang))
|
||||
return;
|
||||
if (current.Count >= DISMISSED_XC_VERSIONS_LIMIT)
|
||||
current.RemoveRange(0, current.Count - DISMISSED_XC_VERSIONS_LIMIT + 1);
|
||||
current.Add(NewVersion.VersionAndLang);
|
||||
Properties.Settings.Default.LatestXenCenterSeen = string.Join(",", current.ToArray());
|
||||
Settings.TrySaveSettings();
|
||||
|
Loading…
Reference in New Issue
Block a user