enhance: async refresh operations in Watcher (#961)

This commit is contained in:
GadflyFang 2025-02-10 14:05:27 +08:00 committed by GitHub
parent c61ecb0bb0
commit bead749c57
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -136,20 +136,20 @@ namespace SourceGit.Models
if (_updateSubmodules > 0 && now > _updateSubmodules) if (_updateSubmodules > 0 && now > _updateSubmodules)
{ {
_updateSubmodules = 0; _updateSubmodules = 0;
_repo.RefreshSubmodules(); Task.Run(_repo.RefreshSubmodules);
} }
if (_updateStashes > 0 && now > _updateStashes) if (_updateStashes > 0 && now > _updateStashes)
{ {
_updateStashes = 0; _updateStashes = 0;
_repo.RefreshStashes(); Task.Run(_repo.RefreshStashes);
} }
if (_updateTags > 0 && now > _updateTags) if (_updateTags > 0 && now > _updateTags)
{ {
_updateTags = 0; _updateTags = 0;
_repo.RefreshTags(); Task.Run(_repo.RefreshTags);
_repo.RefreshCommits(); Task.Run(_repo.RefreshCommits);
} }
} }