Skip to content

Commit ece51fb

Browse files
committed
fix: remove binding error in debug mode (#1338)
Signed-off-by: leo <[email protected]>
1 parent 224f7a9 commit ece51fb

File tree

2 files changed

+10
-10
lines changed

2 files changed

+10
-10
lines changed

src/ViewModels/Repository.cs

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -632,6 +632,14 @@ public CommandLog CreateLog(string name)
632632

633633
public void RefreshAll()
634634
{
635+
Task.Run(RefreshCommits);
636+
Task.Run(RefreshBranches);
637+
Task.Run(RefreshTags);
638+
Task.Run(RefreshSubmodules);
639+
Task.Run(RefreshWorktrees);
640+
Task.Run(RefreshWorkingCopyChanges);
641+
Task.Run(RefreshStashes);
642+
635643
Task.Run(() =>
636644
{
637645
var config = new Commands.Config(_fullpath).ListAll();
@@ -648,14 +656,6 @@ public void RefreshAll()
648656
if (config.TryGetValue("gitflow.prefix.hotfix", out var hotfixPrefix))
649657
GitFlow.HotfixPrefix = hotfixPrefix;
650658
});
651-
652-
Task.Run(RefreshBranches);
653-
Task.Run(RefreshTags);
654-
Task.Run(RefreshCommits);
655-
Task.Run(RefreshSubmodules);
656-
Task.Run(RefreshWorktrees);
657-
Task.Run(RefreshWorkingCopyChanges);
658-
Task.Run(RefreshStashes);
659659
}
660660

661661
public ContextMenu CreateContextMenuForExternalTools()

src/Views/StashesPage.axaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
<Path Grid.Column="0" Margin="8,0,0,0" Width="14" Height="14" Fill="{DynamicResource Brush.FG2}" Data="{StaticResource Icons.Stashes}"/>
2424
<TextBlock Grid.Column="1" Foreground="{DynamicResource Brush.FG2}" FontWeight="Bold" Margin="4,0,0,0">
2525
<Run Text="{DynamicResource Text.Stashes.Stashes}"/>
26-
<Run Text="{Binding Stashes, Converter={x:Static c:ListConverters.ToCount}}"/>
26+
<Run Text="{Binding Stashes, Converter={x:Static c:ListConverters.ToCount}, Mode=OneWay}"/>
2727
</TextBlock>
2828
<Button Grid.Column="2"
2929
Classes="icon_button"
@@ -111,7 +111,7 @@
111111
<Path Grid.Column="0" Margin="8,0,0,0" Width="14" Height="14" Fill="{DynamicResource Brush.FG2}" Data="{StaticResource Icons.Changes}"/>
112112
<TextBlock Grid.Column="1" Foreground="{DynamicResource Brush.FG2}" FontWeight="Bold" Margin="4,0,0,0">
113113
<Run Text="{DynamicResource Text.Stashes.Changes}"/>
114-
<Run Text="{Binding Changes, Converter={x:Static c:ListConverters.ToCount}}"/>
114+
<Run Text="{Binding Changes, Converter={x:Static c:ListConverters.ToCount}, Mode=OneWay}"/>
115115
</TextBlock>
116116
</Grid>
117117
</Border>

0 commit comments

Comments
 (0)