Skip to content

Commit 60df57f

Browse files
committed
refactor(DirectoryTree): Fix issue where the "Recent" list was not displaying
Added a call to `EnsureRecentLoaded` at the beginning of the `LoadFromCache` method to ensure necessary initialization is completed before loading the cache, thereby preventing potential null reference or state inconsistency issues.
1 parent 524f161 commit 60df57f

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

‎src/ViewModels/DirectoryTree.cs‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -229,6 +229,8 @@ private void SaveRecentRepos()
229229

230230
public void LoadFromCache()
231231
{
232+
EnsureRecentLoaded();
233+
232234
var cache = Preferences.Instance.DirectoryTreeCache;
233235
if (cache == null || cache.Nodes.Count == 0)
234236
return;

0 commit comments

Comments
 (0)