Skip to content

Commit 2dc4c73

Browse files
committed
Update
1 parent b1ee7a5 commit 2dc4c73

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
@@ -263,6 +263,9 @@ public bool IsOmnibarFocused
263263
private OmnibarMode _OmnibarCurrentSelectedMode;
264264
public OmnibarMode OmnibarCurrentSelectedMode { get => _OmnibarCurrentSelectedMode; set => SetProperty(ref _OmnibarCurrentSelectedMode, value); }
265265

266+
private string _OmnibarCurrentSelectedModeName;
267+
public string OmnibarCurrentSelectedModeName { get => _OmnibarCurrentSelectedModeName; set => SetProperty(ref _OmnibarCurrentSelectedModeName, value); }
268+
266269
private CurrentInstanceViewModel _InstanceViewModel;
267270
public CurrentInstanceViewModel InstanceViewModel
268271
{
@@ -768,7 +771,7 @@ public void SwitchToCommandPaletteMode()
768771
{
769772
if (EnableOmnibar)
770773
{
771-
OmnibarCurrentSelectedMode.Name = OmnibarPaletteModeName;
774+
OmnibarCurrentSelectedModeName = OmnibarPaletteModeName;
772775
IsOmnibarFocused = true;
773776
}
774777
else
@@ -787,7 +790,7 @@ public void SwitchToSearchMode()
787790
{
788791
if (EnableOmnibar)
789792
{
790-
OmnibarCurrentSelectedMode.Name = OmnibarSearchModeName;
793+
OmnibarCurrentSelectedModeName = OmnibarSearchModeName;
791794
IsOmnibarFocused = true;
792795
}
793796
else
@@ -807,9 +810,9 @@ public void SwitchToSearchMode()
807810
}
808811
}
809812

810-
public void SwitchToPathhMode()
813+
public void SwitchToPathMode()
811814
{
812-
OmnibarCurrentSelectedMode.Name = OmnibarPathModeName;
815+
OmnibarCurrentSelectedModeName = OmnibarPathModeName;
813816
IsOmnibarFocused = true;
814817
}
815818

0 commit comments

Comments
 (0)