File tree Expand file tree Collapse file tree 1 file changed +5
-1
lines changed Expand file tree Collapse file tree 1 file changed +5
-1
lines changed Original file line number Diff line number Diff line change @@ -198,6 +198,7 @@ private async void Window_Closed(object sender, WindowEventArgs args)
198198 // Save application state and stop any background activity
199199 IUserSettingsService userSettingsService = Ioc . Default . GetRequiredService < IUserSettingsService > ( ) ;
200200 StatusCenterViewModel statusCenterViewModel = Ioc . Default . GetRequiredService < StatusCenterViewModel > ( ) ;
201+ ICommandManager commandManager = Ioc . Default . GetRequiredService < ICommandManager > ( ) ;
201202
202203 // A Workaround for the crash (#10110)
203204 if ( _LastOpenedFlyout ? . IsOpen ?? false )
@@ -209,7 +210,10 @@ private async void Window_Closed(object sender, WindowEventArgs args)
209210 }
210211
211212 // Save the current tab list in case it was overwriten by another instance
212- AppLifecycleHelper . SaveSessionTabs ( ) ;
213+ if ( userSettingsService . GeneralSettingsService . ContinueLastSessionOnStartUp || userSettingsService . AppSettingsService . RestoreTabsOnStartup )
214+ AppLifecycleHelper . SaveSessionTabs ( ) ;
215+ else
216+ await commandManager . CloseAllTabs . ExecuteAsync ( ) ;
213217
214218 if ( OutputPath is not null )
215219 {
You can’t perform that action at this time.
0 commit comments