mirror of
https://github.com/sourcegit-scm/sourcegit.git
synced 2024-12-22 20:37:19 -08:00
refactor: remove binding null warnings
This commit is contained in:
parent
1d15c4c95f
commit
a7ea61f9af
2 changed files with 11 additions and 1 deletions
|
@ -84,7 +84,7 @@
|
|||
|
||||
<v:CommitSubjectPresenter Classes="primary"
|
||||
Subject="{Binding Subject}"
|
||||
IssueTrackerRules="{Binding $parent[v:Histories].((vm:Histories)DataContext).IssueTrackerRules}"
|
||||
IssueTrackerRules="{Binding $parent[v:Histories].IssueTrackerRules}"
|
||||
Opacity="{Binding Opacity}"
|
||||
FontWeight="{Binding FontWeight}"/>
|
||||
</StackPanel>
|
||||
|
|
|
@ -459,6 +459,16 @@ namespace SourceGit.Views
|
|||
set => SetValue(NavigationIdProperty, value);
|
||||
}
|
||||
|
||||
public AvaloniaList<Models.IssueTrackerRule> IssueTrackerRules
|
||||
{
|
||||
get
|
||||
{
|
||||
if (DataContext is ViewModels.Histories histories)
|
||||
return histories.IssueTrackerRules;
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
static Histories()
|
||||
{
|
||||
NavigationIdProperty.Changed.AddClassHandler<Histories>((h, _) =>
|
||||
|
|
Loading…
Reference in a new issue