Skip to content

Commit d1a1294

Browse files
committed
Update leftovers
1 parent 9fddcf6 commit d1a1294

File tree

3 files changed

+10
-4
lines changed

3 files changed

+10
-4
lines changed

src/Files.App.Controls/Sidebar/SidebarItemAutomationPeer.cs

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,9 @@
99

1010
namespace Files.App.Controls
1111
{
12+
/// <summary>
13+
/// Automation peer for <see cref="SidebarItem"/>.
14+
/// </summary>
1215
public sealed partial class SidebarItemAutomationPeer : FrameworkElementAutomationPeer, IInvokeProvider, IExpandCollapseProvider, ISelectionItemProvider
1316
{
1417
public ExpandCollapseState ExpandCollapseState =>
@@ -39,11 +42,11 @@ protected override string GetNameCore()
3942

4043
protected override object GetPatternCore(PatternInterface patternInterface)
4144
{
42-
if (patternInterface == PatternInterface.Invoke || patternInterface == PatternInterface.SelectionItem)
45+
if (patternInterface is PatternInterface.Invoke or PatternInterface.SelectionItem)
4346
{
4447
return this;
4548
}
46-
else if (patternInterface == PatternInterface.ExpandCollapse)
49+
else if (patternInterface is PatternInterface.ExpandCollapse)
4750
{
4851
if (Owner.CollapseEnabled)
4952
return this;

src/Files.App.Controls/Sidebar/SidebarView.Events.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ not VirtualKey.Right and
9595
var increment = ctrl.HasFlag(CoreVirtualKeyStates.Down) ? 5 : 1;
9696

9797
// Left makes the pane smaller so we invert the increment
98-
if (e.Key == VirtualKey.Left)
98+
if (e.Key is VirtualKey.Left)
9999
increment = -increment;
100100

101101
var newWidth = OpenPaneLength + increment;

src/Files.App.Controls/Util.cs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
1-
using Microsoft.UI.Input;
1+
// Copyright (c) Files Community
2+
// Licensed under the MIT License.
3+
4+
using Microsoft.UI.Input;
25
using System.Reflection;
36

47
namespace Files.App.Controls

0 commit comments

Comments
 (0)