Skip to content
Snippets Groups Projects
Commit 3a023b07 authored by Albert  Babí Oller's avatar Albert Babí Oller Committed by Ming Rui Zhang
Browse files

misc: avoid unnecessary signals for contact request

- avoid "needTo" signal/slots and unnecessary propagation loops

Gitlab: #86
Gitlab: #88

Change-Id: I25a373b4e02f53502fdc302602ffcc7117b4b97a
parent d056f56c
Branches
Tags
No related merge requests found
......@@ -306,7 +306,9 @@ Window {
target: AccountAdapter
function onUpdateConversationForAddedContact() {
mainViewWindowSidePanel.needToUpdateConversationForAddedContact()
MessagesAdapter.updateConversationForAddedContact()
mainViewWindowSidePanel.clearContactSearchBar()
mainViewWindowSidePanel.forceReselectConversationSmartListCurrentIndex()
}
function onAccountStatusChanged() {
......@@ -507,12 +509,6 @@ Window {
}
}
onNeedToUpdateConversationForAddedContact: {
MessagesAdapter.updateConversationForAddedContact()
mainViewWindowSidePanel.clearContactSearchBar()
mainViewWindowSidePanel.forceReselectConversationSmartListCurrentIndex()
}
Connections {
target: ConversationsAdapter
......
......@@ -34,7 +34,6 @@ Rectangle {
property string headerUserUserNameLabelText: ""
signal needToHideConversationInCall
signal needToSendContactRequest
signal sendMessageContentSaved(string arg)
signal messagesCleared
......@@ -100,10 +99,6 @@ Rectangle {
onNeedToHideConversationInCall: {
messageWebViewRect.needToHideConversationInCall()
}
onSendContactRequestButtonClicked: {
MessagesAdapter.sendContactRequest()
}
}
QtObject {
......
......@@ -34,7 +34,6 @@ Rectangle {
signal backClicked
signal needToHideConversationInCall
signal sendContactRequestButtonClicked
function resetBackToWelcomeViewButtonSource(reset) {
backToWelcomeViewButtonSource = reset ? "qrc:/images/icons/ic_arrow_back_24px.svg" : "qrc:/images/icons/round-close-24px.svg"
......@@ -149,7 +148,7 @@ Rectangle {
onExitColor: "white"
onClicked: {
messagingHeaderRect.sendContactRequestButtonClicked()
MessagesAdapter.sendContactRequest()
CallAdapter.placeAudioOnlyCall()
}
}
......@@ -170,7 +169,7 @@ Rectangle {
onExitColor: "white"
onClicked: {
messagingHeaderRect.sendContactRequestButtonClicked()
MessagesAdapter.sendContactRequest()
CallAdapter.placeCall()
}
}
......@@ -192,7 +191,7 @@ Rectangle {
onExitColor: "white"
onClicked: {
messagingHeaderRect.sendContactRequestButtonClicked()
MessagesAdapter.sendContactRequest()
sendContactRequestButtonVisible = false
}
......
......@@ -34,7 +34,6 @@ Rectangle {
property int totalUnreadMessagesCount: 0
signal conversationSmartListNeedToAccessMessageWebView(string currentUserDisplayName, string currentUserAlias, string currentUID, bool callStackViewShouldShow, bool isAudioOnly, int callState)
signal needToUpdateConversationForAddedContact
// Hack -> force redraw.
function forceReselectConversationSmartListCurrentIndex() {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment