Skip to content

Commit 3e8e07a

Browse files
committed
Fix: Fixed an issue where clicking the file pane didn't close the Omnibar
1 parent bd84f34 commit 3e8e07a

File tree

1 file changed

+2
-9
lines changed

1 file changed

+2
-9
lines changed

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

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -37,8 +37,6 @@ public sealed partial class DetailsLayoutPage : BaseGroupableLayoutPage
3737
/// </summary>
3838
private uint currentIconSize;
3939

40-
private RectangleSelection? _rectangleSelection;
41-
4240
// Properties
4341

4442
protected override ListViewBase ListViewBase => FileList;
@@ -79,8 +77,8 @@ public DetailsLayoutPage() : base()
7977
{
8078
InitializeComponent();
8179
DataContext = this;
82-
_rectangleSelection = RectangleSelection.Create(FileList, SelectionRectangle, FileList_SelectionChanged);
83-
_rectangleSelection.SelectionEnded += SelectionRectangle_SelectionEnded;
80+
var selectionRectangle = RectangleSelection.Create(FileList, SelectionRectangle, FileList_SelectionChanged);
81+
selectionRectangle.SelectionEnded += SelectionRectangle_SelectionEnded;
8482

8583
UpdateSortOptionsCommand = new RelayCommand<string>(x =>
8684
{
@@ -204,11 +202,6 @@ protected override void OnNavigatingFrom(NavigatingCancelEventArgs e)
204202
FolderSettings.SortOptionPreferenceUpdated -= FolderSettings_SortOptionPreferenceUpdated;
205203
ParentShellPageInstance.ShellViewModel.PageTypeUpdated -= FilesystemViewModel_PageTypeUpdated;
206204
UserSettingsService.LayoutSettingsService.PropertyChanged -= LayoutSettingsService_PropertyChanged;
207-
if (_rectangleSelection is not null)
208-
{
209-
_rectangleSelection.SelectionEnded -= SelectionRectangle_SelectionEnded;
210-
_rectangleSelection = null;
211-
}
212205
}
213206

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

0 commit comments

Comments
 (0)