fix: remove binding error in debug mode (#1338)

Signed-off-by: leo <longshuang@msn.cn>
This commit is contained in:
leo 2025-05-20 23:02:45 +08:00
parent 224f7a949a
commit ece51fbd32
No known key found for this signature in database
2 changed files with 10 additions and 10 deletions

View file

@ -632,6 +632,14 @@ namespace SourceGit.ViewModels
public void RefreshAll()
{
Task.Run(RefreshCommits);
Task.Run(RefreshBranches);
Task.Run(RefreshTags);
Task.Run(RefreshSubmodules);
Task.Run(RefreshWorktrees);
Task.Run(RefreshWorkingCopyChanges);
Task.Run(RefreshStashes);
Task.Run(() =>
{
var config = new Commands.Config(_fullpath).ListAll();
@ -648,14 +656,6 @@ namespace SourceGit.ViewModels
if (config.TryGetValue("gitflow.prefix.hotfix", out var hotfixPrefix))
GitFlow.HotfixPrefix = hotfixPrefix;
});
Task.Run(RefreshBranches);
Task.Run(RefreshTags);
Task.Run(RefreshCommits);
Task.Run(RefreshSubmodules);
Task.Run(RefreshWorktrees);
Task.Run(RefreshWorkingCopyChanges);
Task.Run(RefreshStashes);
}
public ContextMenu CreateContextMenuForExternalTools()

View file

@ -23,7 +23,7 @@
<Path Grid.Column="0" Margin="8,0,0,0" Width="14" Height="14" Fill="{DynamicResource Brush.FG2}" Data="{StaticResource Icons.Stashes}"/>
<TextBlock Grid.Column="1" Foreground="{DynamicResource Brush.FG2}" FontWeight="Bold" Margin="4,0,0,0">
<Run Text="{DynamicResource Text.Stashes.Stashes}"/>
<Run Text="{Binding Stashes, Converter={x:Static c:ListConverters.ToCount}}"/>
<Run Text="{Binding Stashes, Converter={x:Static c:ListConverters.ToCount}, Mode=OneWay}"/>
</TextBlock>
<Button Grid.Column="2"
Classes="icon_button"
@ -111,7 +111,7 @@
<Path Grid.Column="0" Margin="8,0,0,0" Width="14" Height="14" Fill="{DynamicResource Brush.FG2}" Data="{StaticResource Icons.Changes}"/>
<TextBlock Grid.Column="1" Foreground="{DynamicResource Brush.FG2}" FontWeight="Bold" Margin="4,0,0,0">
<Run Text="{DynamicResource Text.Stashes.Changes}"/>
<Run Text="{Binding Changes, Converter={x:Static c:ListConverters.ToCount}}"/>
<Run Text="{Binding Changes, Converter={x:Static c:ListConverters.ToCount}, Mode=OneWay}"/>
</TextBlock>
</Grid>
</Border>