@@ -19,14 +19,14 @@ public sealed partial class AdvancedViewModel : ObservableObject
1919 {
2020 private IUserSettingsService UserSettingsService { get ; } = Ioc . Default . GetRequiredService < IUserSettingsService > ( ) ;
2121 private ICommonDialogService CommonDialogService { get ; } = Ioc . Default . GetRequiredService < ICommonDialogService > ( ) ;
22+ public ICommandManager Commands { get ; } = Ioc . Default . GetRequiredService < ICommandManager > ( ) ;
2223
2324 private readonly IFileTagsSettingsService fileTagsSettingsService = Ioc . Default . GetRequiredService < IFileTagsSettingsService > ( ) ;
2425
2526 public ICommand SetAsDefaultExplorerCommand { get ; }
2627 public ICommand SetAsOpenFileDialogCommand { get ; }
2728 public ICommand ExportSettingsCommand { get ; }
2829 public ICommand ImportSettingsCommand { get ; }
29- public ICommand OpenSettingsJsonCommand { get ; }
3030 public AsyncRelayCommand OpenFilesOnWindowsStartupCommand { get ; }
3131
3232
@@ -39,22 +39,11 @@ public AdvancedViewModel()
3939 SetAsOpenFileDialogCommand = new AsyncRelayCommand ( SetAsOpenFileDialogAsync ) ;
4040 ExportSettingsCommand = new AsyncRelayCommand ( ExportSettingsAsync ) ;
4141 ImportSettingsCommand = new AsyncRelayCommand ( ImportSettingsAsync ) ;
42- OpenSettingsJsonCommand = new AsyncRelayCommand ( OpenSettingsJsonAsync ) ;
4342 OpenFilesOnWindowsStartupCommand = new AsyncRelayCommand ( OpenFilesOnWindowsStartupAsync ) ;
4443
4544 _ = DetectOpenFilesAtStartupAsync ( ) ;
4645 }
4746
48- private async Task OpenSettingsJsonAsync ( )
49- {
50- await SafetyExtensions . IgnoreExceptions ( async ( ) =>
51- {
52- var settingsJsonFile = await StorageFile . GetFileFromApplicationUriAsync ( new Uri ( "ms-appdata:///local/settings/user_settings.json" ) ) ;
53- if ( ! await Launcher . LaunchFileAsync ( settingsJsonFile ) )
54- await ContextMenu . InvokeVerb ( "open" , settingsJsonFile . Path ) ;
55- } ) ;
56- }
57-
5847 private async Task SetAsDefaultExplorerAsync ( )
5948 {
6049 // Make sure IsSetAsDefaultFileManager is updated
0 commit comments