parent
97b7f823c8
commit
e45f7df622
@ -43,7 +43,15 @@ public partial class LoaderStart : UserControl
|
|||||||
private static void UpdateRecentProjectsWithPruning(string latestUsedProjectPath)
|
private static void UpdateRecentProjectsWithPruning(string latestUsedProjectPath)
|
||||||
{
|
{
|
||||||
var previousRecentList = LoaderStart.RecentProjects;
|
var previousRecentList = LoaderStart.RecentProjects;
|
||||||
|
|
||||||
|
// Check, if the latest project is identical to the next project we open. In that case, we don't add it to the list.
|
||||||
|
if (previousRecentList.Any() && previousRecentList[0] == latestUsedProjectPath)
|
||||||
|
return;
|
||||||
|
|
||||||
|
// Add the next project to the list:
|
||||||
previousRecentList.Insert(0, latestUsedProjectPath);
|
previousRecentList.Insert(0, latestUsedProjectPath);
|
||||||
|
|
||||||
|
// Prune the list:
|
||||||
if (previousRecentList.Count > 6)
|
if (previousRecentList.Count > 6)
|
||||||
previousRecentList = previousRecentList.Take(6).ToList();
|
previousRecentList = previousRecentList.Take(6).ToList();
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user