Commit 590e52ba authored by Sylvain Berfini's avatar Sylvain Berfini

Fixed crash that happens sometimes + added forgotten file needed few commits ago

parent 9f74ae8f
......@@ -541,20 +541,23 @@ namespace Linphone.Model
{
BaseModel.UIDispatcher.BeginInvoke(() =>
{
try
if (LinphoneCore.GetCallsNb() > 0)
{
if (isMicMuted)
CallController.NotifyMuted();
else
CallController.NotifyUnmuted();
}
catch (Exception) { }
try
{
if (isMicMuted)
CallController.NotifyMuted();
else
CallController.NotifyUnmuted();
}
catch (Exception) { }
if (CallListener != null)
CallListener.MuteStateChanged(isMicMuted);
});
if (CallListener != null)
CallListener.MuteStateChanged(isMicMuted);
LinphoneCore.MuteMic(isMicMuted);
LinphoneCore.MuteMic(isMicMuted);
}
});
}
private void UnmuteRequested(VoipCallCoordinator sender, MuteChangeEventArgs args)
......
using System;
using System.Globalization;
using System.Windows;
using System.Windows.Data;
using System.Windows.Media;
namespace Linphone.Model
{
/// <summary>
/// Converter returning the AccentColorBrush if the boolean is true, else returning a title color.
/// </summary>
public class SipUriToUsernameConverter : IValueConverter
{
/// <returns>A SolidColorBrush (PhoneAccentBrush or PhoneSubtleBrush).</returns>
public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
{
string sipAddress = (string)value;
if (sipAddress.StartsWith("sip:"))
{
sipAddress = sipAddress.Replace("sip:", "");
}
if (sipAddress.Contains("@"))
{
sipAddress = sipAddress.Split(new string[] { "@" }, StringSplitOptions.RemoveEmptyEntries)[0];
}
return sipAddress;
}
/// <summary>
/// Not implemented.
/// </summary>
public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
{
throw new NotImplementedException();
}
}
}
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