Commit eb8753be authored by Margaux Clerc's avatar Margaux Clerc

Fix call button in contact detail

parent 1e08c70a
......@@ -27,7 +27,16 @@ namespace Linphone.Controls
public String Text
{
get { return address.Text; }
set { address.Text = value; }
set {
address.Text = value;
if(value.Length > 0)
{
Backspace.IsEnabled = true;
} else
{
Backspace.IsEnabled = false;
}
}
}
public AddressBox()
......
......@@ -26,7 +26,6 @@
<TextBlock
Grid.Column="0"
Grid.Row="1"
Grid.ColumnSpan="3"
x:Name="phone"
Style="{ThemeResource ListItemStyle}"
VerticalAlignment="Center"
......
......@@ -64,8 +64,7 @@
VerticalAlignment="Center"
HorizontalAlignment="Left"
Margin="12,0,0,0"
Style="{ThemeResource BaseTextBlockStyle}"
Foreground="{ThemeResource SystemBaseHighColor}"/>
Style="{StaticResource TextStyle}"/>
</StackPanel>
</DataTemplate>
</ListView.ItemTemplate>
......@@ -102,8 +101,7 @@
VerticalAlignment="Center"
HorizontalAlignment="Left"
Margin="12,0,0,0"
Style="{ThemeResource BaseTextBlockStyle}"
Foreground="{ThemeResource SystemBaseHighColor}"/>
Style="{StaticResource ListItemHeaderStyle}"/>
</StackPanel>
</DataTemplate>
</ListView.ItemTemplate>
......@@ -115,7 +113,7 @@
Text="{Binding Key}"
FontWeight="SemiBold"
FontSize="25"
Margin="12,0,0,4"
Margin="4,0,0,0"
Foreground="{ThemeResource SystemAccentColor}"/>
</DataTemplate>
</GroupStyle.HeaderTemplate>
......
......@@ -166,10 +166,14 @@ namespace Linphone.Views
}
}*/
if (e.Parameter is String && (e.Parameter as String).Contains("sip") && e.NavigationMode != NavigationMode.Back)
if (e.Parameter is String && (e.Parameter as String)?.Length > 0 && e.NavigationMode != NavigationMode.Back)
{
String sipAddressToCall = e.Parameter as String;
addressBox.Text = sipAddressToCall;
try {
Address address = LinphoneManager.Instance.Core.InterpretURL(e.Parameter as String);
String sipAddressToCall = address.AsStringUriOnly();
addressBox.Text = sipAddressToCall;
} catch(Exception exception)
{ }
}
if (LinphoneManager.Instance.Core.CallsNb > 0)
......
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