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

smartlist: always refocus to chatview when showing a conversation

Gitlab: #116
Change-Id: Ibf2fdf3eeeb2e36c08450ef99ac42ca48913a0ed
parent 5f272b33
No related branches found
No related tags found
No related merge requests found
......@@ -442,6 +442,10 @@ Window {
SidePanel {
id: mainViewWindowSidePanel
onFocusMessageWebViewRequested: {
communicationPageMessageWebView.focusMessageWebView()
}
// TODO: remove the evil in this slot
onConversationSmartListNeedToAccessMessageWebView: {
communicationPageMessageWebView.headerUserAliasLabelText = currentUserAlias
......@@ -475,12 +479,14 @@ Window {
callStackView.setLinkedWebview(communicationPageMessageWebView)
if (mainViewStack.find(function (item, index) {
return item.objectName === "communicationPageMessageWebView"
}) || sidePanelViewStack.find(function (item, index) {
return item.objectName === "communicationPageMessageWebView"
})) {
if (!callStackViewShouldShow)
return item.objectName === "communicationPageMessageWebView"
}) || sidePanelViewStack.find(function (item, index) {
return item.objectName === "communicationPageMessageWebView"
})) {
if (!callStackViewShouldShow) {
communicationPageMessageWebView.focusMessageWebView()
return
}
}
// Push messageWebView or callStackView onto the correct stackview
......@@ -509,9 +515,8 @@ Window {
}
}
if (!callStackViewShouldShow) {
if (!callStackViewShouldShow)
communicationPageMessageWebView.focusMessageWebView()
}
}
Connections {
......
......@@ -34,6 +34,7 @@ Rectangle {
property int totalUnreadMessagesCount: 0
signal conversationSmartListNeedToAccessMessageWebView(string currentUserDisplayName, string currentUserAlias, string currentUID, bool callStackViewShouldShow, bool isAudioOnly, int callState)
signal focusMessageWebViewRequested
// Hack -> force redraw.
function forceReselectConversationSmartListCurrentIndex() {
......@@ -175,6 +176,8 @@ Rectangle {
height: tabBarVisible ? sidePanelRect.height - sidePanelTabBar.height - contactSearchBar.height - 20 :
sidePanelRect.height - contactSearchBar.height - 20
onCurrentIndexChanged: focusMessageWebViewRequested()
Connections {
target: ConversationsAdapter
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment