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 Repository Repo
{
get => _repo;
}
public bool IsLoading
{
get => _isLoading;

View file

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