Commit bf8e0621 authored by Sylvain Berfini's avatar Sylvain Berfini

Prevent the app to stack multiples Dialer views in the back stack

parent 714b8a56
......@@ -2,6 +2,7 @@
using Linphone.Model;
using System;
using System.ComponentModel;
using System.Diagnostics;
using System.Runtime.CompilerServices;
using System.Windows.Navigation;
using System.Windows.Threading;
......@@ -102,11 +103,18 @@ namespace Linphone
/// </summary>
public void CallEnded(LinphoneCall call)
{
Logger.Msg("[CallListener] Call ended, can go back ? " + this.Page.NavigationService.CanGoBack);
Debug.WriteLine("[CallListener] Call ended, can go back ? " + this.Page.NavigationService.CanGoBack);
//Launch the Dialer and remove the incall view from the backstack
this.Page.NavigationService.Navigate(new Uri("/Views/Dialer.xaml", UriKind.RelativeOrAbsolute));
this.Page.NavigationService.RemoveBackEntry();
if (this.Page.NavigationService.CanGoBack)
{
this.Page.NavigationService.GoBack();
}
else
{
// Launch the Dialer and remove the incall view from the backstack
this.Page.NavigationService.Navigate(new Uri("/Views/Dialer.xaml", UriKind.RelativeOrAbsolute));
this.Page.NavigationService.RemoveBackEntry();
}
}
/// <summary>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment