mirror of
https://github.com/sourcegit-scm/sourcegit
synced 2025-05-22 12:45:00 +00: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…
Add table
Add a link
Reference in a new issue