Skip to content

Commit 5f6aed0

Browse files
committed
Update
1 parent 14af283 commit 5f6aed0

File tree

3 files changed

+9
-5
lines changed

3 files changed

+9
-5
lines changed

src/Files.App/Actions/Global/EditPathAction.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ public Task ExecuteAsync(object? parameter = null)
3030
if (context.ShellPage is not null)
3131
{
3232
if (GeneralSettingsService.EnableOmnibar)
33-
context.ShellPage!.ToolbarViewModel.SwitchToPathhMode();
33+
context.ShellPage!.ToolbarViewModel.SwitchToPathMode();
3434
else
3535
context.ShellPage.ToolbarViewModel.IsEditModeEnabled = true;
3636
}

src/Files.App/UserControls/NavigationToolbar.xaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -321,6 +321,7 @@
321321
Grid.Column="1"
322322
x:Load="{x:Bind ViewModel.EnableOmnibar, Mode=OneWay}"
323323
CurrentSelectedMode="{x:Bind ViewModel.OmnibarCurrentSelectedMode, Mode=TwoWay}"
324+
CurrentSelectedModeName="{x:Bind ViewModel.OmnibarCurrentSelectedModeName, Mode=TwoWay}"
324325
IsFocused="{x:Bind ViewModel.IsOmnibarFocused, Mode=TwoWay}"
325326
QuerySubmitted="Omnibar_QuerySubmitted"
326327
SuggestionChosen="Omnibar_SuggestionChosen"

src/Files.App/ViewModels/UserControls/NavigationToolbarViewModel.cs

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -259,6 +259,9 @@ public bool IsOmnibarFocused
259259
private OmnibarMode _OmnibarCurrentSelectedMode;
260260
public OmnibarMode OmnibarCurrentSelectedMode { get => _OmnibarCurrentSelectedMode; set => SetProperty(ref _OmnibarCurrentSelectedMode, value); }
261261

262+
private string _OmnibarCurrentSelectedModeName;
263+
public string OmnibarCurrentSelectedModeName { get => _OmnibarCurrentSelectedModeName; set => SetProperty(ref _OmnibarCurrentSelectedModeName, value); }
264+
262265
private CurrentInstanceViewModel _InstanceViewModel;
263266
public CurrentInstanceViewModel InstanceViewModel
264267
{
@@ -752,7 +755,7 @@ public void SwitchToCommandPaletteMode()
752755
{
753756
if (EnableOmnibar)
754757
{
755-
OmnibarCurrentSelectedMode.Name = OmnibarPaletteModeName;
758+
OmnibarCurrentSelectedModeName = OmnibarPaletteModeName;
756759
IsOmnibarFocused = true;
757760
}
758761
else
@@ -771,7 +774,7 @@ public void SwitchToSearchMode()
771774
{
772775
if (EnableOmnibar)
773776
{
774-
OmnibarCurrentSelectedMode.Name = OmnibarSearchModeName;
777+
OmnibarCurrentSelectedModeName = OmnibarSearchModeName;
775778
IsOmnibarFocused = true;
776779
}
777780
else
@@ -791,9 +794,9 @@ public void SwitchToSearchMode()
791794
}
792795
}
793796

794-
public void SwitchToPathhMode()
797+
public void SwitchToPathMode()
795798
{
796-
OmnibarCurrentSelectedMode.Name = OmnibarPathModeName;
799+
OmnibarCurrentSelectedModeName = OmnibarPathModeName;
797800
IsOmnibarFocused = true;
798801
}
799802

0 commit comments

Comments
 (0)