mirror of
https://github.com/sourcegit-scm/sourcegit.git
synced 2024-12-24 20:57: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"
|
<v:CommitSubjectPresenter Classes="primary"
|
||||||
Subject="{Binding Subject}"
|
Subject="{Binding Subject}"
|
||||||
IssueTrackerRules="{Binding $parent[v:Histories].((vm:Histories)DataContext).IssueTrackerRules}"
|
IssueTrackerRules="{Binding $parent[v:Histories].IssueTrackerRules}"
|
||||||
Opacity="{Binding Opacity}"
|
Opacity="{Binding Opacity}"
|
||||||
FontWeight="{Binding FontWeight}"/>
|
FontWeight="{Binding FontWeight}"/>
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
|
|
|
@ -459,6 +459,16 @@ namespace SourceGit.Views
|
||||||
set => SetValue(NavigationIdProperty, value);
|
set => SetValue(NavigationIdProperty, value);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public AvaloniaList<Models.IssueTrackerRule> IssueTrackerRules
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
if (DataContext is ViewModels.Histories histories)
|
||||||
|
return histories.IssueTrackerRules;
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
static Histories()
|
static Histories()
|
||||||
{
|
{
|
||||||
NavigationIdProperty.Changed.AddClassHandler<Histories>((h, _) =>
|
NavigationIdProperty.Changed.AddClassHandler<Histories>((h, _) =>
|
||||||
|
|
Loading…
Reference in a new issue