fix: locks list does not update after unlock
Some checks failed
Continuous Integration / Build (push) Has been cancelled
Continuous Integration / Prepare version string (push) Has been cancelled
Continuous Integration / Package (push) Has been cancelled

Signed-off-by: leo <longshuang@msn.cn>
This commit is contained in:
leo 2024-10-23 16:55:22 +08:00
parent a5594130ed
commit 547c28adb8
No known key found for this signature in database

View file

@ -80,21 +80,23 @@ namespace SourceGit.ViewModels
private void UpdateVisibleLocks() private void UpdateVisibleLocks()
{ {
var visible = new List<Models.LFSLock>();
if (!_showOnlyMyLocks) if (!_showOnlyMyLocks)
{ {
VisibleLocks = _cachedLocks; foreach (var lfsLock in _cachedLocks)
visible.Add(lfsLock);
} }
else else
{ {
var visible = new List<Models.LFSLock>();
foreach (var lfsLock in _cachedLocks) foreach (var lfsLock in _cachedLocks)
{ {
if (lfsLock.User == _userName) if (lfsLock.User == _userName)
visible.Add(lfsLock); visible.Add(lfsLock);
} }
VisibleLocks = visible;
} }
VisibleLocks = visible;
} }
private string _repo; private string _repo;