removed ability to send empty messages
This commit is contained in:
@@ -213,27 +213,13 @@ namespace PolyChat
|
|||||||
private void OnKeyUp(object sender, Windows.UI.Xaml.Input.KeyRoutedEventArgs e)
|
private void OnKeyUp(object sender, Windows.UI.Xaml.Input.KeyRoutedEventArgs e)
|
||||||
{
|
{
|
||||||
updateSendButtonEnabled();
|
updateSendButtonEnabled();
|
||||||
if (e.Key == Windows.System.VirtualKey.Enter)
|
if (buttonSend.IsEnabled && e.Key == Windows.System.VirtualKey.Enter)
|
||||||
{
|
{
|
||||||
OnSendMessage();
|
OnSendMessage();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public static IAsyncOperation<ContentDialogResult> SafelyOpenDialog(Dialog d)
|
public static IAsyncOperation<ContentDialogResult> SafelyOpenDialog(ContentDialog d)
|
||||||
{
|
|
||||||
if(VisualTreeHelper.GetOpenPopups(Window.Current).Count == 0)
|
|
||||||
return d.ShowAsync();
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
|
|
||||||
public static IAsyncOperation<ContentDialogResult> SafelyOpenDialog(NewChatDialog d)
|
|
||||||
{
|
|
||||||
if (VisualTreeHelper.GetOpenPopups(Window.Current).Count == 0)
|
|
||||||
return d.ShowAsync();
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
|
|
||||||
public static IAsyncOperation<ContentDialogResult> SafelyOpenDialog(EditUsernameDialog d)
|
|
||||||
{
|
{
|
||||||
if(VisualTreeHelper.GetOpenPopups(Window.Current).Count == 0)
|
if(VisualTreeHelper.GetOpenPopups(Window.Current).Count == 0)
|
||||||
return d.ShowAsync();
|
return d.ShowAsync();
|
||||||
|
|||||||
Reference in New Issue
Block a user