Commit 7f129dc9 authored by Mickaël Turnel's avatar Mickaël Turnel

Fix video acceptation's popup lock

parent 86e22265
...@@ -255,7 +255,11 @@ namespace Linphone.Views { ...@@ -255,7 +255,11 @@ namespace Linphone.Views {
bool localVideo = call.CurrentParams.VideoEnabled; bool localVideo = call.CurrentParams.VideoEnabled;
bool autoAcceptCameraPolicy = LinphoneManager.Instance.Core.VideoActivationPolicy.AutomaticallyAccept; bool autoAcceptCameraPolicy = LinphoneManager.Instance.Core.VideoActivationPolicy.AutomaticallyAccept;
if (remoteVideo && !localVideo && !autoAcceptCameraPolicy) { if (remoteVideo && !localVideo && !autoAcceptCameraPolicy) {
AskVideoPopup(call); lock (popupLock) {
if (askingVideo) return;
askingVideo = true;
AskVideoPopup(call);
}
} }
} }
} }
...@@ -270,6 +274,7 @@ namespace Linphone.Views { ...@@ -270,6 +274,7 @@ namespace Linphone.Views {
buttons.checkedVideo(true); buttons.checkedVideo(true);
} else { } else {
buttons.checkedVideo(false); buttons.checkedVideo(false);
askingVideo = false;
} }
} }
} }
...@@ -281,12 +286,6 @@ namespace Linphone.Views { ...@@ -281,12 +286,6 @@ namespace Linphone.Views {
} }
public async void AskVideoPopup(Call call) { public async void AskVideoPopup(Call call) {
lock (popupLock)
{
if (askingVideo) return;
askingVideo = true;
}
MessageDialog dialog = new MessageDialog(ResourceLoader.GetForCurrentView().GetString("VideoActivationPopupContent"), ResourceLoader.GetForCurrentView().GetString("VideoActivationPopupCaption")); MessageDialog dialog = new MessageDialog(ResourceLoader.GetForCurrentView().GetString("VideoActivationPopupContent"), ResourceLoader.GetForCurrentView().GetString("VideoActivationPopupCaption"));
dialog.Commands.Clear(); dialog.Commands.Clear();
dialog.Commands.Add(new UICommand { Label = ResourceLoader.GetForCurrentView().GetString("Accept"), Id = 0 }); dialog.Commands.Add(new UICommand { Label = ResourceLoader.GetForCurrentView().GetString("Accept"), Id = 0 });
...@@ -301,10 +300,6 @@ namespace Linphone.Views { ...@@ -301,10 +300,6 @@ namespace Linphone.Views {
parameters.VideoEnabled = true; parameters.VideoEnabled = true;
} }
LinphoneManager.Instance.Core.AcceptCallUpdate(call, parameters); LinphoneManager.Instance.Core.AcceptCallUpdate(call, parameters);
lock(popupLock) {
askingVideo = false;
}
} }
#region Video #region Video
......
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