refactor: remove binding errors

This commit is contained in:
leo 2024-08-13 20:40:05 +08:00
parent abdf9d7e75
commit ec14d9d533
No known key found for this signature in database
2 changed files with 6 additions and 2 deletions

View file

@ -10,6 +10,11 @@ namespace SourceGit.ViewModels
{ {
public class Histories : ObservableObject public class Histories : ObservableObject
{ {
public Repository Repo
{
get => _repo;
}
public bool IsLoading public bool IsLoading
{ {
get => _isLoading; get => _isLoading;

View file

@ -668,8 +668,7 @@
<ContentControl Grid.Row="2" Content="{Binding SelectedView}"> <ContentControl Grid.Row="2" Content="{Binding SelectedView}">
<ContentControl.DataTemplates> <ContentControl.DataTemplates>
<DataTemplate DataType="vm:Histories"> <DataTemplate DataType="vm:Histories">
<v:Histories CurrentBranch="{Binding $parent[v:Repository].((vm:Repository)DataContext).CurrentBranch}" <v:Histories CurrentBranch="{Binding Repo.CurrentBranch}" NavigationId="{Binding NavigationId}"/>
NavigationId="{Binding NavigationId}"/>
</DataTemplate> </DataTemplate>
<DataTemplate DataType="vm:WorkingCopy"> <DataTemplate DataType="vm:WorkingCopy">