mirror of
https://github.com/sourcegit-scm/sourcegit
synced 2025-05-22 04:34:59 +00:00
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:
parent
7890f7abbf
commit
fafa2a53ae
3 changed files with 37 additions and 1 deletions
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue