Skip to content

Commit 5fa8809

Browse files
committed
made some changes mentioned by Copilot.
1 parent 62136c8 commit 5fa8809

File tree

3 files changed

+12
-11
lines changed

3 files changed

+12
-11
lines changed

src/UniGetUI.Avalonia/ViewModels/SidebarViewModel.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,11 +47,11 @@ partial void OnBundlesBadgeVisibleChanged(bool _)
4747

4848
// ─── Pane open/closed ─────────────────────────────────────────────────────
4949
[ObservableProperty]
50-
private bool _isPaneOpen = false;
50+
private bool isPaneOpen = !Settings.Get(Settings.K.CollapseNavMenuOnWideScreen);
5151

5252
partial void OnIsPaneOpenChanged(bool value)
5353
{
54-
Settings.Set(Settings.K.CollapseNavMenuOnWideScreen, value);
54+
Settings.Set(Settings.K.CollapseNavMenuOnWideScreen, !value);
5555
OnPropertyChanged(nameof(PaneWidth));
5656
OnPropertyChanged(nameof(UpdatesBadgeExpandedVisible));
5757
OnPropertyChanged(nameof(UpdatesBadgeCompactVisible));

src/UniGetUI.Avalonia/Views/Controls/Settings/SettingsCard.cs

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -233,13 +233,14 @@ protected override void OnPropertyChanged(AvaloniaPropertyChangedEventArgs chang
233233

234234
private void OnPointerPressed(object? sender, PointerPressedEventArgs e)
235235
{
236-
if (_isClickEnabled)
237-
{
238-
Click?.Invoke(this, new RoutedEventArgs());
239-
var cmd = Command;
240-
var param = CommandParameter;
241-
if (cmd?.CanExecute(param) == true)
242-
cmd.Execute(param);
243-
}
236+
if (!_isClickEnabled) return;
237+
if (!e.GetCurrentPoint(this).Properties.IsLeftButtonPressed) return;
238+
239+
e.Handled = true;
240+
Click?.Invoke(this, new RoutedEventArgs());
241+
var cmd = Command;
242+
var param = CommandParameter;
243+
if (cmd?.CanExecute(param) == true)
244+
cmd.Execute(param);
244245
}
245246
}

src/UniGetUI.Avalonia/Views/Pages/SettingsPages/Notifications.axaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@
4444
CornerRadius="0"
4545
IsEnabled="{Binding IsNotificationsEnabled}"/>
4646

47-
<settings:CheckboxCard SettingName="DisableUpdatesNotifications"
47+
<settings:CheckboxCard SettingName="DisableErrorNotifications"
4848
Text="{t:Translate Show a notification when an operation fails}"
4949
CornerRadius="0"
5050
IsEnabled="{Binding IsNotificationsEnabled}"/>

0 commit comments

Comments
 (0)