Skip to content

Commit 55afbbc

Browse files
committed
Revert "Fix: Always set content dialog root"
This reverts commit 119068c.
1 parent 119068c commit 55afbbc

File tree

5 files changed

+0
-45
lines changed

5 files changed

+0
-45
lines changed

src/Files.App/Services/UpdateService.cs

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -151,15 +151,6 @@ private static async Task<bool> ShowDialogAsync()
151151
return result == ContentDialogResult.Primary;
152152
}
153153

154-
// WINUI3
155-
private ContentDialog SetContentDialogRoot(ContentDialog contentDialog)
156-
{
157-
if (Windows.Foundation.Metadata.ApiInformation.IsApiContractPresent("Windows.Foundation.UniversalApiContract", 8))
158-
contentDialog.XamlRoot = MainWindow.Instance.Content.XamlRoot;
159-
160-
return contentDialog;
161-
}
162-
163154
public async Task CheckLatestReleaseNotesAsync(CancellationToken cancellationToken = default)
164155
{
165156
if (!IsAppUpdated)

src/Files.App/Utils/Archives/DecompressHelper.cs

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -247,15 +247,6 @@ public static async Task DecompressArchiveToChildFolderAsync(IShellPage associat
247247
}
248248
}
249249

250-
// WINUI3
251-
private static ContentDialog SetContentDialogRoot(ContentDialog contentDialog)
252-
{
253-
if (Windows.Foundation.Metadata.ApiInformation.IsApiContractPresent("Windows.Foundation.UniversalApiContract", 8))
254-
contentDialog.XamlRoot = MainWindow.Instance.Content.XamlRoot;
255-
256-
return contentDialog;
257-
}
258-
259250
private static async Task<SevenZipExtractor?> GetZipFile(BaseStorageFile archive, string password = "")
260251
{
261252
return await FilesystemTasks.Wrap(async () =>

src/Files.App/Utils/RecycleBin/RecycleBinHelpers.cs

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -109,15 +109,6 @@ public static async Task RestoreSelectionRecycleBinAsync(IShellPage associatedIn
109109
await RestoreItemAsync(associatedInstance);
110110
}
111111

112-
// WINUI3
113-
private static ContentDialog SetContentDialogRoot(ContentDialog contentDialog)
114-
{
115-
if (Windows.Foundation.Metadata.ApiInformation.IsApiContractPresent("Windows.Foundation.UniversalApiContract", 8))
116-
contentDialog.XamlRoot = MainWindow.Instance.Content.XamlRoot;
117-
118-
return contentDialog;
119-
}
120-
121112
public static async Task<bool> HasRecycleBin(string? path)
122113
{
123114
if (string.IsNullOrEmpty(path) || path.StartsWith(@"\\?\", StringComparison.Ordinal))

src/Files.App/Utils/Storage/Operations/FilesystemOperations.cs

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -937,15 +937,6 @@ await rawStorageHistory.SelectMany((item) => item.Source).ToListAsync(),
937937
return null;
938938
}
939939

940-
// WINUI3
941-
private ContentDialog SetContentDialogRoot(ContentDialog contentDialog)
942-
{
943-
if (Windows.Foundation.Metadata.ApiInformation.IsApiContractPresent("Windows.Foundation.UniversalApiContract", 8))
944-
contentDialog.XamlRoot = MainWindow.Instance.Content.XamlRoot;
945-
946-
return contentDialog;
947-
}
948-
949940
public Task<IStorageHistory> CreateShortcutItemsAsync(IList<IStorageItemWithPath> source, IList<string> destination, IProgress<StatusCenterItemProgressModel> progress, CancellationToken token)
950941
{
951942
throw new NotImplementedException("Cannot create shortcuts in UWP.");

src/Files.App/Views/LayoutModes/StandardLayoutMode.cs

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -332,15 +332,6 @@ protected void SelectionCheckbox_DoubleTapped(object sender, DoubleTappedRoutedE
332332
e.Handled = true;
333333
}
334334

335-
// WINUI3
336-
private ContentDialog SetContentDialogRoot(ContentDialog contentDialog)
337-
{
338-
if (Windows.Foundation.Metadata.ApiInformation.IsApiContractPresent("Windows.Foundation.UniversalApiContract", 8))
339-
contentDialog.XamlRoot = MainWindow.Instance.Content.XamlRoot;
340-
341-
return contentDialog;
342-
}
343-
344335
public override void Dispose()
345336
{
346337
base.Dispose();

0 commit comments

Comments
 (0)