Skip to content

Commit

Permalink
Minor fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
ShankarBUS committed Apr 8, 2021
1 parent d623918 commit 0558e79
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 20 deletions.
28 changes: 15 additions & 13 deletions ModernFlyouts/FlyoutHandler.cs
Original file line number Diff line number Diff line change
Expand Up @@ -327,22 +327,24 @@ private void OnNativeFlyoutShown()
NativeFlyoutHandler.Instance.HideNativeFlyout();

if (prevTriggerData != null
&& prevTriggerData.IsExpired)
&& !prevTriggerData.IsExpired)
{
// When the native flyout is triggered by some factors
// that are neither ShellHook messages or airplane mode changes
// (that implies the native flyout is triggered by
// either touchpad gestures or audio device buttons),
// we show the volume flyout as a fallback.
// Only volume flyout is shown as a fallback
// because other triggers are always detected perfectly.
ProcessFlyoutTrigger(new()
{
TriggerType = FlyoutTriggerType.Volume,
});
prevTriggerData.IsExpired = true;
return;
}

prevTriggerData.IsExpired = true;
// When the native flyout is triggered by some factors
// that are neither ShellHook messages or airplane mode changes
// (that implies the native flyout is triggered by
// either touchpad gestures or audio device buttons),
// we show the volume flyout as a fallback.
// Only volume flyout is shown as a fallback
// because other triggers are always detected perfectly.
ProcessFlyoutTrigger(new()
{
TriggerType = FlyoutTriggerType.Volume,
IsExpired = true
});
}
else if (DefaultFlyout == DefaultFlyout.None)
{
Expand Down
2 changes: 1 addition & 1 deletion ModernFlyouts/JumpListHelper.cs
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ public class JumpListHelper

public static void CreateJumpList()
{
AppPath = Path.Combine(Directory.GetCurrentDirectory(), $"{Program.AppLauncherName}.exe");
AppPath = Path.Combine(Directory.GetCurrentDirectory(), $"{Program.AppHostName}.exe");

JumpList jumpList = new();
JumpTask settingsTask = new()
Expand Down
9 changes: 3 additions & 6 deletions ModernFlyouts/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
using ModernFlyouts.Core.Interop;
using ModernFlyouts.Helpers;
using System;
using System.Diagnostics;
using System.Reflection;
using System.Threading;

Expand All @@ -11,17 +10,15 @@ namespace ModernFlyouts
public class Program
{
public const string AppName = "ModernFlyouts";
public const string AppLauncherName = "ModernFlyoutsLauncher";
public const string AppHostName = "ModernFlyoutsHost";

[STAThread]
private static void Main(string[] args)
{
Thread thread = new Thread(() => {
Thread thread = new(() => {
AppLifecycleManager.StartApplication(args, () =>
{
#if DEBUG
Debugger.Launch();
#elif RELEASE
#if RELEASE
Microsoft.AppCenter.AppCenter.Start("26393d67-ab03-4e26-a6db-aa76bf989c21",
typeof(Microsoft.AppCenter.Analytics.Analytics), typeof(Microsoft.AppCenter.Crashes.Crashes));
#endif
Expand Down

0 comments on commit 0558e79

Please sign in to comment.