enhance: show commit full message tooltip when hover commit subject in FileHistories view (#1232)

Signed-off-by: leo <longshuang@msn.cn>
This commit is contained in:
leo 2025-04-23 10:33:49 +08:00
parent 7890f7abbf
commit fafa2a53ae
No known key found for this signature in database
3 changed files with 37 additions and 1 deletions

View file

@ -305,11 +305,23 @@ namespace SourceGit.ViewModels
_repo.NavigateToCommit(commit.SHA);
}
public string GetCommitFullMessage(Models.Commit commit)
{
var sha = commit.SHA;
if (_fullCommitMessages.TryGetValue(sha, out var msg))
return msg;
msg = new Commands.QueryCommitFullMessage(_repo.FullPath, sha).Result();
_fullCommitMessages[sha] = msg;
return msg;
}
private readonly Repository _repo = null;
private readonly string _file = null;
private bool _isLoading = true;
private bool _prevIsDiffMode = true;
private List<Models.Commit> _commits = null;
private Dictionary<string, string> _fullCommitMessages = new Dictionary<string, string>();
private object _viewContent = null;
}
}