Skip to content
Snippets Groups Projects
Commit 8a064c3a authored by Andreas Traczyk's avatar Andreas Traczyk
Browse files

chatview: acquire message input focus when selecting conversation

Change-Id: I0f4ad161f0f05959c4f5a312e92f256b56c9fd57
Gitlab: #107
parent ac3b8b82
Branches
Tags
No related merge requests found
...@@ -269,20 +269,20 @@ ConversationsAdapter::connectConversationModel(bool updateFilter) ...@@ -269,20 +269,20 @@ ConversationsAdapter::connectConversationModel(bool updateFilter)
emit updateListViewRequested(); emit updateListViewRequested();
}); });
filterChangedConnection_ filterChangedConnection_ = QObject::connect(currentConversationModel,
= QObject::connect(currentConversationModel,
&lrc::api::ConversationModel::filterChanged, &lrc::api::ConversationModel::filterChanged,
[this]() { [this]() {
conversationSmartListModel_->fillConversationsList(); conversationSmartListModel_
->fillConversationsList();
updateConversationsFilterWidget(); updateConversationsFilterWidget();
emit updateListViewRequested(); emit updateListViewRequested();
}); });
newConversationConnection_ newConversationConnection_ = QObject::connect(currentConversationModel,
= QObject::connect(currentConversationModel,
&lrc::api::ConversationModel::newConversation, &lrc::api::ConversationModel::newConversation,
[this](const QString& convUid) { [this](const QString& convUid) {
conversationSmartListModel_->fillConversationsList(); conversationSmartListModel_
->fillConversationsList();
updateConversationForNewContact(convUid); updateConversationForNewContact(convUid);
}); });
......
...@@ -442,6 +442,7 @@ Window { ...@@ -442,6 +442,7 @@ Window {
SidePanel { SidePanel {
id: mainViewWindowSidePanel id: mainViewWindowSidePanel
// TODO: remove the evil in this slot
onConversationSmartListNeedToAccessMessageWebView: { onConversationSmartListNeedToAccessMessageWebView: {
communicationPageMessageWebView.headerUserAliasLabelText = currentUserAlias communicationPageMessageWebView.headerUserAliasLabelText = currentUserAlias
communicationPageMessageWebView.headerUserUserNameLabelText = currentUserDisplayName communicationPageMessageWebView.headerUserUserNameLabelText = currentUserDisplayName
...@@ -507,6 +508,10 @@ Window { ...@@ -507,6 +508,10 @@ Window {
sidePanelViewStack.push(communicationPageMessageWebView) sidePanelViewStack.push(communicationPageMessageWebView)
} }
} }
if (!callStackViewShouldShow) {
communicationPageMessageWebView.focusMessageWebView()
}
} }
Connections { Connections {
...@@ -527,6 +532,7 @@ Window { ...@@ -527,6 +532,7 @@ Window {
WelcomePage { WelcomePage {
id: welcomePage id: welcomePage
visible: false visible: false
} }
......
...@@ -39,6 +39,9 @@ Rectangle { ...@@ -39,6 +39,9 @@ Rectangle {
signal messagesCleared signal messagesCleared
signal messagesLoaded signal messagesLoaded
function focusMessageWebView() {
messageWebView.forceActiveFocus()
}
function webViewRunJavaScript(arg) { function webViewRunJavaScript(arg) {
messageWebView.runJavaScript(arg) messageWebView.runJavaScript(arg)
...@@ -189,7 +192,6 @@ Rectangle { ...@@ -189,7 +192,6 @@ Rectangle {
} }
WebEngineView { WebEngineView {
id: messageWebView id: messageWebView
anchors.top: messageWebViewHeader.bottom anchors.top: messageWebViewHeader.bottom
...@@ -270,7 +272,6 @@ Rectangle { ...@@ -270,7 +272,6 @@ Rectangle {
} }
} }
// Provide WebEngineProfile. // Provide WebEngineProfile.
WebEngineProfile { WebEngineProfile {
id: messageWebViewProfile id: messageWebViewProfile
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment