mirror of
https://github.com/sourcegit-scm/sourcegit
synced 2025-06-25 12:24:59 +00:00
Now uses correct username for lock filtering.
WIP: needs an error popup if user is misconfigured
This commit is contained in:
parent
fca1957501
commit
6e35ac9eb0
1 changed files with 9 additions and 1 deletions
|
@ -45,7 +45,13 @@ namespace SourceGit.ViewModels
|
|||
{
|
||||
get
|
||||
{
|
||||
return ShowOnlyMyLocks ? Locks.Where(@lock => @lock.User == "Mat") : Locks;
|
||||
if (string.IsNullOrEmpty(_userName))
|
||||
{
|
||||
//todo: add an error popup
|
||||
return Locks;
|
||||
}
|
||||
|
||||
return ShowOnlyMyLocks ? Locks.Where(@lock => @lock.User == _userName) : Locks;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -54,6 +60,7 @@ namespace SourceGit.ViewModels
|
|||
_repo = repo;
|
||||
_remote = remote;
|
||||
Locks = new AvaloniaList<Models.LFSLock>();
|
||||
new Commands.Config(repo).ListAll().TryGetValue("user.name", out _userName);
|
||||
|
||||
Task.Run(() =>
|
||||
{
|
||||
|
@ -94,5 +101,6 @@ namespace SourceGit.ViewModels
|
|||
private bool _isLoading = true;
|
||||
private bool _isEmpty = false;
|
||||
private bool _showOnlyMyLocks = false;
|
||||
private string _userName;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue