Nach erfolgreichem Senden Message Box fokussieren

This commit is contained in:
2025-05-07 10:54:38 +02:00
parent f99312f13c
commit fbb01a498b
2 changed files with 10 additions and 0 deletions

View File

@@ -34,6 +34,12 @@ namespace BeWo.View.Detail.AI
((INotifyCollectionChanged)listbox_messages.Items).CollectionChanged += listbox_conversations_SelectionChanged;
popup_settings.Closed += (s, e) => ViewModel.UpdateConfig();
ViewModel.SendNewMessageSuccess += (s, e) =>
{
if (txt_input_message.Visibility == Visibility.Visible)
txt_input_message.Focus();
};
}
public AiConversationChatView(string stylestring) : this()

View File

@@ -62,6 +62,8 @@ namespace BeWo.ViewModel.ListViewModel
AskDeleteCommand = new DelegateCommand(AskDelete, () => BeWoApp.HasLoggedOnUserRight(UserRightType.AiModuleChatDelete) && SelectedVM is object);
}
public event EventHandler SendNewMessageSuccess;
public DelegateCommand SendNewMessageCommand { get; set; }
public DelegateCommand RequestNewConversationCommand { get; set; }
public DelegateCommand TestCommand { get; set; }
@@ -200,6 +202,8 @@ namespace BeWo.ViewModel.ListViewModel
MessageInput = string.Empty;
IsSending = false;
SendNewMessageSuccess?.Invoke(this, EventArgs.Empty);
},
(exception) =>
{