diff --git a/src/Files.App/BaseLayout.cs b/src/Files.App/BaseLayout.cs index 5e9c0e3fd0c9..e163b1c815de 100644 --- a/src/Files.App/BaseLayout.cs +++ b/src/Files.App/BaseLayout.cs @@ -623,6 +623,11 @@ private void AddNewFileTagsToMenu(CommandBarFlyout contextMenu) var overflowSeparator = contextMenu.SecondaryCommands.FirstOrDefault(x => x is FrameworkElement fe && fe.Tag as string == "OverflowSeparator") as AppBarSeparator; var index = contextMenu.SecondaryCommands.IndexOf(overflowSeparator); index = index >= 0 ? index : contextMenu.SecondaryCommands.Count; + + // Only show the edit tags flyout if settings is enabled + if (!UserSettingsService.AppearanceSettingsService.DisplayEditTagsMenu) + return; + contextMenu.SecondaryCommands.Insert(index, new AppBarSeparator()); contextMenu.SecondaryCommands.Insert(index + 1, new AppBarButton() { diff --git a/src/Files.App/ServicesImplementation/Settings/AppearanceSettingsService.cs b/src/Files.App/ServicesImplementation/Settings/AppearanceSettingsService.cs index 2d7210498217..81a1f7360013 100644 --- a/src/Files.App/ServicesImplementation/Settings/AppearanceSettingsService.cs +++ b/src/Files.App/ServicesImplementation/Settings/AppearanceSettingsService.cs @@ -26,12 +26,6 @@ public bool IsSidebarOpen set => Set(value); } - public bool MoveShellExtensionsToSubMenu - { - get => Get(true); - set => Set(value); - } - public bool UseCompactStyles { get => Get(false); @@ -73,16 +67,29 @@ public String AppThemeFontFamily set => Set(value); } + public bool MoveShellExtensionsToSubMenu + { + get => Get(true); + set => Set(value); + } + + public bool DisplayEditTagsMenu + { + get => Get(true); + set => Set(value); + } + protected override void RaiseOnSettingChangedEvent(object sender, SettingChangedEventArgs e) { switch (e.SettingName) { - case nameof(MoveShellExtensionsToSubMenu): case nameof(UseCompactStyles): case nameof(AppThemeBackgroundColor): case nameof(AppThemeAddressBarBackgroundColor): case nameof(AppThemeSidebarBackgroundColor): case nameof(AppThemeFileAreaBackgroundColor): + case nameof(MoveShellExtensionsToSubMenu): + case nameof(DisplayEditTagsMenu): Analytics.TrackEvent($"Set {e.SettingName} to {e.NewValue}"); break; } diff --git a/src/Files.App/Strings/en-US/Resources.resw b/src/Files.App/Strings/en-US/Resources.resw index 553ef7ce51ed..f6c8137c3e16 100644 --- a/src/Files.App/Strings/en-US/Resources.resw +++ b/src/Files.App/Strings/en-US/Resources.resw @@ -823,7 +823,7 @@ Language - Move overflow items into a sub menu + Move shell extensions into a sub menu Show confirmation dialog when deleting items @@ -2898,4 +2898,7 @@ Bundles will be retiring in a future update 📎 - + + Display the edit tags flyout + + \ No newline at end of file diff --git a/src/Files.App/ViewModels/SettingsViewModels/AppearanceViewModel.cs b/src/Files.App/ViewModels/SettingsViewModels/AppearanceViewModel.cs index 7f566bc93151..7ea856408ed1 100644 --- a/src/Files.App/ViewModels/SettingsViewModels/AppearanceViewModel.cs +++ b/src/Files.App/ViewModels/SettingsViewModels/AppearanceViewModel.cs @@ -107,6 +107,19 @@ public bool MoveShellExtensionsToSubMenu } } } + + public bool DisplayEditTagsMenu + { + get => UserSettingsService.AppearanceSettingsService.DisplayEditTagsMenu; + set + { + if (value != UserSettingsService.AppearanceSettingsService.DisplayEditTagsMenu) + { + UserSettingsService.AppearanceSettingsService.DisplayEditTagsMenu = value; + OnPropertyChanged(); + } + } + } public bool UseCompactStyles { diff --git a/src/Files.App/Views/SettingsPages/Appearance.xaml b/src/Files.App/Views/SettingsPages/Appearance.xaml index ed6638820c82..cc8b9c5159a1 100644 --- a/src/Files.App/Views/SettingsPages/Appearance.xaml +++ b/src/Files.App/Views/SettingsPages/Appearance.xaml @@ -175,6 +175,17 @@ FontWeight="Medium" Text="{helpers:ResourceString Name=SettingsContextMenu/Text}" /> + + + + + + + + diff --git a/src/Files.Backend/Services/Settings/IAppearanceSettingsService.cs b/src/Files.Backend/Services/Settings/IAppearanceSettingsService.cs index 2a4d980ff0ef..42aeaa75dc97 100644 --- a/src/Files.Backend/Services/Settings/IAppearanceSettingsService.cs +++ b/src/Files.Backend/Services/Settings/IAppearanceSettingsService.cs @@ -5,11 +5,6 @@ namespace Files.Backend.Services.Settings { public interface IAppearanceSettingsService : IBaseSettingsService, INotifyPropertyChanged { - /// - /// Gets or sets a value indicating whether or not to move shell extensions into a sub menu. - /// - bool MoveShellExtensionsToSubMenu { get; set; } - #region Internal Settings /// @@ -53,5 +48,15 @@ public interface IAppearanceSettingsService : IBaseSettingsService, INotifyPrope /// Gets or sets a value for the app theme font family. /// String AppThemeFontFamily { get; set; } + + /// + /// Gets or sets a value indicating whether or not to move shell extensions into a sub menu. + /// + bool MoveShellExtensionsToSubMenu { get; set; } + + /// + /// Gets or sets a value indicating whether or not to show the edit tags menu. + /// + bool DisplayEditTagsMenu { get; set; } } }