From 547c28adb852ce2eccf127c6991a86851f93bf67 Mon Sep 17 00:00:00 2001 From: leo Date: Wed, 23 Oct 2024 16:55:22 +0800 Subject: [PATCH] fix: locks list does not update after unlock Signed-off-by: leo --- src/ViewModels/LFSLocks.cs | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/ViewModels/LFSLocks.cs b/src/ViewModels/LFSLocks.cs index a09e7d1e..e462a069 100644 --- a/src/ViewModels/LFSLocks.cs +++ b/src/ViewModels/LFSLocks.cs @@ -80,21 +80,23 @@ namespace SourceGit.ViewModels private void UpdateVisibleLocks() { + var visible = new List(); + if (!_showOnlyMyLocks) { - VisibleLocks = _cachedLocks; + foreach (var lfsLock in _cachedLocks) + visible.Add(lfsLock); } else { - var visible = new List(); foreach (var lfsLock in _cachedLocks) { if (lfsLock.User == _userName) visible.Add(lfsLock); } - - VisibleLocks = visible; } + + VisibleLocks = visible; } private string _repo;