feature: add context menu for issue link in commit details panel (#651)

Signed-off-by: leo <longshuang@msn.cn>
This commit is contained in:
leo 2024-11-04 15:31:55 +08:00
parent 64860950c7
commit 163e8cc0a4
No known key found for this signature in database
24 changed files with 76 additions and 66 deletions

View file

@ -68,7 +68,7 @@ namespace SourceGit.Views
private void OnOpenWebLink(object sender, RoutedEventArgs e)
{
if (DataContext is ViewModels.CommitDetail detail)
if (DataContext is ViewModels.CommitDetail detail && sender is Control control)
{
var links = WebLinks;
if (links.Count > 1)
@ -88,7 +88,7 @@ namespace SourceGit.Views
menu.Items.Add(item);
}
(sender as Control)?.OpenContextMenu(menu);
menu?.Open(control);
}
else if (links.Count == 1)
{