Skip to content

Commit

Permalink
Merge
Browse files Browse the repository at this point in the history
  • Loading branch information
ferrariofilippo committed Feb 15, 2023
2 parents 27107a7 + 65834fc commit e558a0b
Show file tree
Hide file tree
Showing 40 changed files with 2,254 additions and 2,110 deletions.
12 changes: 11 additions & 1 deletion src/Files.App/App.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
using CommunityToolkit.WinUI;
using CommunityToolkit.WinUI.Helpers;
using CommunityToolkit.WinUI.Notifications;
using Files.App.Controllers;
using Files.App.DataModels;
using Files.App.Extensions;
using Files.App.Filesystem;
Expand Down Expand Up @@ -30,6 +29,7 @@
using Microsoft.Extensions.DependencyInjection;
using Microsoft.UI.Windowing;
using Microsoft.UI.Xaml;
using Microsoft.UI.Xaml.Controls;
using Microsoft.Windows.AppLifecycle;
using System;
using System.Diagnostics;
Expand All @@ -54,6 +54,7 @@ public partial class App : Application
private static bool ShowErrorNotification = false;

public static string OutputPath { get; set; }
public static CommandBarFlyout? LastOpenedFlyout { get; set; }
public static StorageHistoryWrapper HistoryWrapper = new StorageHistoryWrapper();
public static SettingsViewModel AppSettings { get; private set; }
public static AppModel AppModel { get; private set; }
Expand Down Expand Up @@ -287,6 +288,15 @@ private async void Window_Closed(object sender, WindowEventArgs args)
{
// Save application state and stop any background activity

// A Workaround for the crash (#10110)
if (LastOpenedFlyout?.IsOpen ?? false)
{
args.Handled = true;
LastOpenedFlyout.Closed += (sender, e) => App.Current.Exit();
LastOpenedFlyout.Hide();
return;
}

await Task.Yield(); // Method can take a long time, make sure the window is hidden

SaveSessionTabs();
Expand Down
Binary file modified src/Files.App/Assets/Custom Glyphs/Colored-Icons.ttf
Binary file not shown.
Loading

0 comments on commit e558a0b

Please sign in to comment.