Skip to content

Commit e395254

Browse files
committed
Code Quality: Fixed rename in Grid View
1 parent 8f956f7 commit e395254

File tree

1 file changed

+2
-10
lines changed

1 file changed

+2
-10
lines changed

src/Files.App/Views/Layouts/GridLayoutPage.xaml.cs

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,6 @@ public sealed partial class GridLayoutPage : BaseGroupableLayoutPage
3131

3232
private volatile bool shouldSetVerticalScrollMode;
3333

34-
private RectangleSelection? _rectangleSelection;
35-
3634
// Properties
3735

3836
public ScrollViewer? ContentScroller { get; private set; }
@@ -151,8 +149,8 @@ public GridLayoutPage() : base()
151149
InitializeComponent();
152150
DataContext = this;
153151

154-
_rectangleSelection = RectangleSelection.Create(ListViewBase, SelectionRectangle, FileList_SelectionChanged);
155-
_rectangleSelection.SelectionEnded += SelectionRectangle_SelectionEnded;
152+
var selectionRectangle = RectangleSelection.Create(ListViewBase, SelectionRectangle, FileList_SelectionChanged);
153+
selectionRectangle.SelectionEnded += SelectionRectangle_SelectionEnded;
156154
}
157155

158156
// Methods
@@ -224,12 +222,6 @@ protected override void OnNavigatingFrom(NavigatingCancelEventArgs e)
224222
FolderSettings.LayoutModeChangeRequested -= FolderSettings_LayoutModeChangeRequested;
225223

226224
UserSettingsService.LayoutSettingsService.PropertyChanged -= LayoutSettingsService_PropertyChanged;
227-
228-
if (_rectangleSelection is not null)
229-
{
230-
_rectangleSelection.SelectionEnded -= SelectionRectangle_SelectionEnded;
231-
_rectangleSelection = null;
232-
}
233225
}
234226

235227
private void LayoutSettingsService_PropertyChanged(object? sender, PropertyChangedEventArgs e)

0 commit comments

Comments
 (0)