Repository: files-community/Files
File: src/Files.App/UserControls/NavigationToolbar.xaml.cs (C#)

Code before:
			}
			else if (Omnibar.CurrentSelectedMode == OmnibarCommandPaletteMode)
			{
				await DispatcherQueue.EnqueueOrInvokeAsync(ViewModel.PopulateOmnibarSuggestionsForCommandPaletteMode);
			}
			else if (Omnibar.CurrentSelectedMode == OmnibarSearchMode)
			{
				await DispatcherQueue.EnqueueOrInvokeAsync(ViewModel.PopulateOmnibarSuggestionsForSearchMode);
			}
		}

		private async void BreadcrumbBar_ItemClicked(Controls.BreadcrumbBar sender, Controls.BreadcrumbBarItemClickedEventArgs args)
		{
			if (args.IsRootItem)
			{
				await ViewModel.HandleItemNavigationAsync("Home");
				return;
			}

			// Navigation to the current folder should not happen
			if (args.Index == ViewModel.PathComponents.Count - 1 ||
				ViewModel.PathComponents[args.Index].Path is not { } path)
				return;

			var pointerUpdateKind = args.PointerRoutedEventArgs.GetCurrentPoint(null).Properties.PointerUpdateKind;
			await ViewModel.HandleFolderNavigationAsync(path, pointerUpdateKind is PointerUpdateKind.MiddleButtonReleased);
		}

		private async void BreadcrumbBar_ItemDropDownFlyoutOpening(object sender, BreadcrumbBarItemDropDownFlyoutEventArgs e)
		{
			if (e.IsRootItem)
			{
				IHomeFolder homeFolder = new HomeFolder();
				IContentPageContext contentPageContext = Ioc.Default.GetRequiredService<IContentPageContext>();

				e.Flyout.Items.Add(new MenuFlyoutHeaderItem() { Text = Strings.QuickAccess.GetLocalizedResource() });

				await foreach (var storable in homeFolder.GetQuickAccessFolderAsync())
				{
					if (storable is not IWindowsStorable windowsStorable)
						continue;

					var flyoutItem = new MenuFlyoutItem()
					{
						Text = windowsStorable.GetDisplayName(Windows.Win32.UI.Shell.SIGDN.SIGDN_PARENTRELATIVEFORUI),
						DataContext = windowsStorable.GetDisplayName(Windows.Win32.UI.Shell.SIGDN.SIGDN_DESKTOPABSOLUTEPARSING),
						Icon = new FontIcon() { Glyph = "\uE8B7" }, // As a placeholder
					};

					e.Flyout.Items.Add(flyoutItem);


Review comment (suggestion):
Instead of passing `PointerUpdateKind.MiddleButtonReleased` directly, I think we can make the code easier to read if we add another variable like this `var openInNewTab = PointerUpdateKind.MiddleButtonReleased`.

Code after:
			}
			else if (Omnibar.CurrentSelectedMode == OmnibarCommandPaletteMode)
			{
				await DispatcherQueue.EnqueueOrInvokeAsync(ViewModel.PopulateOmnibarSuggestionsForCommandPaletteMode);
			}
			else if (Omnibar.CurrentSelectedMode == OmnibarSearchMode)
			{
				await DispatcherQueue.EnqueueOrInvokeAsync(ViewModel.PopulateOmnibarSuggestionsForSearchMode);
			}
		}

		private async void BreadcrumbBar_ItemClicked(Controls.BreadcrumbBar sender, Controls.BreadcrumbBarItemClickedEventArgs args)
		{
			if (args.IsRootItem)
			{
				await ViewModel.HandleItemNavigationAsync("Home");
				return;
			}

			// Navigation to the current folder should not happen
			if (args.Index == ViewModel.PathComponents.Count - 1 ||
				ViewModel.PathComponents[args.Index].Path is not { } path)
				return;

			// If user clicked the item with middle mouse button, open it in new tab
			var openInNewTab = args.PointerRoutedEventArgs?.GetCurrentPoint(null).Properties.PointerUpdateKind is PointerUpdateKind.MiddleButtonReleased;

			await ViewModel.HandleFolderNavigationAsync(path, openInNewTab);
		}

		private async void BreadcrumbBar_ItemDropDownFlyoutOpening(object sender, BreadcrumbBarItemDropDownFlyoutEventArgs e)
		{
			if (e.IsRootItem)
			{
				IHomeFolder homeFolder = new HomeFolder();
				IContentPageContext contentPageContext = Ioc.Default.GetRequiredService<IContentPageContext>();

				e.Flyout.Items.Add(new MenuFlyoutHeaderItem() { Text = Strings.QuickAccess.GetLocalizedResource() });

				await foreach (var storable in homeFolder.GetQuickAccessFolderAsync())
				{
					if (storable is not IWindowsStorable windowsStorable)
						continue;

					var flyoutItem = new MenuFlyoutItem()
					{
						Text = windowsStorable.GetDisplayName(Windows.Win32.UI.Shell.SIGDN.SIGDN_PARENTRELATIVEFORUI),
						DataContext = windowsStorable.GetDisplayName(Windows.Win32.UI.Shell.SIGDN.SIGDN_DESKTOPABSOLUTEPARSING),
						Icon = new FontIcon() { Glyph = "\uE8B7" }, // As a placeholder
					};