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

Fix video acceptation's popup lock

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