Commit 47141507 authored by Sylvain Berfini's avatar Sylvain Berfini

Hide answer with video button if video is disabled + reject call if leaving the incoming call view

parent a013f9cc
......@@ -91,7 +91,7 @@
</Button>
<Button
x:Name="AnswerVidoe"
x:Name="AnswerVideo"
Grid.Row="1"
Grid.Column="0"
Grid.ColumnSpan="2"
......
......@@ -25,6 +25,11 @@ namespace Linphone.Views
public IncomingCall()
{
InitializeComponent();
if (!LinphoneManager.Instance.LinphoneCore.IsVideoSupported() || !LinphoneManager.Instance.LinphoneCore.IsVideoEnabled())
{
AnswerVideo.Visibility = Visibility.Collapsed;
}
}
/// <summary>
......@@ -41,6 +46,12 @@ namespace Linphone.Views
/// </summary>
protected override void OnNavigatedFrom(NavigationEventArgs e)
{
if (!e.IsNavigationInitiator)
{
//if we leave the application, we consider it as a call rejection
LinphoneManager.Instance.EndCurrentCall();
}
base.OnNavigatedFrom(e);
NavigationService.RemoveBackEntry(); //To prevent a new click on back button to start again the incoming call view (simulate a back click)
}
......
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