From 2d945c764729ea5d5111f169875f9668541f235e Mon Sep 17 00:00:00 2001 From: Emiliano Magliocca Date: Wed, 2 Jun 2021 13:05:05 +0200 Subject: [PATCH] Fix Onboarding Help --- Yugen.Mosaic.Uwp/Helpers/OnboardingHelper.cs | 11 +++++++++-- Yugen.Mosaic.Uwp/ViewModels/MainViewModel.cs | 2 +- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/Yugen.Mosaic.Uwp/Helpers/OnboardingHelper.cs b/Yugen.Mosaic.Uwp/Helpers/OnboardingHelper.cs index c83737c..77598bc 100644 --- a/Yugen.Mosaic.Uwp/Helpers/OnboardingHelper.cs +++ b/Yugen.Mosaic.Uwp/Helpers/OnboardingHelper.cs @@ -1,4 +1,5 @@ -using Windows.UI.Xaml; +using System; +using Windows.UI.Xaml; using Yugen.Mosaic.Uwp.Enums; using Yugen.Mosaic.Uwp.Models; using Yugen.Toolkit.Uwp.Helpers; @@ -46,7 +47,7 @@ public static OnboardingElement ShowTeachingTip() { OnboardingElement onboardingElement = null; - if (_step < 0 || IsDisabled) + if (IsDisabled) { return onboardingElement; } @@ -63,5 +64,11 @@ public static OnboardingElement ShowTeachingTip() return onboardingElement; } + + internal static void Reset() + { + IsDisabled = false; + _step = 0; + } } } \ No newline at end of file diff --git a/Yugen.Mosaic.Uwp/ViewModels/MainViewModel.cs b/Yugen.Mosaic.Uwp/ViewModels/MainViewModel.cs index 7085fbc..31a069c 100644 --- a/Yugen.Mosaic.Uwp/ViewModels/MainViewModel.cs +++ b/Yugen.Mosaic.Uwp/ViewModels/MainViewModel.cs @@ -498,7 +498,7 @@ private void ResetCommandBehavior() private void HelpCommandBehavior() { - OnboardingHelper.IsDisabled = false; + OnboardingHelper.Reset(); ShowTeachingTip(); }