Skip to content

Commit bfd0afa

Browse files
committed
Ensure drives are watched for in subsequent app instances launched via protocol
1 parent 3e8407d commit bfd0afa

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

Files UWP/App.xaml.cs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -422,6 +422,12 @@ protected override void OnActivated(IActivatedEventArgs args)
422422
rootFrame.Navigate(typeof(InstanceTabsView), @trimmedPath, new SuppressNavigationTransitionInfo());
423423
}
424424
// Ensure the current window is active.
425+
watcher = DeviceInformation.CreateWatcher(StorageDevice.GetDeviceSelector());
426+
watcher.Added += DeviceAdded;
427+
watcher.Removed += DeviceRemoved;
428+
watcher.Updated += DeviceUpdated;
429+
watcher.EnumerationCompleted += Watcher_EnumerationCompleted;
430+
watcher.Start();
425431
Window.Current.Activate();
426432
return;
427433
}

0 commit comments

Comments
 (0)