Skip to content

Commit

Permalink
address PR feedback
Browse files Browse the repository at this point in the history
  • Loading branch information
ssparach committed Oct 2, 2024
1 parent c2fc074 commit 1ce6c10
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ public class RepositoryInformation

public string SourceControlProviderPackageDisplayName { get; }

public string RepoPathMapping { get; }
public string RepositoryPathMapping { get; }

public int Position { get; }

Expand All @@ -33,7 +33,7 @@ public RepositoryInformation(string rootpath, string classId, int position, int
var extension = GetExtension(classId);
SourceControlProviderDisplayName = GetExtensionDisplayName(extension);
SourceControlProviderPackageDisplayName = GetExtensionPackageDisplayName(extension);
RepoPathMapping = string.Concat(RepositoryRootPath, " ", SourceControlProviderDisplayName);
RepositoryPathMapping = string.Concat(RepositoryRootPath, " ", SourceControlProviderDisplayName);
Position = position;
Size = size;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Linq;
using System.Threading.Tasks;
using CommunityToolkit.Mvvm.ComponentModel;
using CommunityToolkit.Mvvm.Input;
Expand Down Expand Up @@ -70,11 +71,10 @@ public void RefreshTrackedRepositories()
{
TrackedRepositories.Clear();
var repoCollection = RepoTracker.GetAllTrackedRepositories();
var position = 0;
foreach (KeyValuePair<string, string> data in repoCollection)
for (int position = 0; position < repoCollection.Count; position++)
{
position++;
TrackedRepositories.Add(new RepositoryInformation(data.Key, data.Value, position, repoCollection.Count));
var data = repoCollection.ElementAt(position);
TrackedRepositories.Add(new RepositoryInformation(data.Key, data.Value, position + 1, repoCollection.Count));
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
Orientation="Horizontal">
<DropDownButton
Content="{Binding SourceControlProviderDisplayName}"
AutomationProperties.Name="{Binding RepoPathMapping}"
AutomationProperties.Name="{Binding RepositoryPathMapping}"
ToolTipService.ToolTip="{Binding SourceControlProviderPackageDisplayName}"
AutomationProperties.PositionInSet="{Binding Position}"
AutomationProperties.SizeOfSet="{Binding Size}">
Expand Down

0 comments on commit 1ce6c10

Please sign in to comment.