mirror of
https://fastgit.cc/github.com/sourcegit-scm/sourcegit
synced 2026-05-01 06:15:41 +08:00
fix: System.ArgumentException when hover the commit link multiple times before the first time tooltip shows (#765)
This commit is contained in:
@@ -1,5 +1,4 @@
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace SourceGit.ViewModels
|
||||
|
||||
@@ -296,7 +296,8 @@ namespace SourceGit.Views
|
||||
if (currentParent is { DataContext: ViewModels.CommitDetail currentDetail } &&
|
||||
currentDetail.Commit.SHA == lastDetailCommit)
|
||||
{
|
||||
_inlineCommits.Add(sha, c);
|
||||
if (!_inlineCommits.ContainsKey(sha))
|
||||
_inlineCommits.Add(sha, c);
|
||||
|
||||
// Make sure user still hovers the target SHA.
|
||||
if (_lastHover == link && c != null)
|
||||
|
||||
Reference in New Issue
Block a user