code_style: remove all IDE warnings

This commit is contained in:
leo 2024-07-14 15:55:15 +08:00
parent 9ac550242e
commit a807aa9e12
No known key found for this signature in database
94 changed files with 785 additions and 807 deletions

View file

@ -31,8 +31,12 @@ namespace SourceGit.Views
private void OnParentSHAPressed(object sender, PointerPressedEventArgs e)
{
if (DataContext is ViewModels.CommitDetail detail && CanNavigate)
detail.NavigateTo((sender as Control).DataContext as string);
if (sender is Control { DataContext: string sha } &&
DataContext is ViewModels.CommitDetail detail &&
CanNavigate)
{
detail.NavigateTo(sha);
}
e.Handled = true;
}