Skip to content

Commit

Permalink
fix(CrashReport): Fix message box not showing when application crashes
Browse files Browse the repository at this point in the history
  • Loading branch information
Belphemur committed Sep 10, 2021
1 parent 4a530ec commit 6179c53
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions SoundSwitch/Model/SoundSwitchApplicationContext.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
using SoundSwitch.Framework.Configuration;
using SoundSwitch.Framework.Profile;
using SoundSwitch.Framework.Updater;
using SoundSwitch.UI.Component;
using SoundSwitch.UI.Menu;

namespace SoundSwitch.Model
Expand All @@ -17,21 +16,20 @@ public class SoundSwitchApplicationContext : ApplicationContext
{
public SoundSwitchApplicationContext()
{

BannerManager.Setup();
QuickMenuManager<DeviceFullInfo>.Instance.Setup();
QuickMenuManager<Profile>.Instance.Setup();

var deviceActiveLister = new CachedAudioDeviceLister(DeviceState.Active);
var deviceActiveLister = new CachedAudioDeviceLister(DeviceState.Active);
var deviceUnpluggedActiveLister = new CachedAudioDeviceLister(DeviceState.Active | DeviceState.Unplugged);
deviceActiveLister.Refresh();
deviceUnpluggedActiveLister.Refresh();
AppModel.Instance.ActiveAudioDeviceLister = deviceActiveLister;

AppModel.Instance.ActiveAudioDeviceLister = deviceActiveLister;
AppModel.Instance.ActiveUnpluggedAudioLister = deviceUnpluggedActiveLister;

AppModel.Instance.TrayIcon = new TrayIcon();
AppModel.Instance.InitializeMain();

AppModel.Instance.NewVersionReleased += (sender, @event) =>
{
if (@event.UpdateMode == UpdateMode.Silent)
Expand Down

0 comments on commit 6179c53

Please sign in to comment.