Skip to content

Commit

Permalink
fix: kill switch page remaining
Browse files Browse the repository at this point in the history
  • Loading branch information
Marc-Antoine-Soucy committed Apr 24, 2024
1 parent 9660cb7 commit bc0f5aa
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/app/ApplicationTemplate.Presentation/CoreStartup.cs
Original file line number Diff line number Diff line change
Expand Up @@ -251,11 +251,6 @@ async Task OnKillSwitchActivated(CancellationToken ct)
await navigationController.CloseModal(ct);
}

foreach (var stack in navigationController.State.Sections)
{
await ClearNavigationStack(ct, stack.Value);
}

await navigationController.NavigateAndClear(ct, () => new KillSwitchPageViewModel());

Logger.LogInformation("Navigated to kill switch page succesfully.");
Expand All @@ -265,6 +260,11 @@ async Task OnKillSwitchDeactivated(CancellationToken ct)
{
if (navigationController.GetActiveViewModel() is KillSwitchPageViewModel)
{
foreach (var stack in navigationController.State.Sections)
{
await ClearNavigationStack(ct, stack.Value);
}

await ExecuteInitialNavigation(ct, serviceProvider);
Logger.LogInformation("The kill switch was deactivated.");
}
Expand Down

0 comments on commit bc0f5aa

Please sign in to comment.