Skip to content

Commit 9048508

Browse files
authored
Fix: Fixed issue where "Open Files on Windows startup" didn't work (#13811)
1 parent 1d7cee0 commit 9048508

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

src/Files.App/MainWindow.xaml.cs

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -181,6 +181,16 @@ public async Task InitializeApplicationAsync(object activatedEventArgs)
181181
await mainPageViewModel.AddNewTabByPathAsync(typeof(PaneHolderPage), fileArgs.Files[index].Path);
182182
}
183183
break;
184+
185+
case IStartupTaskActivatedEventArgs startupArgs:
186+
// Just launch the app with no arguments
187+
rootFrame.Navigate(typeof(MainPage), null, new SuppressNavigationTransitionInfo());
188+
break;
189+
190+
default:
191+
// Just launch the app with no arguments
192+
rootFrame.Navigate(typeof(MainPage), null, new SuppressNavigationTransitionInfo());
193+
break;
184194
}
185195

186196
if (!AppWindow.IsVisible)

0 commit comments

Comments
 (0)