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)
198
198
// Save application state and stop any background activity
199
199
IUserSettingsService userSettingsService = Ioc . Default . GetRequiredService < IUserSettingsService > ( ) ;
200
200
StatusCenterViewModel statusCenterViewModel = Ioc . Default . GetRequiredService < StatusCenterViewModel > ( ) ;
201
+ ICommandManager commandManager = Ioc . Default . GetRequiredService < ICommandManager > ( ) ;
201
202
202
203
// A Workaround for the crash (#10110)
203
204
if ( _LastOpenedFlyout ? . IsOpen ?? false )
@@ -209,7 +210,10 @@ private async void Window_Closed(object sender, WindowEventArgs args)
209
210
}
210
211
211
212
// 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 ( ) ;
213
217
214
218
if ( OutputPath is not null )
215
219
{
You can’t perform that action at this time.
0 commit comments