Skip to content

Commit 24e8dd4

Browse files
committed
refactor: push hotkey behavior
- Rename the hotkey handler for push operations to align with its function. - Rename the hotkey-triggered push method and change its behavior to push without forcing.
1 parent 5d37dcc commit 24e8dd4

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/Views/RepositoryToolbar.axaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@
106106
</StackPanel>
107107

108108
<StackPanel Grid.Column="2" Orientation="Horizontal">
109-
<Button Width="0" Height="0" Click="PushDirectlyByHotKey" IsVisible="False" HotKey="{OnPlatform Ctrl+Shift+Up, macOS=⌘+Shift+Up}"/>
109+
<Button Width="0" Height="0" Click="PushByHotKey" IsVisible="False" HotKey="{OnPlatform Ctrl+Shift+Up, macOS=⌘+Shift+Up}"/>
110110
<Button Width="0" Height="0" Click="PullDirectlyByHotKey" IsVisible="False" IsEnabled="{Binding !IsBare}" HotKey="{OnPlatform Ctrl+Shift+Down, macOS=⌘+Shift+Down}"/>
111111
<Button Width="0" Height="0" Click="FetchDirectlyByHotKey" IsVisible="False" HotKey="{OnPlatform Ctrl+Down, macOS=⌘+Down}"/>
112112
</StackPanel>

src/Views/RepositoryToolbar.axaml.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -197,11 +197,11 @@ private async void Push(object sender, TappedEventArgs e)
197197
}
198198
}
199199

200-
private async void PushDirectlyByHotKey(object sender, RoutedEventArgs e)
200+
private async void PushByHotKey(object sender, RoutedEventArgs e)
201201
{
202202
if (DataContext is ViewModels.Repository repo)
203203
{
204-
await repo.PushAsync(true);
204+
await repo.PushAsync(false);
205205
e.Handled = true;
206206
}
207207
}

0 commit comments

Comments
 (0)