Skip to content

Commit 88073f7

Browse files
Merge
2 parents 11b333e + 5ff230b commit 88073f7

File tree

216 files changed

+120103
-118696
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

216 files changed

+120103
-118696
lines changed

builds/azure-pipelines-release.yml

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -95,8 +95,8 @@ jobs:
9595
inputs:
9696
targetType: 'inline'
9797
script: |
98-
gci $(Build.SourcesDirectory)\src -Include app.xaml.cs -recurse | ForEach -Process {
99-
(Get-Content $_ -Raw | ForEach -Process {$_ -replace "AppCenter.Start("", typeof(Analytics), typeof(Crashes));", "AppCenter.Start("$(appcenter.secret)", typeof(Analytics), typeof(Crashes));) | Set-Content $_ -NoNewline
98+
gci $(Build.SourcesDirectory)\src -Include *.cs -recurse | ForEach -Process {
99+
(Get-Content $_ -Raw | ForEach -Process {$_ -replace "appcenter.secret", "$(appcenter.secret)"}) | Set-Content $_ -NoNewline
100100
}
101101
failOnStderr: true
102102

@@ -156,6 +156,12 @@ jobs:
156156
ContainerName: 'files'
157157
BlobPrefix: '${{parameters.releaseBranch}}'
158158

159+
- task: tfx-cloudflare-purge@1
160+
inputs:
161+
username: '$(cloudflare.username)'
162+
apikey: '$(cloudflare.apikey)'
163+
zonename: '$(cloudflare.zoneid)'
164+
159165
### Store release ###
160166
- job: StoreRelease
161167
timeoutInMinutes: 120

builds/azure-pipelines.yml

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -46,19 +46,6 @@ steps:
4646
TargetFolder: '$(Build.SourcesDirectory)\src\Files.App\Resources'
4747
overWrite: true
4848

49-
- task: DownloadSecureFile@1
50-
name: appCenterDevKey
51-
displayName: 'Download AppCenter Dev Key'
52-
inputs:
53-
secureFile: 'AppCenterKey.txt'
54-
55-
- task: CopyFiles@2
56-
inputs:
57-
SourceFolder: '$(Agent.TempDirectory)'
58-
Contents: '$(appCenterDevKey.secureFilePath)'
59-
TargetFolder: '$(Build.SourcesDirectory)\src\Files.App\Resources'
60-
overWrite: true
61-
6249
- task: UseDotNet@2
6350
inputs:
6451
packageType: sdk

src/Files.App/App.xaml.cs

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
using CommunityToolkit.WinUI;
33
using CommunityToolkit.WinUI.Helpers;
44
using CommunityToolkit.WinUI.Notifications;
5-
using Files.App.Controllers;
65
using Files.App.DataModels;
76
using Files.App.Extensions;
87
using Files.App.Filesystem;
@@ -30,6 +29,7 @@
3029
using Microsoft.Extensions.DependencyInjection;
3130
using Microsoft.UI.Windowing;
3231
using Microsoft.UI.Xaml;
32+
using Microsoft.UI.Xaml.Controls;
3333
using Microsoft.Windows.AppLifecycle;
3434
using System;
3535
using System.Diagnostics;
@@ -54,6 +54,7 @@ public partial class App : Application
5454
private static bool ShowErrorNotification = false;
5555

5656
public static string OutputPath { get; set; }
57+
public static CommandBarFlyout? LastOpenedFlyout { get; set; }
5758
public static StorageHistoryWrapper HistoryWrapper = new StorageHistoryWrapper();
5859
public static SettingsViewModel AppSettings { get; private set; }
5960
public static AppModel AppModel { get; private set; }
@@ -95,7 +96,7 @@ public App()
9596
Services = ConfigureServices();
9697
Ioc.Default.ConfigureServices(Services);
9798
LogoPath = Package.Current.DisplayName == "Files - Dev" ? Constants.AssetPaths.DevLogo
98-
: (Package.Current.DisplayName == "Files - Preview" ? Constants.AssetPaths.PreviewLogo : Constants.AssetPaths.StableLogo);
99+
: (Package.Current.DisplayName == "Files (Preview)" ? Constants.AssetPaths.PreviewLogo : Constants.AssetPaths.StableLogo);
99100
}
100101

101102
private IServiceProvider ConfigureServices()
@@ -177,7 +178,7 @@ private static Task StartAppCenter()
177178
{
178179
// AppCenter secret is injected in builds/azure-pipelines-release.yml
179180
if (!AppCenter.Configured)
180-
AppCenter.Start("", typeof(Analytics), typeof(Crashes));
181+
AppCenter.Start("appcenter.secret", typeof(Analytics), typeof(Crashes));
181182
}
182183
catch (Exception ex)
183184
{
@@ -287,6 +288,15 @@ private async void Window_Closed(object sender, WindowEventArgs args)
287288
{
288289
// Save application state and stop any background activity
289290

291+
// A Workaround for the crash (#10110)
292+
if (LastOpenedFlyout?.IsOpen ?? false)
293+
{
294+
args.Handled = true;
295+
LastOpenedFlyout.Closed += (sender, e) => App.Current.Exit();
296+
LastOpenedFlyout.Hide();
297+
return;
298+
}
299+
290300
await Task.Yield(); // Method can take a long time, make sure the window is hidden
291301

292302
SaveSessionTabs();

0 commit comments

Comments
 (0)